Can someone please tell me to control a motor using an arduino. I want to begin a robot project.
Can someone please tell me to control a motor using an arduino. I want to begin a robot project.
@JacobL
A good place to start would be: http://www.arduino.cc/en/Tutorial/StepperBipolar
I have some old 3.5 floppys and some old CD drives. Will these motors work.
This tutorial is probably the easiest place to start:
http://www.oomlout.com/oom.php/products/ardx/circ-03
Also check out their relay tutorial which uses a relay, instead of a transistor, to control a motor.
If the motors are simple 2-wire motors, then yes those will work with the tutorials I pointed to. If they have more wires, the tutorial Billabott pointed to will be the one to use.
I've also used the little motors from power toothbrushes (crest spinbrush was one).
Cheers,
-Nico
About Floppy and CD-ROM motors, there are few diferent ones there. For example center one (spinning the floppy and CD/DVD usualy it is BLDC motor). It is the hardest to controll motors in thies devices. manualy controll them it is bit hard. but in PCB there should be drivers. Not shure how the drivers are controled, but it shold be eacyer. by the way FLOPPY and CD-ROM BLDC (Brushless Direct Current) motors may be part of the PCB, because they usualy have Hall efect sensors to now the current possition. Then In floppy there is a SEPPER mottor moving the data reading head. it usualy has 4 wires. And they can be controlled by arduino, but you have to use some transistors or with STEPPER controller microchip. They make the weak arduino signal in tu strong one, sutable to drive the mottor. There is an explanation how to controll 6 wire and 4 wire STEPPER motor: http://nerdclub-uk.blogspot.com/2011/09/stepper-motor-control-2-phase-4-phase.html
Then in CD-ROM there is a regular DC motor with only 2 wires. They are the simplest to control. Just connect the pover (+ and - ) to the wires and it goes. If you swap the + and -, then it will go to the other side. Non revesable DC mottor speed controll with arduino and a transistor http://arduinoarts.com/2011/08/arduino-tutorial-f1-rc-car-dc-motor-driven-by-mos-transistor/ the potensiometer is just for telling arduino how fast you want it to go.
There are stepper mottor or 2x DC mottor controolers like this: http://www.ebay.com/itm/Stepper-Motor-Drive-Controller-Board-Module-L298N-for-arduino-NEW-good-/330808982986?pt=LH_DefaultDomain_0&hash=item4d05c07dca if you do not know how to use it, please ask. I like thies, because it is realy simpple and fast to controll small motors upt to 2A (look on the mottor or in its datasheet how much amps does it use).
And what type of mottors to use it depends on what the robot is going to do ant in what part. If it is for driving weals, it would be better tu use DC
And for making bigger robot and controlling more powerfull robots I like this: http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/HB-25/List/0/SortField/4/ProductID/64/Default.aspx
It is realy powerfull one, hade acidently shorted the output, but it is still alive. we are using them in our robot:
This robot is made by KTU PI (Kaunas University of Technology Panevėžys Istitution) university students. Not the best robot, but it is our first on.
Ant this is a video how this robot can use webcam and computer vision application with OpenCV librray to detect an object, take it and bring it back By the way, in this video motors are replaced with more powerfull ones (from car windshield wipers) to drive outside
So just some fun stuff to get you more motivated to make your own robot
If this video is not working, then you can see it in youtube: http://www.youtube.com/watch?v=phI0wMpWMiE
The answer to this question really depends on what kind of motors you plan on using. If you're using plain ol' hobby motors or the likes of which that only have two wires, you might consider using an H-Bridge (http://www.robotroom.com/BipolarHBridge.html), which are pretty easy to make and only require a few relatively common parts. I used this method while building a robot arm and it worked well, but it would work even better if you had sensors to track the position of your wheel, arm, or what have you. There are plenty of tutorials across the web for nearly all motor types just a search away.
As a sensor for our robot arm we are using poteniometer, it resolution good for us and it is realy cheap option. Ofcorse you can use encoders, but it is harder to monittor them and they are more expensive.
Check out Adafruit's Learning System. Plenty of tutorials for controlling motors, steppers, & servos on Arduino and RPi.