I wanted a create a simple project to test a few ideas and still be useful in its own right. Walking through my local IKEA store, I saw a really inexpensive analog clock (Rusch) and decided that it would provide the right vehicle for what I had in mind.
The purpose of the project was to develop something that needed a large amount of background processing ‘grunt’ to test out ideas on how to integrate multiple simultaneous user interfaces (described in this past blog) whilst maintaining the required back end processing rates.
The Clock Face
The IKEA Rusch is a very inexpensive clock with a battery powered analog movement. The movement won’t be used in this application, so it was removed (and kept for another project!).
The paper clock face was also taken out, leaving just the clear cover and the translucent plastic body.
A ring 60 NeoPixel LEDs with outside diameter of 157mm (around 6-3/8″) was purchased on eBay. 60 LEDs simplifies the time display. The LED ring comes in quarter sections that need to be soldered together. When joining these sections, the power and ground should be soldered all around. The data in/out line should be soldered together only at 3 of the 4 locations. The unjoined end will be the 12 o’clock position of the clock face and the first LED on the data in side will be the first ‘seconds’ LED.
To make the LED display less harsh, I added some reflective material to the inside back of the clock body and a diffuser layer on the inside face of the clear cover. The LEDs were attached inside using double sided tape and the power and signal wires threaded through the central hole. With the cover placed back into the case, the clock display unit was basically completed.
The RTC is a DS3231 module, the same type used in the Micro Word Clock project. This type of module is very compact and generally sold as a Raspberry Pi module on eBay.
The hardware used to implement the user interfaces for the test implementation were
- A tact switch
- A Bluetooth interface using a HC-06 module (eBay)
- An Infrared remote control and receiver (eBay)
- A light dependent resistor (LDR) to measure ambient light
The prototype system was quickly built using a sensor shield and 3 wire duPont connectors, as for most of my other projects.
The software functions to implement were chosen to meet my objectives for this development:
- Time Display for Hour, minute, second. It is a clock, after all.
- The clock to be simultaneously controllable through 3 user interfaces – tact switch, Bluetooth (BT) Serial and Infrared (IR) remote control.
- User can set the time clock time from all the interfaces.
- Choice of different styles of clock face animation.
- Display brightness to adapt to ambient light, brighter in lighter conditions.
- LED color animations to provide high background processing load application for testing User Interface (UI) responsiveness.
- Lamp Test mode to test LEDs.
- Software reset of the application.
A summary of the planned functionality and the UI to control it is given in the table below
Setting the clock can be done in 2 different ways. The first is common to many clocks using push switches – the mode changes from normal → hours → minutes → normal by, in this case, long pressing and double pressing the tact switch. The value being changed flashes while it is selected and pressing the switch will move it to the next value. With the IR and BT interfaces, the option to move to the previous value or mode is also available.
The second method is to set the time by providing the actual time. This is only available from the BT interface because it is run from an Android app that allows user text input.
The Lamp Test is carried out if the tact switch is kept pressed during a system reset; once it is released, the test is started. For the other interfaces, it can be done anytime.
The remaining functionality is self explanatory.
In Part 2 I’ll explore the software and how successfully the objectives were met.