Go Down

Topic: Starting and Stopping a DC Motor (Read 1 time) previous topic - next topic


Hello everyone,

I'll start off by saying that I am completely new to arduino boards, so bear with me. I am trying to do something very very simple, but I am worried about frying my board by randomly trying things. Essentially, I have a 9 volt DC motor that I want to wait thirty seconds after starting the program, then turn on. I've looked at many different tutorials, none of which really helped me. All I have for this is an Arduino Uno, no shield or anything like that. I have a bread board and a 9v battery. Where do I even start? I thought perhaps using the blink function (basic tutorial) for the LED and then wiring the battery in would work, but that obviously didn't. I appreciate the help from everyone, hopefully I can get this working and do you proud!



Oct 21, 2012, 12:01 am Last Edit: Oct 21, 2012, 12:04 am by Bob101 Reason: 1
Welcome to the Arduino forum,

I should start by saying that I am a n00b myself but I have managed to get a DC motor working using a motor shield.

To use an Arduino to control a motor bi-directionally you are going to need a H-Bridge. If you are just interested in moving the motor one direction then you will at least need a transistor and some diodes. To put it bluntly, the Arduino does not have enough power to move a motor directly through its pins, so you can't just wire the motor to the pins and expect it to turn!

The idea is that you use the Arduino to control a relay or more commonly a transistor to connect the motor up directly to the battery (not through the Arduino).

There are quite a few tutorials online for how to do this but most use at least some discrete components (often a pre-built H-bridge chip). For an example check out: http://itp.nyu.edu/physcomp/Labs/DCMotorControl

If you are more interested in a quick and dirty "on and off" type solution check out: http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

The best of luck with this and keep us updated with how it's going!


By buying a transistor!. You can't run a motor directly from an arduino (or any other processor chip!) you'll fry the chip.

See http://www.oomlout.com/oom.php/products/ardx/circ-03



Ok, so I have a transistor, and I was looking at the diagram that holmes4 posted. If I am powering the Arduino with a 9v battery, how do I power the motor at the same time? Would I need to get a second battery, and if so, where does this power source come in on the posted diagram?


You might want to read this:-

Motors and 9V batteries are not a good mix, they don't last very long.

Would I need to get a second battery,

No just feed the arduino power jack with the same supply as you feed the motor.

Go Up