Adafruit Motorshield v2 - Resets Arduino

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
tribun
 
Posts: 5
Joined: Thu Mar 20, 2014 4:27 am

Adafruit Motorshield v2 - Resets Arduino

Post by tribun »

Hi,

I have an Arduino UNO with an MotorShield v2. One small Hobby Servo and a DC Motor connected. (And a small Button)
Thats all. And it keeps resetting randomly the arduino when the DC Motor is powered.
It should rotate the Motor at full speed for 100ms and release for 100ms repetitive. Then suddenly it freezes (motor continues rotating for a longer time) and then the board restarts.
I am using a battery power supply. I tried several: a 9V block battery, with or without 5V regulator. a battery chain of 6 AA batteries (with and without 5v regulator/~0,5-1 A output), and I tried it by removing the VIN jumper and using a seperate power supply for the Arduino. But still this happens (randomly).
When I remove either the servo or the DC motor I couldn't reproduce the error. But since I used different power supplied I am confused how this could be the problem.
What should I do? Try to use the Opt In for the servo? (which one is + and which is GRD?)
Or do I have to change the frequency?
I feel totally lost, so please give me a hint what I could try next...

Best regards
Patrick

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motorshield v2 - Resets Arduino

Post by adafruit_support_bill »

DC motors generate a lot of "brush noise". This can feed back into the circuit and cause random problems such as you describe. One thing you can do to limit the noise is to add some capacitors to the motor: 1 across the motor terminals, and 1 each from the motor terminal to the motor case as shown below: http://learn.adafruit.com/adafruit-moto ... rduino/faq

Image

tribun
 
Posts: 5
Joined: Thu Mar 20, 2014 4:27 am

Re: Adafruit Motorshield v2 - Resets Arduino

Post by tribun »

Thanks for the suggestion. But actually this didn't solve my problem. But replacing my Arduino Uno with a "new" one did. So apparently there was something broken on the Microcontroller itself..

By the way: I am running this project with the VIN jumper connected and only the power supply from the shield. (which shares the power to run the arduino). Seems to work pretty well. Or is it "bad" to do so?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Motorshield v2 - Resets Arduino

Post by adafruit_support_bill »

Motors produce several types of interference. Different circuits react differently to them so there is no one-size-fits-all solution.

High frequency brush noise can radiate from motor leads and get picked up by nearby wires and traces. This is best suppressed as close to the motor as possible as in the photo above.

Power spikes and back-emf cause large fluctuations in the power rails that can overwhelm the normal power supply filtering and cause 'brownouts' severe enough to reset a processor. These can often be tamed with some added capacitance. But sometimes a separate power supply is needed.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”