Arduino control TIP121 transistor to driving motor.

Discussion in 'Embedded Systems and Microcontrollers' started by neo1111, May 14, 2015.

  1. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    i need some help .[​IMG]
    I made this montage but instead of TIP120 i used tip121 and instead of 1n4004 i used 1n4007.
    With the diode i think is not a problem[​IMG]

    The problem is that that the motor powers everytime i connect the battery.
    I want to stay stood at first and depending on the program to start rotate . (pin from arduino in As OUTPUT).
    I thought the resistor was supposed to keep the motor stopped at first .
    My main concern is : i should change the TIP121 with 120 , and then all will work just fine ?
    I haven't found any TIP120 transistor that's why i used this one .
    P.S. : the battery is a 9V one
     
    Last edited: May 15, 2015
  2. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    your diode is backwards.
     
  3. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    Does the motor run with the resistor disconnected?
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    Look again. It's intentionally reverse-biased. It would be better to connect it across the motor poles, though. I don't think it does any good where it is.
     
  5. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    The diode looks OK on both schematic and breadboard.

    The logic output may not have a low enough VOlow to cut off the transistor fully, although that's probably not so likely with a Darlington - they need 2x Vbe to turn on.

    Its probably worth trying a 10k shunt resistor from base to emitter just to make sure though.

    If you *ACTUALLY ARE* using the transistor radio battery pictured - it won't run the motor long anyway.

    If the 10k resistor doesn't stop it, disconnect the base from the logic and short the base to emitter - if that doesn't turn it off, its shorted.
     
  6. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    But will it perform it's function in that configuration? I'm having a brain freeze trying to picture the current flow without a schematic. Could be the Zyrtec I had to take.
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    The bar (cathode) of the diode should connect to battery +ve. The anode of the diode should connect to the collector.
     
  8. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    the motor runs with/without the resistor
     
  9. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    haven't tried with the 10k rsistor.
    I removed the connection from board and connected the base-emitor but when i connect the battery=>starts rotating the motor.
     
    Last edited: May 15, 2015
  10. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    Did this . The diode got hot in an instant and i pulled it out .
     
  11. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    this is the schematic.i don't have to use the capacitor because it's a brushless motor.Haven't used the 1Mohm resistor as well 2015-05-14 03.06.16.jpg
     
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Sounds like you had the diode (or the battery) the wrong way round.
     
  13. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    If it is a two lead brushless motor it most likely has a built in controller/commutation circuit.
    If it is the case, then you may not be able to vary the rpm externally.
    BLDC motors usually have 3 stator windings and require external commutation.
    Max.
     
  14. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    If you are just operating the motor in an off situation instead of RPM control (I may have misunderstood) but for that low a current motor you most likely could run off of a Mosfet, even a 2n7000 if under 200ma.
    Max.
     
  15. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The proper way to use a TIP120 to control your motor. The diode is now in the correct place. A NPN Darlington transistor is not the preferred way of doing this because of its Vce-sat. A logic-level gate NMOS would do this better.

    66.gif
     
  16. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    The diode would probably be better across the motor to catch the back emf there, it appears to be correctly orientated to not forward bias in normal operation - but I think some Darlingtons have an integral diode anyway - so it could be merely superfluous.

    Perhaps I should have worded it differently - such as "I don't think the diode is causing the problem".
     
  17. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    I want to start and stop it at first but i intend to use u PWM pin to control the rpm .
     
  18. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    Do you have any control over the PWM frequency?
     
  19. neo1111

    Thread Starter New Member

    Jan 11, 2014
    28
    1
    I can use this code in order for my motor to rotate slower/faster --> speed .
    Code (Text):
    1. // Define which pin to be used to communicate with Base pin of TIP120  transistor
    2. int TIP120pin = 11; //for this project, I pick Arduino's PMW pin 11
    3. void setup()
    4. {
    5. pinMode(TIP120pin, OUTPUT); // Set pin for output to control TIP120 Base pin
    6. analogWrite(TIP120pin, 255); // By changing values from 0 to 255 i  can control motor speed
    7. }
    8.  
    9. void loop()
    10. {
    11. }
     
  20. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    The higher the PWM frequency - the less judder/ripple on the motor shaft.

    150 - 300Hz is probably a reasonably good starting point - anywhere near kHz and motor torque will be limited by its winding inductance.
     
Loading...