Sum of Products and Product of Sums
- Jun 02, 2022
In general, while designing electronics projects the loads are controlled (switched ON or OFF) using microcontroller block. But, for this purpose the circuit requires relays, acting as controlled switches (for different circuits different types of relays are used). Depending on the signals received from the microcontroller or other control circuits the relay controls the load. The relay consists of continuous power supply and whenever it gets driven or gets control signal then the relay gets activated and loads can be turned ON or OFF. But, primarily we must know what is a relay driver circuit.
Relay Driver Circuit
The circuit used for driving a relay can be termed as a relay driver circuit and it can be designed using various integrated circuits. These relays are needed to be driven for activating or to turn ON. So, relays require some driver circuitry to turn ON or OFF (based on the requirement).The relay driver circuit can be realized using different integrated circuits such as ULN2003, CS1107, MAX4896, FAN3240, A2550, and so on. Here, in this article let us discuss about relay driver circuit using ULN2003. Before discussing in detail about a relay driver circuit, let us know about IC ULN2003.
Relay Driver IC ULN2003
The IC ULN2003A is a Darlington transistor array which deals with high-voltage and high-current. There are various types of relay driver ICs such as a high side toggle switch, low side toggle switch, bipolar NPN transistor, Darlington transistor, N-channel MOSFET, ULN2003 driver IC.
The pin diagram of IC ULN2003A is shown in the above figure which consists of 16 pins. The IC ULN2003A comprises of 7-NPN Darlington pairs as shown in the internal schematic diagram and is typically used to switch inductive loads
Relay Driver Circuit using ULN2003
It is difficult to use a number of relays with transistors, so, relay driver IC ULN2003A can be used for availing more relays. We can use seven relays with relay driver circuit using ULN2003 and the relay driver circuit using ULN2803 enables to use eight relays. The above circuit represents the interfacing of PIC microcontroller (PIC16F877A) with relays using a relay driver circuit with ULN2003. The clamp diodes are built in these relays driver ICs and which eliminates the usage of freewheeling diodes.
The program that can be used for turning the relays ON and OFF is given below with delay time of one second.
TRISD = 0x00; //PORT D is made as output
PORTD.R1 = 1; //Relay 1 turns ON
PORTD.R2 = 1; //Relay 2 turns ON
PORTD.R3 = 1; //Relay 3 turns ON
PORTD.R4 = 1; //Relay 4 turns ON
PORTD.R5 = 1; //Relay 5 turns ON
PORTD.R6 = 1; //Relay 6 turns ON
PORTD.R7 = 1; //Relay 7 turns ON…and so on.
Delay_ms(1000); // 1 second Delay
PORTD.R1 = 0; //Relay 1 turns OFF
PORTD.R2 = 0; //Relay 2 turns OFF
PORTD.R3 = 0; //Relay 3 turns OFF
PORTD.R4 = 0; //Relay 4 turns OFF
PORTD.R5 = 0; //Relay 5 turns OFF
PORTD.R6 = 0; //Relay 6 turns OFF
PORTD.R7 = 0; //Relay 7 turns OFF
Delay_ms(1000); //1 second Delay
Based on the signals received from the microcontroller the relay driver circuit drives the relay or relays ON and OFF, such that controlling the operation of loads connected to these relays.
Practical Implementation of Relay Driver Circuit
This is an innovative electrical engineering project that eliminates the power supply interruptions by auto power supply from (integrating and controlling) the four different electric power sources such as solar power, mains power supply, generator, and inverter. This project utilizes microcontroller of 8051 family which is interfaced with four switches (these switches or selection keys are assumed to be four different power sources mentioned above). Thus, the absence or failure of specific power source can be represented by pressing a particular switch or key.
The project consists of different block such as microcontroller block, power supply block, relay driver, relays, LCD display, and load (here a lamp is used for demonstration purpose) as shown in the block diagram. The input signals to the microcontroller are given using these press switches. Thus, the microcontroller generates the appropriate output signal and is fed to the relay driver circuit using ULN2003. Hence, the relay driver circuit drives the appropriate relay based on the control signals received from the microcontroller. So, the load gets turned ON by utilizing the available power source. The source that is used for turning ON loads can be displayed on the LCD display.
Do you know other practical applications of relay driver circuit using ULN2003? Then, share your views, comments, ideas, and suggestions by posting in the comments section below.