Electronic – arduino – H-Bridge Drive Power Flowing Up Logic

arduinoh-bridge

I'm using an H-bridge (L298n) to actuate two motors, so I've connected up a battery pack to the supply voltage in, to power the motors, and I've connected the logic supply voltage in to the arduino 5v out. (All are grounded.)
When the arduino is off but the drive power is connected to the H-bridge, the power goes up the logic line, and tries to power the arduino from its output.

Is this normal H-bridge behaviour, will it damage my board, and how can I stop it?

Best Answer

This is not a desirable situation. You can avoid this by putting a diode on the Arduino output. This will prevent voltage from H-bridge to damage you output.

Anode will connect to the Arduino and cathode will connect to the H-bridge.

Edit

Having a look at the L298N datasheet I noticed that the minimum logic voltage is 4.5 V, since 1N4001 (as suggested before) has a forward voltage of about 1V that would not work. So instead you should use a schottky diode that has lower forward voltage and can meet the minimum voltage requirement for L298N.