![]() ![]() If you really need the entire system to run entirely on a battery, you will definitely need to have the arduino go to sleep most of the time, and only wake up occasionally to see if it's time to trigger the relay again. If power is lost, the RTC can still keep track of time with its battery, and when the power comes back on, the Arduino can go back to checking the time to see if it's time to switch the relay. The simplest way to do this is probably to provide external power to your circuit so that the arduino can stay active. Unfortunately it's the only part of your circuit that can control the relay, or make the decision if it's time to control the relay, so it has to stay.īasically, you need to have the Arduino check the time on the RTC periodically, and every time it checks the time, it decides whether or not it needs to change the state of the relay. I'm guessing you want to detach the Arduino Uno from your circuit because the Arduino will drain your battery if it stays connected to your circuit. It doesn't control anything - it just provides information that a microcontroller (like the arduino) can use to make decisions. The DS3231 is just a real time clock - all the DS3231 does is keep track of the time, and report the time over the I2C interface if it's requested. The DS3231 can run on a coin cell battery for a year pretty easily, but what you're trying to do - make the DS3231 control a relay by itself, isn't really possible. You've got the right idea giving the DS3231 its own battery so that it can keep track of the time. If there is already a program and circuit diagram to integrate both RTC DS3231 and 1 Channel 5V Relay. ![]() I am planning to use below devices to achieve same.ĭS3231(RTC) which has battery attached ( ) and they are explaining about RTC DS3231 example ( Real time clock Arduino RTC DS3231 test - YouTube). they are explaining about Relay example ( Control AC bulb with 5V relay using Arduino - YouTube). I am not sure about which port of RTC DS3231 should be connected to Relay and how to make it run by itself. Once program is loaded using Arduino IDE, into RTC DS3231 it should run by itself using Lithium battery and my Arduino Uno should be detached. I am planning to use RTC DS3231 programmed with Arduino and external devices attached using 1 channel 5 volt relay, but my external device are switched off every day hence I want my RTC should be running using internal lithium battery and trigger Relay LOW when time reaches one year. I am new to Arduino, currently in the learning process, I am in the process of making circuit, which will stop my external devices after 1 year so that it can be put into maintenance mode, before goes into production. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |