Question about controlling a DC motor

I have successfully made two DC motors run using an h-bridge and a 9v power supply.

However, now I am trying to get two DC motors to run that only need 5v. Do I still need to use an h-bridge or can I just run the motor straight from the arduino.

can I just run the motor straight from the arduino

That is EXTEREMELY likely to damage the processor. At a minimum, you will need a transistor between the pin and motor. Hopefully, you can get some ideas here…

And a kickback diode to protect the transistor…


If you want to drive the motors with the ability to control speed/direction you need an hbridge (same circuit, just your supply would be 5v instead of 9v). If you just want to switch the motor on/off you can use a transistor and diode.

For the record, an hbridge is just a packaged circuit of a bunch of transistors, so if you want, you can make your own (it won’t be as small, of course).