Project WifeClock

This project is kinda self-explanatory – so we’ll just list the requirements;

  • Remote-controlled from bed so the time can be shown
  • Battery-backed so it’s always the correct time
  • Discrete – hidden inside a picture

That’s all.  Simple huh?

The implementation will be detailed here, so hopefully anyone with the right kit can reproduce it or build their own variant.  I own a reprap 3D printer (see my reprap page) so decided to build a custom display unit, so the design is naturally split in half – one display part and a circuit built onto a veroboard prototyping board.

The Display Unit

The display is a simple arrangement of four seven-segment displays, with a two point separator, like below


Design files (STL, SCAD source) can be found on my GitHub/WifeClock

The holes are for the led leads to pass up from below (shown is the reverse-side showing the wiring posts)  As can be seen, I used three LEDs per segment, giving 4x7x3 + 2 = 86 LEDs in total.

Printed out, using 3DFilaprint shiny black PLA, it looks a bit like this


I added pairs of corner mounts so I can change my mind about mounting, later on.  This print looks a little blobby and has to be cleaned up by hand with a needle file.  I still have some development to do with the printer setup, but it was good enough to use.  I’m quite pleased with it.

The LED array is arranged as common-cathode, with the current from each of the four digits sunk by a single transistor (per digit)  All digits share seven anode connections with all four digits wired in parallel.  This is effectively treating the array as a 4×7 matrix, with each point on the matrix corresponding to three parallel LEDs.  To create the array, the LEDs are passed up from below the plate, with all cathode connections on the inside of the digit, and the anodes wired up around the outside.  To make the connections it is necessary to bend wire into the correct shape to line up with the appropriate support posts.  Then the LED leads can then be bent around and soldered to the wire framework.

The LEDs – in this case I used ‘straw-hat’ white 5mm round, found on ebay for £1.99 for 100.  I originally designed the array by measuring some more standard LEDs, and didn’t spot that the shoulder of these parts is slightly wider, so I needed to clip off a little plastic of each LED of each segment, as they were close enough to interfere a little.  No big deal, with sharp wire cutters.  The result is as below, assembled on top of a pint glass.  The LEDs are secured with a small blob on hot melt glue on the bottom of each one.  This is only really needed to stop them falling out or shifting during soldering, and not structural as the solder joint will be adequate for this.


The wire side looks like this:


I’ve shown also the first (and most oddly shaped) anode connection wire for the centre segment.  If I redesigned this part, I would move the support posts, such that this wire could be straight, like all the others.  Below is the current state of the display build, showing horizontal (top,middle,bottom) anode connections as well as vertical connections (Left and right pairs) The central cathode connection wires are currently removed.  They were quite tricky to make fit, and I haven’t finished with them yet.


The orange bits are Kapton tape acting as an insulator.  This material is resistance to soldering temperatures, and is indispensable for electronics.

The Clock Circuit

The second part of the clock is the control circuit.  It is based on the Atmel ATMega328PU.  This is a 28-pin narrow DIP device, based on Atmel’s 8-bit AVR architecture.  It contains many useful peripherals like; interrupt controller, SPI/I2C slave and master, PWM drivers, etc.  I’ve used a minimal device setup, based on the design, for familiarity.

keeping time

In order to implement a battery-backed clock, I bought a small I2C attached clock module based on the DS1307.  The module has it’s own crystal,  and a CR2032 battery holder, so it will keep time all on its own. Adding an optional transistor would allow the use of  Li2032 rechargeable cell, but I don’t feel like doing that 🙂

DS1307_module_thumb DS1307_module_rear_thumb

Remote control

In order to implement the remote control, I opted for a 433MHz radio module pair.  I’m hoping to use the Arduino virtualwire protocol to send data over the link, but I’ve not looked into this in detail…and is some way off.  The modules look like this:


The circuit, can be found on my github/wifeclock repo GitHub/WifeClock This was designed using KiCAD for windows, using the VeeCAD libraries.


The schematic is simplified to show only the LEDs for one digit, but all the cathode buffer transistors are shown.

After footprint selection, the exported netlist was then loaded into VeeCAD for layout.  Here is my current layout, which will probably get tweaked.  Note that the P<n> connectors are just generic SIL headers,  the modules are intended to lay flat on the board, so I may have to make some extra clearance.  The power connector and protection diode on the right are currently just dumped in place, I’ll do something sensible with them soon.



Currently, this is operating without the radio attached, just using a switch in place of the radio data line to wake the clock up remotely.  I had some problems getting the arduino software stack to behave sanely when trying to merge the Wire library interrupt service routine with my timer ISR.  So, I shelved that for a rainy day.  A wire + switch is reliable…

Here’s a dodgy picture of a quick and dirty mounting inside the picture frame using stick pad mounts and garden wire!  I used solid core wire to hook the display up as it is more resilient than thin, multi-core wire and I had a reel lying around to use up.


Finally, the other side shows a pretty water colour, with hardly any wiring showing (I may do a better job of this one day)


An initial build of the software can be found on the software section of the GitHub repo.

One day I will manage to work out how to actually photograph it in action – the problem is, it’s insanely bright and overloads any camera I point at it!  Perhaps If I can slide some dark filter material between the LED array and the canvas, it will work, but for now, you’re just going to have to look at this rubbish effort 😀


Leave a Reply