Go Down

Topic: control a DC motor (Read 45886 times) previous topic - next topic

piratedninja

how can i control a regular dc motor (about 5v)  with the arduino?

also, what about a brushless cd rom motor?

xSmurf

You need to have a look at the playground and tutorial section.
"Pilots believe in a clean living... they never drink wisky from a dirty glass."

MikMo

#2
Oct 13, 2007, 12:53 pm Last Edit: Oct 13, 2007, 12:53 pm by MikMo Reason: 1
Here's a good example :
http://www.tigoe.net/pcomp/labs/lab-motors.shtml

MikMo

http://www.mikmo.dk

Cheater

Quote
also, what about a brushless cd rom motor?

This could be interesting. ;D

piratedninja

ok so i understand that im going to need some other components to successfully power a dc motor with my arduino
and the same with my brushless motor from an old cd rom drive

but how exactly would i make that cd rom brushless motor spin?

Daniel

hi

how many wires are on your brushless motor? Usually the easiest way to get motors goign is to use two-wire motors. Motors with three, four, five or six wires require "phased" driving of the windings, which means extra hardware.

D

piratedninja


Frank Maine

SOrta hoping you found a good solution.  I've got a handful of hard disk drive motors, 3 wire, that I'd like to just turn on and off, no speed control necessary.

SeanJ

for regular dc motors, you can use a motor controller or motor driver to control them. such as the ones here:
http://www.robotsimple.com/Motor_Controller_and_Driver except A4983 driver, which might be useful for driving stepper motors in CD or floppy drive.  look here for more info on running cd drive motor http://www.epanorama.net/circuits/diskstepper.html

MadHatter

Brushless motors require a special feedback circuit. Typically you can use an elcheapo brushless ESC. Theres many many all over the internet. Just find one that has I2C or some other communciation.

Here someones already hacked it with the arduino in these forums:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1226292633

J6M8

I grabbed an old CD player and hacked it to bits -- got a two-wire motor out of it that I can control straight from the Arduino (i.e. a pin set to HIGH and one to LOW will spin it, as will any analogWrite statement, for varying speed).  Maybe it'll work with a CD drive motor as well?

zach

I just tried hooking up an old two-wire brushed dc motor I found lying around my studio.  It runs when connected to 3v and ground, but not to one of the output pins set to HIGH and ground.  I tested the pin with an LED, so that's not the problem.  Any idea what's going on here?

Thanks,
Zach


cr0sh

Quote
I just tried hooking up an old two-wire brushed dc motor I found lying around my studio.  It runs when connected to 3v and ground, but not to one of the output pins set to HIGH and ground.  I tested the pin with an LED, so that's not the problem.  Any idea what's going on here?


That's a good way to fry your Arduino (more specifically, the ATMega processor)!

You need to use a transistor or other switch to control the motor (don't forget the shunt diode, too) - YOU MUST NOT HOOK LOADS LIKE THESE DIRECTLY TO THE PINS (and really, you shouldn't do it with LEDs either, unless using a resistor to limit the current flow).

Look in the playground and elsewhere on how to do this properly...

:)

BTW - you might want to check your Arduino pins; if you haven't blown them already...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

cr0sh

Quote
Brushless motors require a special feedback circuit.


Not always - sometimes you can just bash out a 3-phase square-wave signal to the coils at the right frequency (using driver transistor, mosfets, half-bridges, etc) and get it to spin; it won't be the most efficient way to do it, but it can work...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

cr0sh

Quote
SOrta hoping you found a good solution.  I've got a handful of hard disk drive motors, 3 wire, that I'd like to just turn on and off, no speed control necessary.


If you have a "3-wire" motor, its likely one of several different possible configurations. If it is a brushless motor, then it could be hooked in a "wye" pattern (3 coils with one end each being a wire, and the other ends connected together centrally - "Y", see?), or possibly a "triangle" pattern (where the 3 coils are wired end-to-end, with the wires being from the "vertices" of the triangle formed). If you check the resistances between the wires, both will look the same (in the first instance, you would see the double resistance of two coils, in the second, a single coil resistance - regardless of how you place your probes). Some "wye" pattern motors typically bring out a fourth connection from the "central" connection of the "Y" pattern; if that isn't the case, sometime the "case" of the motor can be this point, so ohm out with your meter on the case as well to check that.

Other times, what the 3-wire motor may be is actually a 2-wire motor (ie, standard DC motor) with a hall-effect or other speed sensor on the third wire, which is used for feedback to control the speed of the spindle.

Generally, CD-ROM drives are going to use cheap DC motors, while hard drives use brushless phased motors - but this isn't always the case, so you will have to do some investigation and testing to figure it out ultimately...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up