HI,
I am trying to work the bumper car bot project ( https://learn.adafruit.com/crickit-carn ... er-car-bot) and I am having issues with the DC motors not stopping as indicated on the code.
I worked a simplified version of the code to work the DC-Motors and I get the same results.
First Version (Works):
DC Motor 1 Set up
Button A start motors
Button B stops motors
Motors starts when A button is pressed and stops when Button B is pressed
Second Version (Works):
DC Motor 2 Set up
Button A start motors
Button B stops motors
Motors starts when A button is pressed and stops when Button B is pressed
Third Version (Does not Work):
DC Motor 1 and 2 Setup
Button A start motors
Button B stops motors
Both motors start when button A is pressed but do not stop when button B is pressed they continue non stop. I added a light code to button B to verify response and the LED's turn when button B is pressed.
Please advice!
CRICKET - DC MOTORS
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: CRICKET - DC MOTORS
Hi sorry to hear you're having issues with this -- my first thought is that the batteries may not be fresh enough and so the current draw is causing a sag and then a reset of the CPX. When that happens the Crickit often continues powering the motors, but doesn't get any new instructions from the CPX. I recommend putting in new, high-quality AA batteries and seeing if that fixes the behavior.
- AlejC18
- Posts: 14
- Joined: Tue Oct 17, 2017 4:26 pm
Re: CRICKET - DC MOTORS
John,
I will use some new batteries and will check again.
Thanks,
I will use some new batteries and will check again.
Thanks,
- AlejC18
- Posts: 14
- Joined: Tue Oct 17, 2017 4:26 pm
Re: CRICKET - DC MOTORS
Hi,
I replaced the batteries with new batteries and the same happened.
Anything else that may be causing this??
I replaced the batteries with new batteries and the same happened.
Anything else that may be causing this??
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: CRICKET - DC MOTORS
I am able to replicate the problem by using non-fresh batteries. With new, name-brand, Alkaline (not rechargeable!) batteries the problem goes away. If you're still having problems with fresh batteries (try Energizer or Duracell) something else may be going on. If that's the case, could you please post a photo of your Crickit/CPX and the terminals where your motors are connected?
- AlejC18
- Posts: 14
- Joined: Tue Oct 17, 2017 4:26 pm
Re: CRICKET - DC MOTORS
John,
I will get those today.
Do you recommend getting a 5V wall plug for the crickit kit?
Thanks,
I will get those today.
Do you recommend getting a 5V wall plug for the crickit kit?
Thanks,
- johnpark
- Posts: 985
- Joined: Wed Mar 25, 2009 2:15 pm
Re: CRICKET - DC MOTORS
It's great to have a 5V 2A wall adapter for Crickit, especially for non-mobile projects and development. I've used these https://www.adafruit.com/product/276 and even this 10A one https://www.adafruit.com/product/658 for huge current draw projects, like multiple solenoids
- arnieforte
- Posts: 1
- Joined: Fri Nov 30, 2012 6:44 pm
Re: CRICKET - DC MOTORS
I was having the same issue even with fresh batteries. It definitely seems to be the power draw that the motors were causing. I was able to mitigating the occurrence of the IOError by soldering a 0.1 uf ceramic non-polarized capacitor across the terminals of each TT motor.
Now both motors are able to be run continuously without power drain to the crickit circuitry.
Hope this helps others out.
Now both motors are able to be run continuously without power drain to the crickit circuitry.
Hope this helps others out.
- richa1
- Posts: 41
- Joined: Thu Jan 17, 2013 2:15 pm
Re: CRICKET - DC MOTORS
Adding the 0.1uf capacitor fixed this issue for me as well though it still crashes when I run the motors at 100%. It looks like 80% is a good consistent top speed that won't crash the Crickit while on batteries.
- adafruit_support_bill
- Posts: 88141
- Joined: Sat Feb 07, 2009 10:11 am
Re: CRICKET - DC MOTORS
Brushed DC motors create a lot of noise which feeds back through into the power rails through the motor wires. This noise is sometimes enough to cause a processor to crash.
A capacitor between the motor terminals as mentioned above will help some. You can improve the brush-noise filtering by adding 2 more capacitors: One from each motor terminal to the metal motor casing:
https://learn.adafruit.com/adafruit-mot ... aq-2861890
A capacitor between the motor terminals as mentioned above will help some. You can improve the brush-noise filtering by adding 2 more capacitors: One from each motor terminal to the metal motor casing:
https://learn.adafruit.com/adafruit-mot ... aq-2861890
- richa1
- Posts: 41
- Joined: Thu Jan 17, 2013 2:15 pm
Re: CRICKET - DC MOTORS
Thanks, I will have to give that one a try. In the meantime I did fix my issues by adding a voltage regulator to a 4 AA battery pack so that I get 5V @ 2A out of it. I am using an LM2596 to do this.
https://vetco.net/products/dc-dc-adjust ... a/vupn7407
It is recommended to add a heatsink to it as well.
https://vetco.net/products/dc-dc-adjust ... a/vupn7407
It is recommended to add a heatsink to it as well.
Please be positive and constructive with your questions and comments.