Shop OBEX P1 Docs P2 Docs Learn Events
bs2 isn't making the motors move — Parallax Forums

bs2 isn't making the motors move

Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
edited 2008-01-30 04:39 in BASIC Stamp
so i bought the what is a microcontroller kit awile back and i finished that up and such. but this year i am doing an event in science olympiad (electric vehicle) the purpose of the event is to make a vehicle that will travel somewhere between 5-10 m. i figured this would be easy ya know just plug the motors into the homework board and be on my merry. well i did all the previously mentioned and the code is correct and the stamp accepts the program but nothing happens. so what happened did i do something wrong? is this a bad idea? what can i do in the next day so that the car is ready for this saturday?

Comments

  • skatjskatj Posts: 88
    edited 2008-01-30 04:10
    Might help if you posted the code and setup.

    Are you talking about electric DC motors or servos? If they are motors, then what voltage do they need to run? I'm not familiar with the homework board, but I'm pretty sure the Stamp can only output 5 volts, so if you're using a 9V motor I don't think it'll run.
  • Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
    edited 2008-01-30 04:12
    here is the code excuse the coments

    ' Electric Vehicle program electricvehicle.BS2
    ' By: Tristan Bissinger 1-28-07

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    ' objective run car for 5-10m. find target time.

    '

    ' I/O ports ' This lables the I/O ports that the bs2 will use.
    fforward PIN 1 ' If this segment was not here the stamp would not
    rreverse PIN 0 ' know which ports(pins) to use, it also labels the
    lleft PIN 15 ' variables that will be used.
    rright PIN 14
    '

    ' Switch to outputs ' This segments tells the bs2 that the variables are
    LOW fforward ' all outputs.
    LOW rreverse
    LOW lleft
    LOW rright
    '

    ' Main line ' This is the part progam that makes the little car
    HIGH fforward ' go and can be motifide in any way.
    PAUSE 5000
    LOW fforward


    END
  • Sadao Fujiwara-sanSadao Fujiwara-san Posts: 31
    edited 2008-01-30 04:14
    the car is a little $10 car from target it originaly was powered by 2 AA bateries that power the r/c compoments and the motors
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-30 04:39
    DC motors commonly require much more current than the Stamp I/O pins can supply (maximum about 20mA).
    You can damage them (the I/O pins) by drawing too much current. Several tutorials like "Industrial Control" have
    examples for using a transistor to control a relay or motor or solenoid. You can find this by looking on Parallax's
    Downloads page for "Stamps in Class Tutorials".
Sign In or Register to comment.