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

61 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

A passionate software enthusiast diving into the exciting world of development!

πŸš€ As a recent graduate with a Diploma in ECE (2018),

I am eager to establish a robust foundation in Software Development, focusing on Python, Java, C, and C++.
πŸ’‘ My journey is just beginning, and I've already taken my first steps by creating a project.
πŸ› οΈ As a beginner, I'm committed to continuously enhancing my skills and contributing to the ever-evolving tech landscape.
🌐 I'm thrilled about the endless possibilities in software development and am dedicated to mastering the intricacies of coding.

My goal is to build a solid skill set that not only meets industry standards but also pushes the boundaries of innovation.
πŸ“š Lifelong learning is my mantra, and I believe in the power of collaboration. Let's connect, learn, and grow together on this coding adventure! 🀝

#CodeNewbie #Python #Java #Cplusplus #SoftwareDevelopment #TechEnthusiast

mohamedshahilshajahan

Coding

- πŸ“« You can contact me at **mohamedshahilshajahan@gmail.com**

Connect with me:

Β 

Languages and Tools:

cΒ Β cplusplusΒ Β javaΒ Β python