Shop OBEX P1 Docs P2 Docs Learn Events
how do i use motors for stamp — Parallax Forums

how do i use motors for stamp

sasukesasuke Posts: 9
edited 2007-07-29 12:27 in BASIC Stamp
i want to know how to use motors with my basic stamp and what kind of code to use for them to go without stoping

basicly im trying to make a lil car with 2 of these motors and make it avoid objects with 2 home made touch sensors

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The human whose name is written in this note shall die.
-Death note
352 x 288 - 14K

Comments

  • ZootZoot Posts: 2,227
    edited 2007-07-27 01:37
    The most common method (these days) for running motors from a microcontroller is by using an H-bridge. An H-bridge allows you to set speed and direction of an electric motor without relays, etc. -- totally solid state.

    Do a search for H-bridge on the 'net and you'll turn up lots of circuits, ICs and the like if you want to "roll your own".

    You can also purchase ready-to-go H-bridge motor controllers from Parallax and other manufacturers, which may make things easier -- many of the off-the-shelf controllers allow you to run the H-bridge with simple servo pulses or serial commands or I2C commans.

    www.parallax.com/detail.asp?product_id=30052

    www.parallax.com/detail.asp?product_id=27961

    The above links are controllers suitable for smaller motors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • WhitWhit Posts: 4,191
    edited 2007-07-27 14:19
    sasuke,

    Zoot covered some of this, but Mike Green gave me this answer to a motor control question. It has some good info. The wiki h-bridge search will give you some really good basic info.

    Mike said,
    "Look at some of the motor controllers that Parallax sells: www.parallax.com/html_pages/products/motorcontrol/motor_control.asp. The Pololu unit looks about right for what you're doing. The Wikipedia has good information on H-Bridges. Do a websearch on "wiki h-bridge".

    The Parallax tutorials on Process Control and Robotics are also good starting places (www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp)."

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 7/27/2007 2:27:54 PM GMT
  • wurxwurx Posts: 10
    edited 2007-07-27 14:26
    How about making it really easy.....use continuous rotation servos from Parallax.
  • sasukesasuke Posts: 9
    edited 2007-07-27 23:04
    thank you all for the replys, I did a search for "wiki h-bridge" and found out just how a h-bridge works and what it dose, the reason i dont just use 2 continuous rotation servos is because i dont have any, and i cant get them till next week (thats when i get payed) and because of that i thought if i could use the motors without needing to get any thing eles then i could work on my robot and save money

    thanks again for all the help and the links, i guess ill just have to wait till next week

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The human whose name is written in this note shall die.
    -Death note
  • RexkarzRexkarz Posts: 5
    edited 2007-07-28 23:23
    Got any transistors laying around? Use them to drive your motors. 5 volt relays are handy, too. Especially the 4-pole type. I like to buy lots of 100 relays at a time on ebay. Sometimes You can get 100 relays for under 25 cents each !
  • D FaustD Faust Posts: 608
    edited 2007-07-29 12:27
    Note: If you do use an H-bridge they can't be driven directly by the stamp (unless you just want ful on or full off). The PWM command takes up the whole processor, you'd need something like the PWMPAL ( http://www.parallax.com/detail.asp?product_id=28020) Hope this helps someone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    D Faust
Sign In or Register to comment.