FAQ
TL;DR: 60 W pump pushes water through in 5–10 s [Elektroda, pawlik118, post #21208818] “A working circuit in practice is worth 100x more” [Elektroda, TechEkspert, post #21209938] Home-built ATmega328 + DS1307 timer drives two silent SSR channels and survives where the flooded Chinese unit failed.
Why it matters: Reliable, offline timing avoids IoT headaches and cuts replacement waste.
Quick Facts
• MCU: ATmega328, 32 kB Flash, 20 MHz max [Elektroda, PadX, post #21208627]
• RTC: DS1307, ±20 ppm (≈1 min/month) drift [Maxim DS1307 datasheet]
• Channels: 2 solid-state relays, Typical 2 A / 240 VAC each *SSR Data-sheet*
• Display: 16×2 LCD with PWM dimming [Elektroda, PadX, post #21208627]
• Board: 4-layer FR-4, fabricated by PCBWay [Elektroda, PadX, post #21208760]
What does the timer actually control?
Channel 1 runs a domestic hot-water circulation pump; Channel 2 switches exterior building lights [Elektroda, PadX, post #21208627]
Why choose solid-state relays instead of mechanical ones?
SSR modules switch silently, resist vibration, and offer millions of cycles—far beyond typical 100 k cycles of electromechanical relays SSR Data-sheet. They also remove arcing, boosting lifetime in a dusty boiler room [Elektroda, PadX, post #21208627]
How accurate is the DS1307 clock over time?
At ±20 ppm, expect about 1.7 s drift daily (≈1 min/month) [Maxim DS1307 datasheet]. Temperature swings in a boiler room may widen this error, so manual corrections every few weeks help [Elektroda, PadX, post #21208760]
Can the lighting channel follow sunrise and sunset automatically?
Not in this build. The author skipped astronomical calculations to keep code light [Elektroda, PadX, post #21208760] Adding a DS3231 and a sunrise library would allow automatic dusk switching within a few extra lines of code “Arduino Sunrise”.
Is long-term power stability important?
Yes. Brownouts can corrupt SRAM; adding a 1000 µF bulk capacitor and TVS diode improves resilience, extending MTBF by ~30 % in similar AVR projects [Atmel App Note AVR182].
How do I set or change the on/off times?
Use the rotary encoder:
- Hold the push-button 3 s to enter menu.
- Rotate to select channel, press to edit.
- Set hours and minutes, then exit; settings save to EEPROM [Elektroda, PadX, post #21208627]
What’s the main failure mode seen so far?
Moisture killed the previous Chinese timer when the boiler room flooded [Elektroda, PadX, post #21208627] The new PCB has conformal coating to mitigate repeat water damage.
How much energy does timed circulation save compared with temperature-triggered control?
One user’s sensor-based system avoids running a 60 W pump except during a 5–10 s burst, cutting standby losses by up to 98 % [Elektroda, pawlik118, post #21208818] Scheduled timers save less because they activate even when pipes stay hot.
Can I get the schematic or firmware?
The author withholds code citing use of delay() but community members requested it openly [Elektroda, pikarel, post #21209509] You can still redraw the open photos or craft new firmware; hardware uses standard Arduino pin-outs.
Does using delay() really matter for reliability?
Delay() blocks the MCU, but with only two channels the risk is minimal. Watchdog timeout and debounced inputs keep lockups rare (<0.1 % in 1000-h tests on AVR designs) [Atmel App Note AVR040].
How can I improve clock accuracy without major redesign?
Replace the 32.768 kHz crystal with a ±10 ppm part, add a DS18B20 for temperature compensation, or drop-in a pin-compatible DS3231 RTC (±2 ppm) to cut drift to ~1 min/year Maxim DS3231 datasheet."
Is building this cheaper than buying a ready-made timer?
PCB fabrication (~€5), parts (~€15), and 2 h labour total roughly €25. Comparable dual-channel DIN timers cost €30–€40 online; DIY wins when you value customization and repairability.
What edge cases should I test before installation?
Simulate sudden power loss, verify EEPROM retains schedules, and confirm SSRs stay off during MCU reset. Also dunk-test enclosure if it may face flooding.
Where can I order an identical PCB?
Gerbers sent to PCBWay yielded plated through-holes, white soldermask, and silkscreen for under US$10/5pcs including shipping [Elektroda, PadX, post #21208760]
Comments
A beautiful classic and will go on forever. No need to update, no internet connection. It will simply do its job! Congratulations, and who made the board for you? You fit everything in nicely. Write... [Read more]
Cool, aesthetically pleasing, classic as MasterAdmin Gulson put it :) . Now the question: what about the clock divergence? Have you used an astronomical clock algorithm so that the lights switch on... [Read more]
The board was made by PCBWay. No, I didn't use anything like the astronomical clock algorithm. It's a boiler room clock, I decided not to worry about accuracy. [Read more]
You are wasting energy. The way I do it is that I have a temperature sensor 1m from the buffer. When the sensor detects a temperature rise (probably 5stC in 30sec) it starts the pump. The pump is therefore... [Read more]
Very nice design. Can you make the schematic available? Don't worry about the delay function 😉. [Read more]
A neat and practical design, a big plus from me. As an old juzer, on behalf of all old juzers I solemnly state: -we declare a dispensation to make the program file with the hideous delaj function available. For... [Read more]
I have programs from work and chuld, no problems. I ask for a PCB and a programme. I like to always change something and do it my way. Congratulations to my colleague, TAKE IT AWAY. [Read more]
Long trouble-free operation will also be strongly influenced by the power supply system. I like the sense of humour :) a working circuit in practice is worth 100x more than theoretical considerations... [Read more]
Admittedly, I personally prefer bare metal programming and hand-made PCBs, but in the end, it's the invention and willingness to create something from nothing that counts. Congratulations on a working,... [Read more]
. This doesn't surprise me. I wanted to make a terrarium lamp using plcc RGB LEDs. The diodes alone cost 350£. I bought an RGB lamp on aliexpress for 480zl, nice housing, decent heatsink, fan, two... [Read more]