problem with a Voltage follower (Buffer)

Discussion in 'The Projects Forum' started by RobotHeart, Mar 17, 2010.

  1. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    hi

    im doing a project recently ( http://forum.allaboutcircuits.com/showthread.php?t=34609&page=1 ) and i have a problem power the motor connected to the MCU.

    when the MCU gives 5v to a certain pin...the pin gives 5V...but when a small motor is connected to the same pin...a voltage drop occures ( lets say from 4.5V to 2.8V).
    i tried using a voltage follower to increase the current...it did work but not as good as i wish...i tried connecting 2 voltage followers but the change is again not as i wish.
    any better ideas ?????

    beside....when the MCU pin is off (0V) the voltage follower gives an output of 3.5V...but when any voltage comes inside the voltage follower it gives the same input...i want it to give 0V at output when the input is 0V !

    im running out of time....help is highly needed.
    tq
     
  2. Nanophotonics

    Active Member

    Apr 2, 2009
    365
    3
    Can your MCU supply enough current to your motor? It appears to be loading effect. I wouldn't recommend connecting the MCU to the motor directly. Use an electrical isolator. A buffer will prevent loading effect, but you wouldn't get the required current out. What you probably need is a motor driver chip.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Use the MCU to control the gate of a logic-level MOSFET that is rated to carry about 2x to 3x or more the current of the motor.

    An MCU cannot source or sink enough current directly to power a motor of any size.
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I second that. You are going to fry that uC. If you are running out of time, you do not want a fried uC.
     
  5. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    do u know what is the name of the driver chip ?
    im using 4 small motors (vibrators)
     
  6. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    why is it going to be "fried" ?
     
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    SN754410 here is one.
    If you source too much current from a uC, it heats up and goes to sleep (forever)
     
  8. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    can u show me the circuit diagram of connecting this part between a microcontroller and 4 dc motor ?

    because im really out of time.
    tq
     
  9. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    im using a 5V supply only
     
  10. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    That rating, in amps or mA, is your supply?
    And do you have any data on the motors?
     
  11. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    the motor have no data...its just a small vibrator
    even when i connect it dirctly to the MCU it does make a vibaration..but a very strong vibration.

    supply : 5V 800mA
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    do you have any NPN transistors? Hopefully 4?
     
  13. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    i tried using 2n2222..but didnt work out very gud...i connected the base to the microcontroller through a 1k resistor...and the collector to the main source (5V 800mA)...and the emitter to the motor...the motor did rotate but very slowly !
     
  14. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    the problem was the 1k resistor. You should use something smaller.. say 330ohm

    Here is the setup you will want to use, Ignore the pin numbers, i dont have a 40pin dip. Use the pins you are outputting on already
    see attached.
     
    RobotHeart likes this.
  15. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    ok i'll try it and let you know...thank you
     
  16. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    it worked almost perfectly with a 100R instead of 330R
    again...thank u
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    That is too much current for your microcontroller AND the 2n2222 transistors. You risk burning them up.

    The practical limit for 2n2222 transistors is 500mA, when they have 50mA being sourced to their base. Your uC should not source or sink more than 20mA from any pin.

    You need a logic-level MOSFET to drive your motor.

    Look at an IRLD014 or IRLD024 at Digikey or Mouser. Nice N-channel MOSFET in a DIP package. The IRLD024 is rated for 2.4 Amperes current sink.
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    If all you have on hand is NPN and PNP transistors, then try this:

    [​IMG]

    The uC's output pin will not have to source more than 16mA.

    The 2n2222 sinks about 50mA from each of the 2n2907's bases.
    Each 2n2907 is then saturated, and can source 500mA.

    D1 and D2 protect the transistors from the motor's reverse EMF.
    C1 is additional protection due to the type of diode being very slow.
     
    RobotHeart likes this.
  19. RobotHeart

    Thread Starter Member

    Feb 21, 2010
    30
    0
    thanks...i'll try that too..i guess for more safety to my MCU. btw...i'am connecting other components to my 5V 800mA battery (12 ultra-bright LED, MCU, Buzzer, 4 IR sensor, 1 Ultrasonic sensor) connecting them to the same battery wouldn't affect the motor speed is it ?

    i'll try ur circuit and let u know
    tq
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You said your motor draws 800mA.
    Now you're saying that your battery is rated for 800mA - but that is not how batteries are rated; they are rated in terms of mAh, which is usually a 20-hour discharge rate.

    If your battery is rated for 800mAh, that means 40mA for 20 hours. If you discharge it at a faster rate, it will not produce anywhere near that much power.

    And yes, loading up a bunch of other accessories will affect the motor speed, because more power will be dissipated within the battery itself.
     
Loading...