Arduino Based multiple Device Control using Interrupt

In the project “Arduino Based multiple Device Control using Interrupt” you will learn how to control multiple appliance with two switches by using the concept of interrupt. In this prototype we are going to control four devices using two interrupt pin (switch). You can increase or decrease the number of devices according to your requirement but number of switches is same (two). When button is pressed, interrupt sun-routine is called and control algorithm runs.

Features of Arduino Based multiple Device Control using Interrupt:

  1. Only two button switches are used to control multiple appliance using the concept of interrupt.
  2. An I2C LCD is used to show the status of device.
  3. Simple and interactive design.

Circuit Description Arduino Based multiple Device Control using Interrupt

The circuit of Arduino Based multiple Device Control using Interrupt is build around Seeeduino Nano, I2C LCD, two push button, ULN2003 IC, and few other electronics components like resistor, capacitors and diode. Seeeduino nano board is same as arduino nano but with extra features and comes in less then half price of arduino nano.

device-control-using-interuptFigure: Author Prototype

Features of Seeeduino Nano

  1. Size of board is same as arduino nano i.e.43mm x 18mm
  2. USB type C for programming and power (for symmetrical and reversal).
  3. On-board Grove I2C connector (you can connect I2C device directly by using grove).
  4. Cheap in compare to arduino nano.

Check out the link here: Seeeduino Nano

Display Unit:

Here, we are using I2C LCD with grove for easy connection. Two power supply pin VCC and GND of LCD is connected +5V and GND of Seeeduino nano where SDA and SCL pin of LCD is connected to seeeduino nano A4 and A5 (SDA and SCL) of Seeeduino nano. Appliance name and its status is shown over this LCD.

Arduino Based multiple Device Control using Interrupt

Switching Circuit:

Switching circuit is designed arduino ULN2004 and 5V relay. Digital pin D8 to D11 is used to control the relay through ULN2004 IC. When arduino receive command for appliance ON, arduino pin goes high. Which further make input pin of ULN2004 high through diode and as a result output of ULN2004 become low and relay energized. Similarly, when arduino receive command for appliance OFF, arduino output pin goes low. This low output of arduino pin make ULN2004 pin low and as a result output pin of ULN2004 become high and relay de-energized.

If you wish to design your own Relay switch circuit using transistor then please checkout this article. How to Make Relay Switch Circuit

Two button switches is connected to two interrupt pin of Seeeduino Nano as shown in circuit diagram. RC network (Resistor and Capacitor) is connected across switch in order to compensate Deb-ounce.

Working of the Circuit.

  1. Assemble all the circuit as shown in circuit. Here, I am using ready made relay module for testing.
  2. Upload the program to your board.
  3. A message with “Press Next Button to Procedure” is appeared over LCD. There you have to press Next Button (Switch connect to D2).
  4. And then Press “Set Switch” (Switch connected to D3) to switch ON the corresponding LOAD. And then again press Next Switch.

Software:

Software is written in arduino programming language and compiled using arduino IDE.

 

Leave a Comment