Transistors
Transistors are semiconductor devices, that are made up of what is called a PNP or NPN junction. Similar to a diode, when the junction is in forward bias, the transistor can be used as a switch or an amplifier.
![NPN vs PNP NPN vs PNP](https://images.archbee.com/Qn-KnoMlHMwLEOpt8DNF3/Y3Y6LDg12Fv6nmirRJpxN_image.png?format=webp)
As a switch, the transistor can be used to drive a much higher load than what a microcontroller can drive natively and can be used as an output buffer.
In principle, as far as the microcontroller is concerned, using the transistor would be the same as driving or switching an LED on. The output would be driven high or low and this would change the state of the transistor base-emitter of base-collector junction and that would change the state of the transistor.
In most cases, the PIC MIcrocontroller with a 5Vdc output meets the requirements to drive the Base-Emitter junction of an NPN transistor. The NPN transistor, for example, the BC237 can be connected directly to the Microcontroller.
![Document image Document image](https://images.archbee.com/Qn-KnoMlHMwLEOpt8DNF3/w2Wak_pw9T6jKvx_3dyEB_image.png?format=webp)
Transistors do add a certain versatility in the way that a device is switched on and this improves the flexibility of the application.
Useful as a switch, in a simple on-off application, transistors find uses in driving a DC motor, and PWM Lighting Controls.
ο»Ώ
ο»Ώ