This circuits can help begginers to understand a transistor and use it for their ciruits. i will explain the general working of the transistor as a swithch and finally will give you few ideas of how all i used it.
Binary Output with a transistor:
1) Design a circut which allows a PIC processor to drive an LED array. This LED array has the following properties:
Vf @ 80mA = 10.2V ( six red LEDs are placed in series, giving 6 x 1.7V = 10.2V)
Assume that the PIC is only capable of driving 10mA at 5V.
Step 1. Find a transistor which can withstand 80mA.
110 < hFE < 450 ——>meaning you can count on a gain of atelast 300
max IC (Sat) = 200mA ——>meaning this can take 200mA. 80mA is quite small rite.
VCE(Sat) = 0.25V ——>a rough estimate of VCE at saturation
VCEO = 45V ——->meaning this transistor can take +45V when turned off
Step 2: Find a power supply bigger than 10.2V. Arbitrarilly assume a +24 supply.
Step 3: Find Rc to limit the current to 80mA
RC =( 24V-10.2V-0.25V)/ 80mA = 170 ohms
Step 4: Find RB to saturate the transistor. At the lowest gain, to put you just at the point of saturation,
Ib = ICE/hfe = 80mA /150 = 534uA —->150 is typical Hfe for BC107B in datasheet*
RB = 5V-0.7V/534uA = 32kohm
Pick R smaller than this to assure you saturate this stage. Let R = 10k.
In this pic that i got from a random site kindly overlook the ZTX1051A transistor with Hfe>300. i have shown you calculations for BC107.
000000000000000000000000000000000000000000000000000000000000000000000
2) Design a circuit whichuses a single output from the PIC processor, and allows a PIC processor to drive this motor in the clockwise direction at either 0% speed (0V) or 100% speed (+5V). Assume the motor draws 470mA at +5V.
Step 1: Pick a transistor. I'll stick with a BC107 because I like this transistor.
Step 2: Add the motor to the collector. You don't need a current limiting resistor since the motor's armature resistance and back EMF limit the current to 470mA @ 5V.
Step 3: Add RB to saturate the transistor. Worst case, when the gain is minimum (300) and you're just at the point of saturation:
IB = ICE/Hfe = 470mA/150 = 3.14mA
RB = 5V-0.7V/3.14mA = 5.48kohm
Step 4: Just to make sure that you saturate the transistor, make Rb smaller than this. Let RB = 2k.note: The inductance in the motor stores energy in a magnetic field. When the current is turned off (the transistor turns off) the energy in the field has to go somewhere. To save the transistor, place a diode across the motor to allow the collapsing field to drive current through the diode – saving the transistor
again the ZTX1051A is replaced by BC107 and the current at 2k at base resistance is 3.14mA.
000000000000000000000000000000000000000000000000000000000000000000000
3) Design a circuit which can drive the motor forward and in reverse using transistors:This is the transistor version of my ULN2003 H-Bridge
You can use the same circuit as before, only add another NPN and two more PNP transistors. The equations work out
the same for each transistor:
NPN:BC107
OFF: put the input to 0V. This assures that 0A flow through the diode.
ON: make RB = 2k to saturate this transistor when 470mA flow though it.
IB > 470mA/Hfe = 3.14mA
RB < 5V-0.7V/1.57mA = 5.48kohm
Let RB = 2k.
PNP: BC177(since I picked a transistor with the same gain (Hfe or b)
OFF: put the input to +5V. This assures there is no potential across the base diode and no current flows.
ON: Make RB = 2k to saturate this transistor when 470mA flows through it.
IB > 470mA/Hfe = 3.14mA
RB < 5V-0.7V/3.14mA =5.48k
Let RB = 2k
![bridge](https://i0.wp.com/static.flickr.com/46/145174498_a4a0bc5883.jpg)
That will do…..
000000000000000000000000000000000000000000000000000000000000000000000
MY IDEAS TO USE TRANSISTORS AS SWITCH:
1) I connected my local FM radio reciever to my parallel port. There are only two switches to operate it. one for selecting channel and the other for reset . just connect it this way below and you can write a code in VB or C to address the ports and to scan or reset.
![fm](https://i0.wp.com/static.flickr.com/55/145191586_f2d9fd49ff.jpg)
The two black thigs are the switches.. just pic the two sides which the switch shorts on pressing and make this combination and get your electronic switch working.
2) I have connected my calculator and microcontroller using the same concep.. I will put those pics later as my friend is havin the digi as of now!!
Cheers trying the circuits. Keep giving your coments plas (it will cheer me up!!) –Madan