I have a small solenoid which is to be powered by a DC power supply. Current is 5A. Resistance is 3.5 ohms.

I only want this solenoid to be on for around 20 ms, so I figured a transistor was the best call.

Luckily, I have a function generator so can very easily set the pulse parameters. Naturally, this is the base of the transistor.

I usually just operate in the transistor saturation mode, using no resistor at all on the function generator, and setting V_b = 5V.

The transistor I'm using is the TIP 120 NPN. It is rated for 5A continuous, 8A pulse (maximum.)

Saturation mode has worked great at low currents (<1.3ish A,) but it has started giving me very horrific oscilloscope readings at any collector current larger than that. I think if I were to average the signals out, it could well be giving me the same pulse signal provided by the function generator, but it is oscillating at a very high frequency and amplitude, and it's obviously not the way forward.

I figured that I want to be operating the transistor in a linear regime, where I use high resistance and small currents on the base, and use the gain of this to calculate the base current required to allow the power supply (collector) current to be the desired 5A.

Unfortunately, the gain calculations (mostly transistor datasheets!) have started to really confuse me.

A TIP 120 has a stated gain of 1000, butif I look at the h_fe vs I_c graph, at Ic = 5A and T = 25C, the gain shows to be more like 2800.

Unfortunately, I expect these short pulses of high current to increase the temperature of the transistor momentarily. Does that mean my transistor gain will likely differ during this pulse, resulting in a non-constant collector current during this pulse? If so, would I work on an average temperature's gain value perhaps? I don't know what the internal temperatures get to.

Furthermore, this graph states that this is only for V_ce = 4V. Is the gain graph therefore going to be considerably different for a different V_ce? The solenoid I'm driving has about 3.5 ohms resistance, so V_ce must be (3.5 x 5) = 17.5V.

Essentially, if I could have some guidance in which value of gain to use, that would be ideal. I presume I can then set a suitable voltage and resistance of the base, which are both free parameters.

I have a flyback diode, as this is recommended with any solenoid. I can't remember the part number, but it was something like 20A and 100V so I presume this is perfectly fine.

I've attached my circuit diagram. It's essentially the same as a YT tutorial. Sorry for bad writing, it's microhenryies not milli. My solenoid is on the emitter side (rather than before the transistor collector junction.) This was mostly for convenience, as it made scope readings in the 'standard' configuration read a constant voltage value (V = V_in.) I also guessed the additional ~100mA from the function generator would just help improve magnetic performance of solenoid. If this is a bad idea too, please let me know.

enter image description here

  • \$\begingroup\$ TIP120 is n-p-n transistor. Schematic you show is emmiter follover. Using transistor as switch better connect solenoid between + power supply and collector. Emmiter to minus. \$\endgroup\$
    – user263983
    Mar 7, 2023 at 22:20

3 Answers 3


The TIP120 is a Darlington transistor with shunt resistors. The \$h_{FE}\$ value of 1000 is the minimum, typically it will be more than that. You shouldn't need a lot of drive for it to saturate.

You will be better off using it in a common emitter configuration though. The base current will be dependent on the input voltage, base resistor, \$V_{BE}\$ drop (which will be around 1.4 V for a Darlington) and drop in any load in the emitter path, so using it as an emitter follower adds the voltage drop across the load to the required input voltage. For the stated load of 5 A @ 3.5\$\Omega\$ this will be $$ 5A\times3.5\Omega = 17.5 V$$

So your function generator is going to need to supply about 19 V just for the transistor and load drop, and probably another 5 V or so for the drop across a base resistor if you use one.

Putting the load on the collector side eliminates this problem, the input only has to be enough for \$V_{BE}\$ plus the base resistor drop and, and you will need a base resistor in this case.


I assume this is an emitter follower, with NPN transistor emitter to the solenoid. In that case, the base resistor is not strictly needed, but it's a good idea to use something like 500 ohms to eliminate possible feedback into the function generator. For this to work, (assuming power supply is 24 VDC), you will need about 25 volts to turn the transistor fully ON.

If you want to use a logic level input, you need to put the load from the collector to 24V, and choose a base resistor that will guarantee saturation. Gain may be much lower at currents over 2 amps, but probably at least 100. So 20 mA should be sufficient, which is a 250 ohm resistor.

If the solenoid is rated at 3.5 ohms, 24 VDC will drive it with 6.8 amps, and that is beyond the continuous current rating (5A), although within the pulse rating (8A). You need to check the SOA curves to see if it is OK at your 20 ms pulse duration.

It looks like the 8A peak current spec for TIP120 is for durations of 5 ms or less. So 20 ms may be risky.


Just did some lab tests today, to confirm everything, but your theory answers made everything click for me.

I'll post a generic solution here, in case anyone else needs similar help with different values.

  1. Transistors drop voltage. Most are silicon based, so drop 0.7V.

In my specific case, I'm using Darlington transistors, which are two combined together, so they drop 1.4V.

  1. There are two options for solenoid (load) placement. Option 1, which is probably more unusual, is the circuit diagram I presented above. This is an emitter follower. The load (solenoid) is on the emitter side of the transistor.

In this configuration, the voltage of the base (supplied by my function generator) needs to be greater than or equal to V_CE + 1.4V.

In my low current tests, I was arbitarily inputting voltages into my power supply, to ensure Ohms Law is obeyed, plus a small extra voltage to overcome drops etc. I think the biggest source of my confusion was that I got horrible results at different current values. I think the current has absolutely nothing to do with it (as it was high, around 1A), but it was to do with the voltages I set on my power supply.

This configuration does NOT strictly need a resistance on the base. That's why our current setup with r_b = 0 works at low voltages (Vb >= V_ce + 1.4).

This is still bad practice. A base resistance, and probably a base diode, is thoroughly recommended to ensure maximum protection of the function generator.

OPTION TWO: Have the load (solenoid) in the collector side of the transistor. Pute the load between the power supply and the transistor. In this case, the voltage of the base does not need to be so high. Please correct me if I'm wrong, but the principle of V_b >= V_c + 1.4V still applies, but as my load is before the transistor, the collector voltage is the power supply input voltage, minus the voltage drop of the solenoid. This means Vb can be much lower.

  1. As discussed, in my current configuration, I'd need a base voltage of about 20V. My function generator can only supply a maximum of 10V. I could probably in theory step this up, but I'm borrowing this equipment and it's not needed at all.

Instead, I should probably switch the configuration, so the load (solenoid) is on the collector side of the transistor. In this regime, the base current (and therefore resistance) does matter.

  1. I believe, as I just want to turn this solenoid on and off, that I can ignore the complicated gain Vs temperature at given Vce graphs that come on transistor datasheets. I can just use the given value of gain = 1000 (TIP 120 Darlington) to calculate the base current. As I want 5A collector current, base current should therefore be around 5mA. I should probably look at the transistor graph and gains and experiment a little, as gain is very temperature dependant, but ultimately I need to guarantee that the transistor is saturated. I chose a suitable base current that achieves this, based on calculations and experiments. As very kindly stated, perhaps a 20mA base is best suited for my case.

  2. I had actually tried this second, collector side configuration once, but it gave me horrible noisy values. This is because I did not put any resistance on the bas, so the function generator was outputting 100mA. This is just far too much current, so even though in saturation mode (operating at a logic level,) it's not going to give a clear signal.

  3. Finally, I should simply choose a base current that I know will saturate the transistor every time, but this needs to be properly calculated and considered, through the above.

I hope that's everything and I hope that's correct. I'm still very new to this, so if anyone has any corrections please let me know.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.