Skip to content

Automate AC appliance control with Arduino UNO, DS3231 RTC, and a Relay Module. Effortlessly schedule on/off timings for a smarter, more efficient home. Dive into DIY home automation with this accessible Arduino project!

License

Notifications You must be signed in to change notification settings

mohamedshahilshajahan/Arduino-RTC-Timing-Switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

64 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Arduino RTC Timing Switch: Automated AC Appliance Control with DS3231 and Relay Module

Project Thumbnail

This project is compatible with various Arduino boards, and the connections are similar. I'm using Arduino Uno, but I've included connection diagrams for both Arduino Uno and Nano. Most Arduino boards share similar pin configurations refer to the provided connection diagrams.

Arduino Uno Connection Diagram

Arduino Nano Connection Diagram


Switching RTC Modules in Arduino:

Other RTC Modules

Difference Between Why I am using these Codes for different module.

DS3231 Code (rtc.lostPower()):

The DS3231 RTC module has a built-in feature to detect power loss, and this is checked using rtc.lostPower(). If power is lost, it indicates that the RTC might have been without power and could have lost its timekeeping information. In such cases, it adjusts the time using the compilation timestamp.


DS1307 Code (!rtc.isrunning()):

The DS1307 RTC module lacks a direct method to check for power loss. Instead, it uses rtc.isrunning() to determine if the RTC is actively keeping time. If it's not running, it suggests that the RTC may not have power or may have lost its timekeeping ability. In this case, it adjusts the time using the compilation timestamp. If you were to use either code for both RTC modules, there could be issues.


For example:

* Using rtc.lostPower() with DS1307 might not work correctly because it doesn't have the lostPower feature.
* Using !rtc.isrunning() with DS3231 might not effectively check for power loss, and you may miss cases where the DS3231 has lost power.


Youtube Video

When uploading the code in Arduino IDE, make sure to choose the correct board and COM port.

Select Board and Com Ports


About me:

Typing SVG

๐Ÿš€ Open-Source & Freelance Developer | Turning Ideas into Tools

๐Ÿ’ก Passionate about building practical, smart, and user-friendly solutions.

With a foundation in tech and a love for problem-solving, Currently learning Windows app development, building automation with Google Apps Script, and experimenting with new ways to make technology more useful.

๐Ÿ› ๏ธ From simple productivity tools to efficient desktop utilities, I enjoy crafting solutions that just work.
๐ŸŒ Open source is my playground โ€” I believe in sharing knowledge and collaborating to create better tech for everyone.
๐Ÿ“š Always learning, always improving โ€” because great software is built on curiosity and persistence.

Letโ€™s build something awesome together โ€” one project at a time. ๐Ÿค

#OpenSource #FreelanceDeveloper #GoogleAppsScript #Automation #TechEnthusiast

mohamedshahilshajahan

Coding

Connect with me:

ย 

Support:

๐Ÿ’ป Tech Stack:

C C++ Windows Terminal Python PowerShell Markdown JavaScript HTML5 Java Adobe Audition Adobe Photoshop Canva GitHub Git Arduino OpenSea Power Bi Tampermonkey TOR

About

Automate AC appliance control with Arduino UNO, DS3231 RTC, and a Relay Module. Effortlessly schedule on/off timings for a smarter, more efficient home. Dive into DIY home automation with this accessible Arduino project!

Topics

Resources

License

Stars

Watchers

Forks

Languages