Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp controlled RC CAR — Parallax Forums

Basic Stamp controlled RC CAR

vaultpurplevaultpurple Posts: 3
edited 2012-08-01 12:27 in BASIC Stamp
I am trying to start writing the basic code for running an RC car battery motor with a Basic Stamp 2.

I tested the engine using the by running the negative lead to the (-)Vss and the positive lead into the (+5)Vdd. This made the engine turn on. And when testing the voltage across these two points it is about 5 volts like it supposed to do.

Now instead of running through the (+5)Vdd I connected the positive lead to P15 so I could use basic code to turn it on.

I just have a basic code wrote

DO
HIGH 15
LOOP

However when I run this the engine does not turn on. But if I test the voltage from P15 to (-)Vss without the engine connected I get a voltage reading of about 5v like I should. But when I run the positive lead of the engine into P15 and the negative into (-)Vss nothing happens.

Andy advice?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-07-30 19:52
    The pins on the stamp can not deliver enough current to run the motor. you need to add a transistor or mosfet to the circuit and use the stamp to switch that on and off.
  • vaultpurplevaultpurple Posts: 3
    edited 2012-07-31 11:26
    why would the (+5)Vdd be able to supply enough current but the pins not? Is there a resistor it is running through for the micro controller or something?
  • ercoerco Posts: 20,256
    edited 2012-07-31 16:49
    Google "microcontroller"
  • Martin_HMartin_H Posts: 4,051
    edited 2012-08-01 07:39
    It's not just the BS2 that has this restriction, all microcontrollers can only handle milliamps of current, not a full amp which a DC motor can consume. An h-bridge or relay is used to solve this problem.

    A few years back I bought a copy of the book "Robot Builder's Bonanza" and it really helped me understand these issues. The companion website is http://www.robotoid.com and has some free articles that can give you a feel for the content.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-08-01 12:27
    And there's always the ever-popular Nuts & Volts column #6 "Silicon Steroids for your Stamp"

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv6.pdf
Sign In or Register to comment.