Maker Pro
Maker Pro

Need help - TIP122 transistor

mikgol

Jul 6, 2013
87
Joined
Jul 6, 2013
Messages
87
Hello friends,

I'm following this tutorial to get bi-directional motor control of a 5v drill ...

http://www.me.umn.edu/courses/me2011/arduino/technotes/dcmotors/bidirectional/bidirMotor.html

... how do I calculate the resistor value to use for the TIP122? The motor is actually 3.7v, but i'm giving it 5v (maybe it will burn out?) because I have a 5v UBEC.

Do I need to measure the current to work out the resistor? The UBEC is rated at 8A (MAX 15A). I want to get as much power as I can to the DTDP relay.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,651
Joined
Nov 17, 2011
Messages
13,651
The motor is actually 3.7v, but i'm giving it 5v (maybe it will burn out?)
Your chance are good to destroy the motor by overloading it with 5V.
Depending on the power (current consumption) of the motor you have several options:
  1. low power: use a resistor in series with the motor to limit the current (R = 1.3 V / Imotor).
    Or use a linear voltage regulator to create 3.7 V for the motor.
  2. high power: use a switch mode regulator to create 3.7 V for the motor. This wil alos serve to increase the battery life since less power will be drawn than with a libnear regulator or series resistor.
I want to get as much power as I can to the DTDP relay.
What do you mean this? You should operatethe relay at its nominal coil voltage (I guess in your case this is 5 V?). Using a higher voltage to drive the relay coil will not allow more current to flow through the contatcs. It will get thge relay to switch a bit faster and it will definitely dissipate more power in the form of waste heat.
 

mikgol

Jul 6, 2013
87
Joined
Jul 6, 2013
Messages
87
Hey Harald,

Thanks for your quick reply. For simplicity, I will keep it at 5v for now, and use PWM (via the TIP122) to limit/stop from burning out. It's for a vehicle, so would be nice with an "afterburner" option (100% PWM).

The motor/drill is cheap, so if it burns out it burns out, and I'll get another one and do as you suggest to lower the voltage.

The resistor I need a value for is the 1K one on the TIP122 (not the 1K one for the NPN transistor to turn on/off the relay) ...

bidir-dwg.jpg


... I was wondering if 1K on the B is specific to the current on the motor? Or should I keep both resistors at 1K regardless of motor draw?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,651
Joined
Nov 17, 2011
Messages
13,651
I will keep it at 5v for now, and use PWM (via the TIP122) to limit/stop from burning out.
PWM is a good idea. No didn't menion this in your 1st post. It will actually give you a bit more torque from the motor.

The resistor I need a value for is the 1K one on the TIP122
This resistor is not critical. The TIP122 has a DC current gain of at least 1000. Therefore base current Ib is Ic/1000 (or more to ensure saturation). Base-emitter on voltage is max. 2.5 V. When driving the base from a 5 V source, this means the voltage drop across the base resistor is Vrbase = 5 V - Vbe = 2.5 V.
The resistor is calculated from Ohm's law: Rbase = Vrbase/Irbase = Vrbase/(Ic/1000) = 1000 * 2.5 V / Ic.
Put in Ic (measured at 5V across the motor) to get Rbase.

Note that the TIP122 is not the best choice for this application as the voltage drop Vce is ~2V due to the Darlington construction of the transistor. In your case this voltage drop is useful to reduce the voltage acros the motor, however.
 

mikgol

Jul 6, 2013
87
Joined
Jul 6, 2013
Messages
87
Sweet, thanks again brother, i'll solder it up and see if it works :)
 

mikgol

Jul 6, 2013
87
Joined
Jul 6, 2013
Messages
87
Damn, doesn't work - I don't hear the relay clicking :(

I just realised that I have a 12V relay, but am supplying 5v to the coil. Is there an easy way to make this relay work without a 2nd (12v) power supply?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,651
Joined
Nov 17, 2011
Messages
13,651
I just realised that I have a 12V relay, but am supplying 5v to the coil. Is there an easy way to make this relay work without a 2nd (12v) power supply?
There's a way, not an easy one: Use a step-up converter to create a 12 V supply from the 5 V available.

Or use a switched capacitor inverter to create a -5 V rail from the + 5 V. Connect one pin of the relay coil to -5 V, connect the other pin to + 5 V via a PNP (!) transistor. The result is 10 V across teh relay coil which is often sufficient to actuate the relay. The inverter needs to be capable of delivering the max. coil current.

Note that in any case you need to protect the transistor from voltage spikes which are generated by the relay coil at the moment of turn off by a free-wheeling diode (D1). The free-wheeling diode is in reverse polarity to the operating voltage!
This diode is lacking in your schematic.

upload_2016-10-28_13-41-51.png
 

Attachments

  • upload_2016-10-28_13-41-3.png
    upload_2016-10-28_13-41-3.png
    62.7 KB · Views: 86

mikgol

Jul 6, 2013
87
Joined
Jul 6, 2013
Messages
87
Thanks again Harald. That sounds like something beyond my limited electronics knowledge, but it's good to know for future reference.

For simplicity I think I'll just put a separate 12v supply in my vehicle, which can be used to power the arduino as well, which I guess will have the added benefit of isolating motor batteries (which will go flat quicker).

I'll also put in that diode, cheers for the heads up
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
but the motor only moves in one direction (when the relay is powered)

You probably have the connections wrong. The most likely thing is that you have assumed that the centre connectors are common. They aren't always arranged that way. Did you check?

If the relay really is of the type indicated in the photo on the website, then the datasheet can be found here. (and it confirms that the common connection is on one end).
 

Herschel Peeler

Feb 21, 2016
401
Joined
Feb 21, 2016
Messages
401
Hello friends,

I'm following this tutorial to get bi-directional motor control of a 5v drill ...

http://www.me.umn.edu/courses/me2011/arduino/technotes/dcmotors/bidirectional/bidirMotor.html

... how do I calculate the resistor value to use for the TIP122? The motor is actually 3.7v, but i'm giving it 5v (maybe it will burn out?) because I have a 5v UBEC.

Do I need to measure the current to work out the resistor? The UBEC is rated at 8A (MAX 15A). I want to get as much power as I can to the DTDP relay.

The TIP122 will have some drop across it, so the voltage to the motor won't be the whole 5 V. The value of the base resistor for the RIP122 depends on collector current divided by the gain of the tIP122 under those conditions. That gives you base current. Divide that into applied voltage minus base voltage.
 
Top