HomeWork Board Motor Control
I have just started to really get into my homework board and gradually started writing code of my own and to the point where i don't need the book anymore to guide me!
i wrote code for a basic obstacle avoiding robot. it's "eyes" are an infrared emitter and photo transistor calibrated so at about 5 inches or so the photo transistor picks up the light and sends it to an input on the basic stamp, therefor reversing both motors for a delay of 1000, then turning the two motors in opposite directions to turn, then continue on in its forward path until it meets another obstacle. to keep it less confusing while assembling everything, i used two multi colored LED's to represent the motors. Green represented forward, as Red represented reverse. after calibrating my sensor, and getting the code right its to the point that when my hand is in front of the sensor, both LED's turn from Green, to Red, then after a second or so of delay, one stays green and the other goes red representing the turning, then both green again.
heres where my problem starts.
when i replace the LED's with motors, they simply don't turn. I'm almost positive its because the mA's are just way too low to power them.
what can i do besides using four relays (one for each direction)
i have a seperate power supply of 4 "AA" batteries in a battery pack but i still cant find a way to power the motors. =/
ANY help would be appreciated.
i wrote code for a basic obstacle avoiding robot. it's "eyes" are an infrared emitter and photo transistor calibrated so at about 5 inches or so the photo transistor picks up the light and sends it to an input on the basic stamp, therefor reversing both motors for a delay of 1000, then turning the two motors in opposite directions to turn, then continue on in its forward path until it meets another obstacle. to keep it less confusing while assembling everything, i used two multi colored LED's to represent the motors. Green represented forward, as Red represented reverse. after calibrating my sensor, and getting the code right its to the point that when my hand is in front of the sensor, both LED's turn from Green, to Red, then after a second or so of delay, one stays green and the other goes red representing the turning, then both green again.
heres where my problem starts.
when i replace the LED's with motors, they simply don't turn. I'm almost positive its because the mA's are just way too low to power them.
what can i do besides using four relays (one for each direction)
i have a seperate power supply of 4 "AA" batteries in a battery pack but i still cant find a way to power the motors. =/
ANY help would be appreciated.
Comments
http://forums.parallax.com/showthread.php?p=749676·H-bridge uses 4 SPDT relays
http://forums.parallax.com/showthread.php?p=869446·mid-size robot uses 6 relays
Alternatively you can buy a motor controller, such as http://www.pololu.com/catalog/product/411·or http://www.pololu.com/catalog/product/1110
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
if not i guess i could pick up some relays from radio shack.
after all i work there and always take advantage of my 30% off all radio shack brand products. (:
that's where i got the homework board.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
OR i HIGHLY recommend the "HB25 Motor controller".