How to use a NPN transistor correctly

Wendy

Joined Mar 24, 2008
23,797
Don't forget to use a diode swamping for the motor. It will prevent back EMF from damaging the transistor whether it is a FET or a bipolar.
junk.png
 

Thread Starter

FelixB

Joined Dec 26, 2022
33
To state everything clear:
Did you remember to add the diode across the motor? If not, it won't work for long.
I don't know what the diode is for, can you maybe explain it to me?
1) You don't need the 3V supply. Connect the base resistor directly to 6V.

2) Why do you need the transistor in the first place? Just connect the motor to the 6V supply.
1) & 2) As @sghioto said, I want to control the transistor with a 3.3V microcontroller
If so, the micro is going to struggle to provide the 20mA drive.
The microcontroller provides only 3mA. The datasheet of the transistor gives different ß (or h how they call it) for different Ic current and with 10V.
1686486045265.png
But the microcontroller only supplys 3.3V so I don't know which value for ß I can use to calculate.
 

Ian0

Joined Aug 7, 2020
13,158
06EAB792-960C-4A16-BED8-FE4B1905BF12.jpegUsing this circuit, the first transistor you don't need even to think about its Hfe. The current it takes from the processor will be small enough.
The second transistor is being operated as a switch, so refer to the "saturation characteristics" in the datasheet, and you will see that Ib will be Ic/10.
R will then be (3.3V-0.6V-0.6V)/Ib
 

Thread Starter

FelixB

Joined Dec 26, 2022
33
If so, the micro is going to struggle to provide the 20mA drive. I would therefore suggest (in the absence of a suitable low-threshold FET) an emitter follower to drive the output transistor - with its collector connected to 3V, rather than a darlington which would have a higher voltage drop.
How would such a emitter follower work? My microcontroller can only supply around 20 - 25mA. Would that be enough?
 

Ian0

Joined Aug 7, 2020
13,158
You need Ib=1c/10 in the main transistor, which is 20mA for a 200mA load.
The emitter follower is in its linear mode, so its Hfe will be closer to the datasheet value of 75.
so it requires 20mA/75 to give 20mA output, that's 266uA.
But Vce is not 10V as in the datasheet, so its gain will be somewhat less, but your micro pin can probably supply 4mA, so it would have to be a lot less than 75 to cause a problem. The actual value is unpredictable, you just have to take the worst value and make sure it is good enough.
Bearing in mind that the base current also contributes to the emitter current, the gain only has to be better than 1.5, and you can be sure it will manage that.
 

Wendy

Joined Mar 24, 2008
23,797
The 1/10 rule is a engineering tool that is guaranteed to work the first time, since you are so close to the range you could audition a transistor and see if it works. There is a good chance it will. Just be prepared for the possibility it won't.
 
Top