Shop OBEX P1 Docs P2 Docs Learn Events
DC motor — Parallax Forums

DC motor

wentaburnwentaburn Posts: 3
edited 2005-04-30 16:13 in Robotics
Hello,

I'm a newbee at robotics and I would like to know how can I connect a simple DC motor to the BOE Bot and control it using BS2?

Comments

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

    ·· That's really an open question.· You can turn the motor on/off using a transistor and resistor.· If you need directional control you'll need an H-Bridge.· A better description of what you would like to do would enable a better answer.· Also specs on the motor.· Take care!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • wentaburnwentaburn Posts: 3
    edited 2005-04-29 18:37
    Thank you for your prompt reply.

    Well, right now I can power up the motor using the Vdd and Vin on the Boe Bot. I would like to build a fire-fighting robot, but now for competition, though. The motor would turn a fan installed in front of the bot. By the way, how do you connect the resistor/transistor? What are the specs for them?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-29 19:17
    ·· To connect the motor via resistor/transistor, use an NPN transistor.· I'll assume the motor doesn't draw very much current and we'll say you can use the 2N2222 for up to 500mA pretty safely.· Besides, if it's on a BOE-Bot, you don't want to be drawing that much anyway.· If it draws around 100mA or less you could use a 2N3904.

    ·· You would connect a resistor from the Stamp I/O pin you want to control the motor from to the·BASE of the transistor.· If you're only using the 6V from the BOE-Bot battery pack you can use a 330 Ohm or 470 Ohm resistor.· The transistor's BASE will connect to Vss (Ground) and the COLLECTOR will connect to one side of the motor.· The other motor lead will go to Vin.

    ·· It might also be a good idea to filter the motor some for noise, but without knowing what the motor is I don't know if maybe this is built in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • wentaburnwentaburn Posts: 3
    edited 2005-04-30 02:41
    I salvaged the motor from a handheld fan. It uses two 1.5V AA batteries.

    Thanks, anyway. I will try your suggestion.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-30 02:59
    ·· 3V motor, huh?· Okay, well at the very least I would put a .1uF capacitor across the motor leads just to soak up some noise.· People who have more experience using 3V DC motors may suggest a different value, or maybe add something...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2005-04-30 03:35
    Chris,

    Don't forget the back EMF diodes across the motor and transistor.


    wentaburn.

    Remember that you will automatically see a .6V drop across the C-E junction of your transistor
    so your 3V becomes 2.4V. If this is too much of a drop for your application, you might consider
    a MOSFET transistor as opposed to a BiPolar transistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    Latest Company News
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
    937 x 563 - 19K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-30 03:42
    Beau,

    ·· Yeah, that's why I said "someone with more experience with 3V motors..."· LOL· All my existing experience with 3V motor drive systems from different toys and other projects they don't put anything more than a cap across the motor leads.· So I wasn't sure if he'd need more or not.· Your schematic looks nice.·

    ·· On the voltage thing though, I did think of that, and may have messed up your train of thinking with the comment about the motor being 3V...You see, he already hooked it up to Vin on the BOE-Bot which is usually around 6V.· So his .6 volt drop is still going to leave 5.4 volts, which is actually more than the motor's rated for.· Another reason why I wasn't sure about noise protection, since the motor's being over-exerted.

    ·· Now in his defense, what he needs it for, it almost seems like that's a good thing since the motor will only be on once in awhile, and he needs more force.· Opinions?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2005-04-30 14:54
    wentaburn said...

    I would like to build a fire-fighting robot, but now for competition, though. The motor would turn a fan installed in front of the bot.

    Chris,

    The only problem that I see, is that if wentaburn tries to put the fire out WITH the fan smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe - Mask Designer III

    National Semiconductor Corporation
    Latest Company News
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-04-30 16:13
    Beau,

    ·· I'd have thought that too if I hadn't seen a video clip of these things in action.· For the competitions it appears that they're actually tracking a candle flame and blowing it out.· I myself wondered why all the BOTs for this competition had fans...But yeah, must be for safety reasons or something.· I don't know the specifics, just what I've seen in video footage from 2 events.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.