Shop OBEX P1 Docs P2 Docs Learn Events
Motor Control w/ NPN Transistors — Parallax Forums

Motor Control w/ NPN Transistors

jsmasterkingjsmasterking Posts: 35
edited 2006-04-25 23:42 in Robotics
I have a DC motor that I took out of a cheap toy and also some NPN transistors around.·I·want to make a motor control circuit. Nothing fancy just 'motor ON' and 'motor OFF' (I don't even need a REVERSE function). Can anyone help me·design·a circuit like this that will interface to the·BS2?

The motor runs will run on 3 to 6V from its own, separate, power source.·The NPN transistors are similar to the ones from RadioShack:·http://www.radioshack.com/sm-npn-transistorspackage-of-15--pi-2062586.html

I tried building a circuit but I had no luck. This is my first time using transistors so I really·need some·help!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·on····· plane··········································, when catching ducks

"In this house, we obey the laws of thermodynamics!"
··············································································^
http://profiles.yahoo.com/jsmasterking

Post Edited (jsmasterking) : 6/5/2006 10:45:35 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-16 22:48
    Here's a quick link found in a Google search...Q1 could be an NPN (2N3904/2N2222) and Rb could be 1K.· Google can be very useful for stuff like this.

    http://www.canton.edu/employee/hartle/elec243_S04/motor.JPG


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • jsmasterkingjsmasterking Posts: 35
    edited 2006-04-17 13:08
    Thanks but I still have a question: Is the 'PIC Circuit Common' the groud? In the case of the BS2 would it be Vss?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·on····· plane··········································, when catching ducks

    "In this house, we obey the laws of thermodynamics!"
    ··············································································^
    http://profiles.yahoo.com/jsmasterking

    Post Edited (jsmasterking) : 6/5/2006 10:45:20 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-17 19:41
    Yes, you always want a common ground in control circuits like this, otherwise the transistor won't have any reference from ground to what voltage it is at.· The only time you wouldn't is if the circuits are electrically or optically isolated.· For example using an opto-coupler or SSR or Mechanical Relay.· The controlled circuit wouldn't need to have a common ground in those cases.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • ktekxktekx Posts: 71
    edited 2006-04-24 06:18
    What is the purpose of the diode?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-04-24 11:39
    ktekx asked...
    What is the purpose of the diode?
    It's commonly called a free-wheeling diode.· A motor is a coil (of wire) and like a choke or any other inductor (also coils), all coils store energy, when they are interrupted they want to unload their store.· This energy is a surprising accumulation, several hundred volts, a spike, and without a diode it would/will discharge through the·path of least resistance -- your driver transistor.· The diode provides a means of dissipation less resistive than the rest of the circuit.
  • jsmasterkingjsmasterking Posts: 35
    edited 2006-04-25 23:42
    I was using an LED as a diode in the test circuit. The coil's discharge explains why the LED would light up for a short time after the controller stop supplying the motor a current (i.e. when the motor is turned off by the controller). I also found that a single transistor is good for about one to six AAA or AA batteries (1.5 - 6V). If you double the transistors and made a Darlington NPN, the voltage drops too low! A single NPN is more efficient.

    On a H-bridge, the current has to pass through at least two transistors. Would the voltage drop be also as high?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·on····· plane··········································, when catching ducks

    "In this house, we obey the laws of thermodynamics!"
    ··············································································^
    http://profiles.yahoo.com/jsmasterking

    Post Edited (jsmasterking) : 6/5/2006 10:44:56 PM GMT
Sign In or Register to comment.