Now my question is for 220ma , should I consider hfe as 10 or 40 for calculation of base resistor value.
If I consider it as 10, RB considering drops of input voltage would be (5-0.6-0.7)/0.22/10 =168 ohms
If I consider it as 40, RB considering drops of input voltage would be (5-0.6-0.7)/0.22/40 =672 ohms
Start with a standard resistor value 180 ohms, measure the voltage VCE(sat).
If the transistor is saturated (~.8v) and doesn’t get hot you are good to go.
If your desire is to keep the base current as low as possible, you can raise the base resistor value and monitor the VCE(sat) voltage and case temperature.
Hfe only applies when a transistor is being used in its linear region. When you’re looking to drive the transistor into saturation, as you are doing when using it as a switch, you use 10% of the desired collector current for driving the base. Yes, the result may be the same but the reasons are quite different.
Most switching transistor datasheets will show the relationship between different base currents and the resulting collector voltage at different load currents. If this is not available, go with the 10% number and check the results, the want the dissipation to be as low as possible which means the the collector voltage needs to be as low as possible. Larryd explained the proper way to do it if the datasheet isn’t available or doesn’t define things for you.
For switching more than ~200mA, use as much base current as the Arduino pin can comfortably handle.
That means a 220 ohm resistor for a Nano (<=20mA).
The last thing you want is for the transistor to get out of saturation, and pop it's heated top.
Are you sure it's 120-220mA motor current.
Maybe that's the free-running current draw, which is not relevant.
Stall (start-up) current could be a lot higher.
Leo..
Wawa:
For switching more than ~200mA, use as much base current as the Arduino pin can comfortably handle.
That means a 220 ohm resistor for a Nano (<=20mA).
The last thing you want is for the transistor to get out of saturation, and pop it's heated top.
Are you sure it's 120-220mA motor current.
Maybe that's the free-running current draw, which is not relevant.
Stall (start-up) current could be a lot higher.
Leo..
I have used a 180 ohms resistor and the transistor doesn't seem to be heating up. So, this should be good to go, right ?
larryd:
Start with a standard resistor value 180 ohms, measure the voltage VCE(sat).
If the transistor is saturated (~.8v) and doesn’t get hot you are good to go.
If your desire is to keep the base current as low as possible, you can raise the base resistor value and monitor the VCE(sat) voltage and case temperature.
You mean VBE=0.8 is sat voltage ? and VCE should be between 0.1 and 0.3 at saturation ?
Measure the voltage ‘collector to emitter’, Vce(sat) when the transistor is on.
If this voltage is between .2 to .8 you’ll be good.
Maximum transistor power .8v X 200mA = .16 Watts
EDIT
Yes it could be .2v thru .8 depends on the NPN used and the collector current.
Thanks for the reply. Also, I need to connect a RO solenoid (24V DC 500mA) from my arduino nano. I am going to use a TIP120 NPN for driving this. For this transistor, VBe=1.4V and should hfe considered as 10 or 2000 (as per datasheet) to calculate base resistance. ?
Since I am planning to drive this 24V solenoid with a 12V supply, the current needed I believe would be doubled. Hence I believe I need 1A from TIP120.
Thank you. Will try it out and see if a heat sink is needed. Also, I'm planning to test a 12V water pump (R385 diaphragm type) which has an operating current of 0.5-0.7 amps. So, as per your calculations I believe i should use a 330 ohm resistor in place of 680 ohm resistor for 1 amp of current for the motor.
Also, I will try both the solenoid and motor with a logic level N channel mosfet, IRLB8748 or stp90nf03l. Is there a necessity of connecting any resistor while using this mosfet with the arduino nano pins. I will be using snubber diode (IN4007) across motor and solenoid when using MOSFET. But for TIP120, I believe it has internal snubber protection built in.
Another question I had was, what will the max current that the TIP120 be able to provide for a 12V DC motor or 24V solenoid ? It says its rated for 5 amps in the datasheet.
I believe that you mean "Q1" reference in the attached image instead of "C1" for connecting resistors (220R and 10k) when a logic level N channel mosfet like IRLB8748 or stp90nf03l is used to drive the 12V 1amp motor or 24V 500mA solenoid.
larryd:
Coordinates “C” “1”
Q2 is your N channel MOSFET circuit.
Coordinates “B” “1”
Q3 is your darlington transistor.
As per C1, I connected P90Nf03L (STP90NF03L) mosfet, snubber diode (IN4007) and the solenoid (12V) works when connected with the arduino. But sometimes, the solenoid is not turning on. I am trying to figure out whether it is due to poor soldering/wiring (loose conenctions) from my side or there is some other issue. I check the voltage of the pin going from the arduino pin to mosfet which shows as 5V. When I set a high from arduino to the pin connected to the solenoid, what voltage should I measure across the mosfet pins to make sure it has turned on ?