# How to choose the current-limiting resistance of the transistor when making a switch circuit?

It is a very common circuit for a transistor to be used as a switching circuit. Basically all Electronic devices have applications to its circuit. So when making a switching circuit, how to choose the current-limiting resistance of the transistor? If this problem is not clear, it may cause loopholes in your circuit design.

It is a very common circuit for a transistor to be used as a switching circuit. Basically all electronic devices have applications to its circuit. So when making a switching circuit, how to choose the current-limiting resistance of the transistor? If this problem is not clear, it may cause loopholes in your circuit design.

Below I will use the actual application in the project to understand these issues;

When the transistor is used as a switching circuit, the transistor must be in a saturated state. When in a saturated state, β*Ib>Ic;

Let’s verify whether the above circuit is in a saturated state. The above picture is a solenoid valve switch circuit built with a transistor D882. P25 is a 24V drive solenoid valve. The solenoid valve drive power is 9W. It can be seen that when the transistor is used as a switch circuit , The collector current Ic=9/24=0.375A, because D882 is a SI tube, the BE voltage drop is 0.7V, when the transistor is turned on, IB=(3.3-0.7)/1000=2.6mA, we have The purchased D882 has a magnification of 160-320.

When the transistor is turned on, Ib*β(min)=2.6*160=416mA, because the current required by the collector of the transistor is only 375Ma, which satisfies β*Ib>Ic, so this circuit can meet the needs of the transistor when it is a switching circuit. However, β*Ib is only slightly larger than Ic and not much larger than Ic, indicating that the triode has only reached a shallow saturation state.

Therefore, generally for the stability of the circuit, Ib*β(min) is better than 2Ic, so here R76=(3.3-0.7)/(2IC/160)=554 ohms, so when the value of R76 is better than 556 Ohm; but considering that the current drawn by the IO port of the single-chip microcomputer is generally about 8MA, the current-limiting resistance cannot be too small, otherwise the IO port drive capacity of the single-chip microcomputer is not enough.