Maker Pro
Maker Pro

Basic transistor switch

SimonnomiS

Apr 5, 2023
1
Joined
Apr 5, 2023
Messages
1
Hello,
I am very new to electronics and I hope some one can verify this basic circuit. I will use an ESP32 O/P to switch the transistor.The load is 25mA Thanks in advance.bc850.png
 

kellys_eye

Jun 25, 2010
5,699
Joined
Jun 25, 2010
Messages
5,699
calculate the current flowing in the base resistor and multiply it by the current-gain (beta) of the device. Beta is a figure obtained from the datasheet or can be measured yourself.

When used as a switch, the transistor is driven into saturation - another parameter obtained from the datasheet and/or measurement.
 

danadak

Feb 19, 2021
410
Joined
Feb 19, 2021
Messages
410
The rule of thumb to force the transistor into saturation is Ib = Ic / 10.
Its a term called forced beta in the industry. Generally speaking when
we use a transistor as a switch we want the Vce to go as low as possible,
so that its power dissipation is kept low and the switch acts as close as
possible as a short, like relay contacts typically do.

So the base R, Rb =~ ( Voh - Vbe ) / Ib =~ ( Voh - Vbe ) / [ Ic / 10 |

Voh comes from micro sdatasheet, when an outpuit is turned on to high
logic level, and given at a specific current. Some datasheets show a typical
graph of Voh versus load current.

Typical curves that apply (2N3904 as example) :

1680696212981.png

As you can see in the graph, 10 mA case, we get a low Vce when we force 1 mA into
the base. Any more base current has very little egffect, eg. no more than Ic / 10 is
needed in most designs.

Note some transistors have even lower Vce when collector and emitter are reversed,
but takes more base current then Ic / 10 to get that increased performance.

Regards, Dana.
 
Last edited:

Alec_t

Jul 7, 2015
3,354
Joined
Jul 7, 2015
Messages
3,354
The circuit in post #1 should be fine, unless the load is inductive. If that's the case then there should be a reverse-biased diode connected across the load to suppress any back-emf voltage spike.
 

danadak

Feb 19, 2021
410
Joined
Feb 19, 2021
Messages
410
One mod to the post circuit in #1, connect a 10K - 20K R from
transistor base to ground. That keeps load off while processor
is powering up. Most processors power up with GPIO in tristate,
so a floating base of transistor can pick up noise and its leakage
could cause premature turn on.

1680706531733.png


Regards, Dana.
 

AnalogKid

Jun 10, 2015
2,739
Joined
Jun 10, 2015
Messages
2,739
I hope some one can verify this basic circuit. I will use an ESP32 O/P to switch the transistor.The load is 25mA View attachment 58638
You don't say how you determined the value of the base resistor, but it is correct. The circuit should work as intended.

As indicated in posts #4 and #5, if the load is a relay coil or some other form of inductor, you should add a suppression diode across it.

ak
 

crutschow

May 7, 2021
661
Joined
May 7, 2021
Messages
661
calculate the current flowing in the base resistor and multiply it by the current-gain (beta) of the device.
As noted frequently on these sites, that's not good design practice when using the transistor as a switch.
A forced beta of 10 is the usual value used.
 

kellys_eye

Jun 25, 2010
5,699
Joined
Jun 25, 2010
Messages
5,699
As noted frequently on these sites, that's not good design practice when using the transistor as a switch.
A forced beta of 10 is the usual value used.
You only took the first part of my post - when added to the rest of it, i.e. saturation, there's a distinct difference. My post was on the basis that this seems like a homework question and that 'helpful advice' is preferred over a simple 'answer'.
 

crutschow

May 7, 2021
661
Joined
May 7, 2021
Messages
661
You only took the first part of my post - when added to the rest of it, i.e. saturation, there's a distinct difference.
Okay.
But you just said there was a difference, you didn't say what the normal criteria is for a saturated transistor, so that's why I stated it.
 
Top