|
Interfacing Relay to Microcontroller |
Relays are devices which allow low power circuits to switch a relatively high Current/Voltage ON/OFF. For a relay to operate a suitable pull-in & holding current should be passed through its coil. Generally relay coils are designed to operate from a particular voltage often its 5V or 12V. The function of relay driver circuit is to provide the necessary current (typically 25 to 70ma) to energize the relay coil.  Figure 1 Figure 1 shows the basic relay driver circuit. As you can see an NPN transistor BC547 is being used to control the relay. The transistor is driven into saturation (turned ON) when a LOGIC 1 is written on the PORT PIN thus turning ON the relay. The relay is turned OFF by writing LOGIC 0 on the port pin. A diode (1N4007/1N4148) is connected across the relay coil, this is done so as to protect the transistor from damage due to the BACK EMF generated in the relay's inductive coil when the transisstor is turned OFF. NOTE: This relay driver circuit is to be used only with controllers for using this circuit with other digital IC's like LM 555 use a resistor between that IC's output & the base of transistor. Here we have not used that resistor because the controller has an internal 10k Pull up resistor hence the transistor's base gets the Vcc through that resistor. Because of this Pull UP reistor the controller cannot TURN ON the transistor hence an External Pullup resistor of 4.7k is used. -Amol Shah
Users' Comments (0)
|
|
|