I'm trying to control two DC 3-6V motors with a HG7881 driver and an Arduino Nano, but the Nano is always resetting if it has the same power supply than the driver. I'm connecting the batteries to HG7881 Vcc and Nano Vin (and also same ground).

If I power the Nano with USB and the driver with batteries then it works but that's not a good solution for me.

So the question is, is there any way to make both driver and Nano work with the same power supply?


  • Do you know how much current the motors and driver are drawing? Sep 12, 2014 at 9:55
  • 1
    @peter Unfortunately I don't know, but enough to reset the Nano board
    – Motumbo
    Sep 12, 2014 at 10:11
  • Is it foreseeable for you to use 2 distinct sets of batteries, one for the nano, one for the motors? They would only share GND. This way the voltage drop on motor batteries would not impact the nano supply voltage.
    – jfpoilpret
    Sep 12, 2014 at 11:51
  • Otherwise a cap between Vin and GND as near the nano as possible could help regulate the voltage when the motors draw too much current. Finding the right cap value is a matter of experiment...
    – jfpoilpret
    Sep 12, 2014 at 11:53
  • You can also try adding a capacitor between VCC and GND on the nano.
    – Gerben
    Sep 13, 2014 at 9:42

2 Answers 2


You need to know the peak current demands of your motor circuit before you can solve this problem. If you have a digital multimeter you can measure the constant current, and make a guess at the peak current. Put your multimeter in series with the motor driver and operate it at full power. The peak current may be as high as twice the steady current of the running motor. Also check the current with the motor under heavy load.

Then you need a power supply that can put out that much current, plus the current of your Arduino, without the voltage dropping below the minimum requirement for the Arduino voltage regulator (~7 volts).

What kind of batteries are you using? If you put 6 C cells in series you'll get 9 volts and pretty high peak current.

  • OK, it was just the power suppy. I was using 4*AA, but wasn't enough. With 6*AA it now works! Thanks!
    – Motumbo
    Sep 20, 2014 at 12:59

If the reset is due to transients when the motor starts or stops, you can get by with isolating Nano power via a diode and capacitor. (See below.) If, on the other hand, the motor is dragging the supply voltage so low the Nano won't run, you may need to add a separate battery for the Nano or upgrade your batteries, as mentioned in Duncan's answer.

To isolate Nano power from motor power, open the connection between battery V+ and Nano Vcc; connect the anode of a diode to V+; connect the cathode to the positive lead of a capacitor of a few hundred microfarads and to Nano Vcc. Connect the capacitor's negative lead to ground. If simple diode+capacitor filtering isn't enough, you probably should attach an oscilloscope and find out more exactly what's happening. Further options include series resistors, wound inductors, and ferrite beads, as seen in some Google images for power supply filtering.

  • Hi, good description of diode & capacitor isolation, however, a picture or diagram would help any reader dramatically. I recommend you add one. Jan 3, 2016 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.