First lets talk about component used
:12v Dc Relay
:Jumpers & Bread Board
Most of the time people get confuse on how to use a transistors to switch a device on belive in me that with this article you will get your self familiar with transistor .
We have different types of transistor mostly they are classify NPN and PNP are the commonly one am going to talk on
HOW TO KNOW WHAT TYPE OF TRANSISTORS (i.e IF THE TRANSISTOR IS NPN or PNP)
First by now I belive we all know how to use a multimeter generally or incase you don’t, switch your multimeter to diode symbol which is usually the continuity on your multimeter then place the probe on your transistor and check for high resistance the terminal with higher resistance is the emitter why base is the common among, the collector has the less resistance
Place the Black probe of the multimeter on your transistors and check if it read,then use the RED probe to check for collector and emitter.the Black probe on transistor BASE Terminal and RED probe Either emitter or collector, the higher resistance is the emitter terminal.
Remembered PNP takes in Negative Output Signal to bias it operation i.e if you are using PNP and you bias it with Positive output signal it will not work,in this case you connect your collector to GND and the emitter to Negative output of your Load and positive of your load to Vcc
Place the RED probe of the multimeter on your transistors and check if it read,then use the BLACK probe to check for collector and emitter.the RED probe on transistor BASE Terminal and BLACK probe Either emitter or collector the higher resistance is the emitter terminal.
Remembered NPN takes in Positive Output Signal to bias it operation i.e if you are using NPN and you bias it with Negative output signal it will not work in this case you connect your collector to Negative output of your load and positive output of your load to Vcc the emitter to GND.
A relay is an electromechanical device for switching higher load with lower power we also have various types of Relay Solid state Relay etc, I used SRD-S-112D relay which has five terminal and the pins are
Dc in which can be 5volt or 12volt relay COM,NORMALLY OPEN (NO),NORMALLY CLOSED(NC),
In my case I use Arduino Nano Microcontroller to drive the transistor and I declare Pin7 as output to switch ON and OFF Transistor which drives the Relay in Respect to Time
I use separate powers supply 5volt and 12volt and I use 5v for Microcontroller and the 12v to drive my Relay the output of my Microcontrollers is connected with 4k7 Resistor to the base of my transistors and the emitter to common Ground which is GND and the collector of my transistor to relay input and other terminal to 12v Vcc and the common of my Relay to Load Negative and load PositiveSource and Normally Open which is NO to Negative source