A common scenario turning OFF devices on time is always a big issue in this busy life. People forgot to turn the device OFF after a certain period of time. Like plugging your mobile, laptop, and other device's charger overnight and forgetting to turn them OFF. And again if we want any device to turn it ON at a particular time and remain for some time and after that, it should be turned OFF. Apart from this to protect from overheating machines you can use it in the industry for machines to schedule the ON-OFF time. These are some of the common issues which make this project so special. As this tutorial includes a youtube video link you can watch the video for reference.
So, taking these conditions into consideration in this project we will implement the switching of the device ON-OFF connected to our circuit according to the scheduled time set by the user. The whole project is built using Arduino UNO which is interfaced with the DS1307 RTC module to give real-time and a relay circuit is connected to turn ON-OFF the device. A 16x2 alphanumeric LCD is connected to view the current date and time and to set the time of ON-OFF by the user and 4 push to ON switch to it. So, the user can interact with this system and set the desired ON-OFF time for the device.
Working :
- Initially, the device is in the OFF state and the current time is shown on the LCD display.
- Now the user needs to set the ON time and OFF time, And as the time is set by the user, the device will turn ON and wait until it reaches the OFF time set by the user. As soon as it reaches the OFF time the device will turn OFF.
Block diagram:
As you can see the block diagram is easy to understand. The switches at the bottom will get the inputs from the user and send them to the Arduino, Arduino checks the key values and accordingly starts setting the values while displaying the time on the LCD.
Circuit diagram:
Note: Please change the polarity of the LED1 in the power supply section.
You can follow the link to read more myengineeringstuffs.
The full setup is done on a breadboard since it is easy. The circuit diagram is divided into a number of parts. Please follow the below parts.
Power Supply: The electrical device is running on AC voltage while the Arduino circuit requires operating voltage 5v DC and the relay circuit requires 12v of supply. We will use a 7812 voltage regulator to convert the external power supply to 12v DC for the relay circuit and Arduino will be powered with the USB cable from the laptop or PC.
DS1307 RTC Module: Follow the given connection table to complete the circuit. You can follow our previous tutorial on interfacing with the DS1307 RTC module HERE.
LCD Connection: Please follow the below table for the connection of LCD and Arduino UNO HERE.
Switches Connection: Here we are using four 1K resistors to provide a default state to the PINs A0, A1, A2, and A3 and that is HIGH. This means we have connected the PINS to VCC through a 1K resistor. By doing this we set the PINS state to HIGH as a default value. And when the switch is pressed a LOW value will be detected at the PIN and hence we get to know the switch is being pressed. Follow the below table and connect the switches accordingly.
Relay Circuit: the electrical appliance is connected to the 12v relay. This relay circuit is built with a BC547 NPN transistor. A 1K resistor is connected at the base of the BC547 transistor, the emitter of the transistor is grounded and the collector is connected to one of the terminals of the relay. So, when a proper voltage is fed at the base of the transistor through the 1K resistor, the transistor triggers and provides ground to the terminal of the relay where it is connected. So when the circuit completes the relay is powered with the proper voltage, and the relay terminal COM which is initially connected at NC shifted to NO which shifted the NEUTRAL of the AC line and completes the circuit for AC appliances.
Comments