Shop OBEX P1 Docs P2 Docs Learn Events
HomeWork Board Motor Control — Parallax Forums

HomeWork Board Motor Control

mjordan_14mjordan_14 Posts: 5
edited 2010-01-08 00:40 in BASIC Stamp
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.

Comments

  • ercoerco Posts: 20,256
    edited 2010-01-07 07:05
    Nothing wrong with relays, I use them all the time in robots large & small. Note that your HW board has 220 ohm series resistors on all 16 IO lines. You'll have to use·a transistor switch to turn on a relay. A regular Stamp or BoE has no resistors and can drive sensitive (20 mA or less) relays directly.

    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."
  • mjordan_14mjordan_14 Posts: 5
    edited 2010-01-07 07:20
    how about some micro servo's i have on an old rc plane. if i modded those to turn continuously would the micro controller be able to turn those?

    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. yeah.gif
  • ercoerco Posts: 20,256
    edited 2010-01-07 16:05
    Continuous rotation servos will work directly with the HW board, no controller required.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Miles. kMiles. k Posts: 34
    edited 2010-01-08 00:40
    if you look in the "nut's and Volts" column 6 there is a good article on how to control relays.
    OR i HIGHLY recommend the "HB25 Motor controller".
Sign In or Register to comment.