The problem
A digital timer switch with relay output and LCD display is a programmable switch that turns a mains-powered load on and off at user-chosen times, without anyone standing by. It is built around a DS3231 real-time clock, an Arduino Nano, a 16x2 LCD and a relay module: the clock keeps the time, the controller checks the stored programs, the relay switches the load, and the LCD shows the current time and the next switch. The problem is common: lights, fans, pumps, heaters and chargers are left running longer than needed because no one is there to switch them off, wasting electricity and wearing out equipment. A mechanical plug-in timer switches one load at fixed times, but it cannot hold several programs, show the next switch, or be overridden without disturbing the schedule. This project closes that gap with a general-purpose switch for any mains load within its rating, with multiple daily programs, a clear display and a manual override.
Keeps the time on a coin cell through power cuts, accurate to plus or minus 2 ppm.
Follow the working sequence
How it works
The DS3231 real-time clock keeps the time of day on its own temperature-compensated crystal, accurate to ±2 ppm from 0°C to +40°C (datasheet value), and a coin-cell battery keeps it running when mains power is absent. The Arduino Nano reads the time over I2C once every second and compares it with the on/off programs stored in its EEPROM, checking each program's on time and off time against the current time in minute resolution. When the current time reaches a program's on time, the Nano drives the relay module, the relay contacts close, and mains power reaches the load; at the off time the relay opens and the load switches off. The 16x2 LCD shows the current time, whether the load is on or off, and the next scheduled switch. The three push buttons let the user set the clock and edit programs through LCD prompts, and the manual override flips the relay immediately without disturbing the stored schedule.
- The DS3231 RTC keeps the time of day, running on its coin-cell battery through mains power cuts.
- The Arduino Nano reads the time from the RTC over I2C once every second.
- The firmware compares the current time with each stored on/off program in the EEPROM.
- At a program's on time, the Nano energises the relay module and the relay contacts close, powering the load.
- At the program's off time, the relay opens and the load switches off.
- The 16x2 LCD continuously shows the current time, the relay state and the next scheduled switch.
- The SET, UP and DOWN buttons set the clock and edit programs through LCD prompts, and the manual override switches the load immediately without touching the stored schedule.
Builder note: the relay coil draws approximately 70 mA when energised (datasheet value), far more than the 20 mA an Arduino Nano output pin is rated for (datasheet value), so the module's onboard transistor drives the coil and the Nano pin only switches the transistor — wiring the coil straight to a pin is the most common wiring mistake in this build.
Tech stack:
- Arduino Nano (ATmega328P)
- DS3231 RTC module
- 16x2 LCD (HD44780)
- 5 V single-channel relay module · SRD-05VDC-SL-C
- Arduino IDE
- C/C++ firmware
- Solderless breadboard · jumper wires
- 5 V regulated power supply
| Parameter | Value |
|---|---|
| Controller | Arduino Nano, ATmega328P, 16 MHz clock speed (datasheet value) |
| Controller memory | 32 KB flash memory, 2 KB SRAM, 1 KB EEPROM (datasheet values) |
| Real-time clock | DS3231, ±2 ppm accuracy from 0°C to +40°C (datasheet value, equivalent to approximately 0.17 s per day) |
| Display | 16x2 character LCD with backlight |
| Relay | Single-channel module, SRD-05VDC-SL-C, 10 A at 250 V AC contact rating (datasheet value) |
| Design load limit | 5 A resistive maximum (design limit, below the relay datasheet rating) |
| Programs | Up to 8 on/off programs per day (design target) |
| Schedule resolution | 1 minute (design target) |
| Programming | 3 tactile push buttons (SET, UP, DOWN) |
| RTC backup | CR2032 coin cell, keeps time through mains power cuts (datasheet value) |
| Logic supply | 5 V DC regulated, approximately 120 mA total draw (expected) |
| Mains supply | 230 V AC, 50 Hz Indian mains (design target) |
| Build form | Open-frame breadboard prototype (no enclosure in the base build) |
Project features
The strongest capabilities of this digital timer switch are its multiple daily on/off programs, its manual override, its live LCD status display, and its battery-backed real-time clock. Multiple programs let one switch handle different schedules through the day — for example a morning on/off pair and an evening on/off pair — instead of the single fixed interval a mechanical timer allows. The manual override switches the load immediately without erasing or disturbing the stored programs, so an unscheduled need never means reprogramming the timer. The 16x2 LCD always shows the current time and the next scheduled switch, so the user can see at a glance what the timer will do next. And because the DS3231 clock runs on a coin-cell battery when mains power is absent, the time and the schedule survive power cuts instead of resetting to midnight.
- [Multiple daily on/off programs] Up to 8 on/off programs per day (design target), each with its own on time and off time, stored in the controller's EEPROM so they survive power cuts.
- [Manual override] A dedicated override switches the load on or off immediately at any moment, without changing or erasing the stored programs; the next scheduled switch still happens on time.
- [Live LCD status display] The 16x2 LCD shows the current time, the relay state and the next scheduled switch time, so the timer's behaviour is always visible without a phone or computer.
- [Battery-backed real-time clock] A DS3231 RTC with a CR2032 coin cell keeps time through mains power cuts, with ±2 ppm accuracy from 0°C to +40°C (datasheet value).
- [Push-button programming] Three tactile buttons (SET, UP, DOWN) set the clock and all on/off programs directly on the device, with prompts shown on the LCD.
- [Relay output for any mains load] A single-channel relay module switches any mains load within the design limit — lights, fans, heaters, pumps or chargers — unlike timers built for one specific appliance.
- [Power-cut recovery] When mains power returns, the controller re-reads the clock and the stored programs and resumes the schedule from the correct state, with no reprogramming needed.
Implemented in the base build: multiple daily programs, manual override, LCD status display, battery-backed clock, push-button programming, relay output and power-cut recovery. Optional on request: an enclosed mains-rated housing, a second relay channel, and a buzzer that sounds briefly at each scheduled switch. Future scope (not included): Wi-Fi remote scheduling, a mobile app, and energy-usage logging.
What is included
- Working prototype (Arduino Nano, DS3231 RTC, 16x2 LCD, relay module, push buttons, breadboard)
- Firmware source code with program-setting, schedule-compare and manual-override logic
- Wiring diagram and component list
- Mains-safety assembly and testing procedure
- Project report PDF (background, RTC theory, schedule logic, relay sizing, safety)
- PPT presentation for final review
- Viva Q&A preparation document (RTC accuracy, relay ratings, schedule logic, safety)
- Project abstract PDF
Limitations & prerequisites
- This is an academic prototype, not a certified switching device: assembly, testing and any repair must be done with mains-safety supervision, and the enclosure must stay closed during use.
- The design load limit is 5 A resistive maximum; inductive loads such as motors and pumps must be derated further and checked against the relay datasheet before use.
- The base build is an open-frame breadboard prototype with no enclosure, so it is not weatherproof and is not suitable for outdoor use.
- Programs are set on the device with push buttons; there is no remote control, mobile app or Wi-Fi scheduling in the base build.
- If mains power is absent at a scheduled switching time, the load simply stays off until power returns; the schedule itself is kept in EEPROM and is not lost.
- Programs resolve to the minute; sub-minute timing is not supported in this build.
- Switching accuracy depends on the DS3231 datasheet accuracy (±2 ppm from 0°C to +40°C); long-term drift is approximately 0.17 s per day (datasheet value).
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes, for Electrical, Electronics & Telecommunication and Instrumentation programs. It demonstrates real-time clock interfacing, relay switching of mains loads, schedule logic in embedded firmware, LCD user-interface design and mains-safety practice — a complete embedded-systems build with a working prototype that is easy to demonstrate and defend.
What load can this timer switch?
Any mains load within the 5 A resistive design limit, such as lights, fans, heaters, pumps or chargers. The relay contacts are rated 10 A at 250 V AC (datasheet value), but the design limit is set lower at 5 A for a safety margin, and inductive loads such as motors must be derated further. Loads above the limit need a higher-rated contactor, which is an optional extension.
How is this different from a geyser timer or an agricultural motor timer?
Those timers are built for one appliance and one fixed routine, while this is a general-purpose programmable switch for any mains load. It holds up to 8 different on/off programs per day (design target), shows the next switch time on its LCD, and adds a manual override that works without disturbing the stored schedule.
What happens during a power cut?
The DS3231 clock keeps running on its CR2032 coin cell, and the programs are stored in the controller's EEPROM, so nothing is lost. The relay drops out while mains power is absent, so the load stays off, and when power returns the controller re-reads the clock and resumes the schedule from the correct state with no reprogramming.
How are the on and off times set?
With the three push buttons on the device itself — SET enters programming mode, UP and DOWN change the hours and minutes, and the LCD shows prompts at each step. No computer or phone is needed after the firmware is loaded, and each program can be edited independently without clearing the others.
Does it need the internet or a phone app?
No. The timer is fully standalone: the clock, schedule, display and relay all work without Wi-Fi, Bluetooth or any app. That also means there is no remote control in the base build; Wi-Fi remote scheduling is listed as future scope and can be developed as an optional extension.
Components & software requirements
- Arduino Nano (ATmega328P)
- DS3231 RTC module
- 16x2 LCD (HD44780)
- 5 V single-channel relay module · SRD-05VDC-SL-C
- Arduino IDE
- C/C++ firmware
- Solderless breadboard · jumper wires
- 5 V regulated power supply
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.