H-bridge cannot reset properly &how to stack two H-bridges together

Drive a 4-wire bipolar stepper motor or a pair of DC motors from your Arduino. [Product page]
Post Reply
Posts: 1
Joined: Mon Oct 24, 2016 2:30 pm

H-bridge cannot reset properly &how to stack two H-bridges together

Post by Dominix » Mon Oct 24, 2016 2:56 pm

Hi ,
I have 4 DC motors to control. But I found that after I stacked two h-bridge motor shields up, the two shields just can output exactly the same signal. I I've searched some information about this problem, it seems that I have to modify the second shield so that Arduino can distinguish those two apart. But I don't know how to do this job,is there any instruction videos or provide me some tips?

In addition, because I don't know how to modify the H-bridge, so I just used two Arduino boards to control them separately,each controls two dc motors. Then another problem comes. I connect Arduino board to a 9v battery.Sometimes when I find I have to adjust my device's position I would turn off the switch on the battery box while Arduino was still running some program. After I put my robot back to starting point and then turn on the switch, I supposed Arduino will run the code from very beginning, but they didn't. they just run the code from where they stopped last time, and reset button didn't work well either, I always have to press reset button to stop current process. How could I deal with this? From online video those smat guys just turn on the button robot start to work,but look at mine, every time when I start it I have to prepare press reset button many times, that's pretty annoying, should a build a switch circuit to control it?


Freetronics Staff
Freetronics Staff
Posts: 21
Joined: Thu Jul 14, 2016 2:41 am

Re: H-bridge cannot reset properly &how to stack two H-bridges together

Post by danieldewaard » Mon Nov 07, 2016 12:20 pm

Hi Dominix,

This isn't a problem it is the way it is designed. At a really basic level that H-Bridge works by receiving commands from the Arduino telling it which way it should direct the motor outputs. Each H-Bridge is obviously identical meaning that when you stack the shields the same signals from the Arduino will propagate through both shields and both sets of motors will always behave in exactly the same way. You can fix this by removing the overlapping control pins from your second H-Bridge (so that the signal doesn't propagate through to the second H-Bridge) and then connecting these pins to other unused pins and adjusting your code accordingly (regarding pin assignments). This is pretty tricky and difficult to explain. Unfortunately we don't have any tutorials on how to do this so hopefully what I have said makes sense to you.

That is certainly very unusual? Are you using a Freetronics Eleven or another Arduino? It is possible that your switch may only be cutting power to your motors and not to your Arduino which would give the impression that your Arduino hasn't reset. The Arduino should definitely reset when powered on and off.

Hopefully this helps.

Regards, Daniel

Post Reply