Friday, May 2, 2014

IntoElectronics Series | 01 Transistor as Switch

The first usage of transistor in electronic devices is switching. Transistor can switch the circuit on/off by given an input voltage. In this article we will show you how to use transistor capability of switching current by impalement NOT gate.

Materials:
  • 2 NPN transistors
  • 2 LEDs
  • breadboard
  • source of voltage(i.e. battery)
  • wires 


Configuration
Given:
2 LEDs: LED1 and LED2
2 Transistors: Q1 and Q2
We will make LED1 by default switched on, and LED2 switched off, when we push a button (provide current) the LED1 will become off and LED2 will be turned on. When we release the button the LED1 will be switched on and LED2 will switched off. The following video illustrates the releasing process “by cut off the current”).


To make such circuit to work we have to provide the NOT gate, when the input to this gate is on(1) its output will be off (0), when the input is off(0) it provides on(1). Transistor facilitate the switching option like that, so to start implement the NOT gate, let’s take look of how transistor configure to the circuit so it can work as switch.
Transistor has two types: NPN or PNP

To make any one of them work you have to use their legs (collector, base, emitter). Let’s focus in the NPN type (the same applied to the PNP but by converting the signs)

NPN Transistor
If you connect the transistor in the following manner:
Collector -> ground (low voltage) -> to the cathode of LED
Base -> high voltage
Emitter -> ground
The emitter-to-collector circuit will be closed and therefore the transistor will act as switched on.
When base changed to be low voltage, the emitter-to-collector circuit will be open (no current), therefore the transistor will act as switched off.
When collector is connected to high voltage instead of low and with the anode of LED.
if base is connected to low voltage, then the emitter-to-collector circuit is open and therefore the output to the LED is high because it connected to high voltage
if base is connected to high voltage, then the emitter-to-collector circuit is closed, and therefore the current will move from source voltage (provided to collector) to the emitter which makes the voltage output to the LED zero.


so the two configuration of these transistors will be used to achieve 01,10 result  for LEDs:


Schematic diagram:

Simply these diagrams tell you:
Q1
C -> Ground + LED cathode
B-> R1
E-> Ground
Q2
C-> 3V + LED anode
B->R1
E-> Ground
LED1
Cathode -> Q1_C
Anode -> R2 -> 3v

LED2
Cathode -> Ground
Anode -> Q2_C

C: collector, B:base , E:emitter

When you connect to B a low voltage:

When you connect to B a high voltage:

And that’s all.

Resources:
Electronics Projects: How to Create a Transistor NOT Gate Circuit: http://www.dummies.com/how-to/content/electronics-projects-how-to-create-a-transistor-no.html