Shop OBEX P1 Docs P2 Docs Learn Events
How to speed up the dc motor via BS2? — Parallax Forums

How to speed up the dc motor via BS2?

lgz108lgz108 Posts: 5
edited 2005-11-12 14:06 in Robotics
presently, i build a small surveillance robot with use of parallax basic stamp 2 microcontroller, when i plug my dc motor to it, i found that not enough faster the rotation of motor, got any idea to boost it up?
i suppose to modify the programming or add on a additional circuit?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-07 17:04
    Hello,

    ·· How is it you're connecting the motor to the BASIC Stamp?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • lgz108lgz108 Posts: 5
    edited 2005-11-09 00:20
    thanks for reply, i plug the dc motor to the pin that provide by the basic stamp 2...i use a normal 6v dc motor, i wonder why if i use adapter set to 6v, the dc motor will rotate very fast, but after i plug in the BS2 microcontroller that the output also same 6v, but result is rotate slow..so any idea to boost it up..should i ,modify the source code or add on a circuit?
  • Jim RicheyJim Richey Posts: 82
    edited 2005-11-09 01:09
    I believe you will need to power the motor by using a transistor,as the bs2 does not furnish enough current by itself to run it.Connect a resistor to the bs2 output pin with the other end to the base of a transistor,Connect one lead of the motor to the collector and the other lead to the battery positive.Connect the emitter to ground.Use an NPN transistor.Someone can tell you which transistor and resistor to use.My guess is a 2n3904 and a resistor of maybe 5k.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-09 05:30
    lgz108 said...
    thanks for reply, i plug the dc motor to the pin that provide by the basic stamp 2...i use a normal 6v dc motor, i wonder why if i use adapter set to 6v, the dc motor will rotate very fast, but after i plug in the BS2 microcontroller that the output also same 6v, but result is rotate slow..so any idea to boost it up..should i ,modify the source code or add on a circuit?
    After reading your original post I was afraid that's what you were doing, which is why I asked.· You cannot run a motor from the Stamp I/O pins.· They are not designed to drive a high-voltage/current load.· I'm surprised you have damaged the Stamp I/O pin already.

    Please do not run this in this configuration any longer!· Also, you aren't giving 6V out of the BASIC Stamp if you're putting 6V into it.· It's a 5V unit, so it's outputs are 5V, but at no more than 25 mA.· You will need a transistor to drive you motor at the very least!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • lgz108lgz108 Posts: 5
    edited 2005-11-09 09:03
    Jim Richey said...
    I believe you will need to power the motor by using a transistor,as the bs2 does not furnish enough current by itself to run it.Connect a resistor to the bs2 output pin with the other end to the base of a transistor,Connect one lead of the motor to the collector and the other lead to the battery positive.Connect the emitter to ground.Use an NPN transistor.Someone can tell you which transistor and resistor to use.My guess is a 2n3904 and a resistor of maybe 5k.

    thank for advance...can u give me moe clearly explanation or u can draw out a simple connection ...coz i m a beginner to do that basic stamp...really thank if can help me
  • lgz108lgz108 Posts: 5
    edited 2005-11-09 09:09
    Chris Savage (Parallax) said...
    lgz108 said...
    thanks for reply, i plug the dc motor to the pin that provide by the basic stamp 2...i use a normal 6v dc motor, i wonder why if i use adapter set to 6v, the dc motor will rotate very fast, but after i plug in the BS2 microcontroller that the output also same 6v, but result is rotate slow..so any idea to boost it up..should i ,modify the source code or add on a circuit?
    After reading your original post I was afraid that's what you were doing, which is why I asked.· You cannot run a motor from the Stamp I/O pins.· They are not designed to drive a high-voltage/current load.· I'm surprised you have damaged the Stamp I/O pin already.

    Please do not run this in this configuration any longer!· Also, you aren't giving 6V out of the BASIC Stamp if you're putting 6V into it.· It's a 5V unit, so it's outputs are 5V, but at no more than 25 mA.· You will need a transistor to drive you motor at the very least!
    very thanks that ur advices, i m a begineer of that, then u ahve any idea to do that ?
  • Jim RicheyJim Richey Posts: 82
    edited 2005-11-09 13:27
    Lgz108,you could use a little more knowledge before your experiments go up in smoke.Order a copy of "What's a Microcontroller" before it's too late.You will be grateful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-09 14:57
    Definately read the "What's A Microcontroller?" text...You get download it free from our website.· In the meantime, the link below is probably your best bet right now.

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

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • lgz108lgz108 Posts: 5
    edited 2005-11-12 04:17
    hbridge.txt
    can i use this H-bridge to operate my motor, if can..somebody can teach me wat is the source code that i going to use?

    Post Edited (lgz108) : 11/12/2005 4:39:33 AM GMT
  • Jim RicheyJim Richey Posts: 82
    edited 2005-11-12 13:16
    It looks like a valid h-bridge circuit.Bread board it,checking carefully for errors.Apply intermittent 6V positive to the R and L inputs,if you managed to make the motor turn either direction at that point,then it will be ready for step 2,connecting to the stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-11-12 14:06
    lgz108,

    As with all H-bridges of this type, it is very important that R and L do not BOTH go high at the same time.
    Doing so will let the smoke out of your H-Bridge. You can easily prevent this "accidental" situation with a
    simple Opto-isolator configuration that I mention in the link below.

    http://forums.parallax.com/showthread.php?p=525862

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.