Interfacing Relay with PIC Microcontroller

Interfacing Relay circuit

To control our high voltage device like home appliance by pic microcontroller, we have to have clear idea on interfacing relay with pic microcontroller. Here I try to answer your very important question with simulation that how to interface relay with pic microcontroller?

To discuss it elaborately I have to discuss what is relay? How it work? And how we can use it in our project?

Relay is an electrically operated switch work on electro-magnetism principal here you see the block diagram of relay. Here you see three pin named NC, NO and COMMON. Now NC stands for normally closed, NO for normally open and common stands for common pin for connecting NC or NO. P1 and P2 pin are for providing control signal to relay.

Interfacing Relay

Now working principle of relay is very simple when P1 and p2 get a certain amount of voltage then coil between P1 and P2 get energized and create a magnetic field around it. For this magnetic field the metal switch liver which is attach to the common pin is attracted towards the NO pin and connection made between NO and common pin.

So by using relay switch we easily turn on or off any high voltage device by microcontroller. See the block diagram below to how we turn on or off a 230 volt AC bulb by micro controller.

 

Interfacing Relay with PIC Microcontroller :

To interface relay with microcontroller we need a driver circuit to drive the power to relay. See the block diagram of driver circuit which I used in my project. Here I used diode D1(1N4148WS), Resistor R1 (1K), Transistor T1 ( BC547), 12 v power supply and 6V relay.

Interfacing Relay circuit

Leave a Comment

Your email address will not be published. Required fields are marked *