Motor Control Bi-Directional 12V

So I've been trying to get a DC motor to be directional and controlled by an Arduino uno. Additionally its a 12V motor while the uno only supplies 5v. Using a transistor will work to control it but how can I get it to work in two directions? Tried using an H-Bridge i oredered online, it would sometimes work in one direction but then stop. I know the H-bridge was wired correctly. Tried ordering a relay shield, but I dont understand how to use it. Any suggestions?

How much current does this motor require in your application? - Scotty

3A, and after we ran it through the transistors/H-bridges, both ways still had enough amperage to run the motor according to our meter.

To clarify, problem is not with the arduino, but is simply how do you run a motor in two directions and up the voltage. Alternatively, how does a relay shield work?

To switch motor direction, the HIGH/LOW inputs to the h bridge are swapped. Here is a pretty clear description on the connections and code.

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

  • Scotty

Alternatively, how does a relay shield work?

You need to be specific about which relay shield you are speaking of but, I can give you general information.

The Arduino will provide a control voltage that operates a transistor inside of the relay, or it will operate a coil that will close a switch inside of the relay. The idea is that you can take a small voltage such as 5v and control much larger voltages like 120vac. It depends on the relay and it's rating as to what you are able to do with it.