Having located a suitable cheap bracelet style watch on Amazon I attempted to program it to do what I wanted. Unfortunately there doesn’t seem to be an easy way to push calendar events or alarms to watches like this without pairing them with a mobile phone on a regular basis.
So, of course, I took the watch apart to see how much space there was and whether it was possible to replace the electronics (exposed below) with something suitable for the task.
I went with the Seeed device as it was the smallest.†
Since the real purpose of the watch is the alert (and the ability to push the calendar entry to it), the only critical aspects would be the vibration motor and the Bluetooth Low Energy capability. This led me to decide that a bunch of simple LEDs would be adequate to make a binary display and it would add a little binary interpretation practice for my kids into the bargain!
A big challenge was the small scale of the main components and the accuracy required to keep everything looking good. The PCB was cut from a thin prototyping board cut to match the original – which was pretty tiny – and this required quite a few adjustments to get it to fit the space well. Also, getting the positioning of the USB connector to be accurate enough for the housing to go back together required a few iterations.
The only real challenge with this electronics was to find a good way to supply power to the Seeed BLE Micro and handle charging of the battery. Eventually I used a battery charger IC Max1555 and LPO power supply chip Max8881 with minimal external components to charge the battery and provide the power. The low external component count was a real blessing as hand soldering the discrete surface-mount components is pretty fiddly. The schematic is here on upverter.
This is the completed battery charging and power supply circuitry minus on capacitor which hadn't been added at this stage.
Alignment of the LEDs was a particular challenge and required a number of iterations – it surprised me just how accurately placed a line of LEDs needs to be for it not to appear very wonky.
The software for the watch was developed in the (now legacy) MBED original online environment. There’s nothing very complex about it but getting ones head around how to develop a BLE application in MBED takes a little work. I ended up creating two BLE characteristics (one for the watch time and one for alarm time).
There was also a bit of work to handle the actual updating of the clock. Francis Schumacher has very handily created a library for the RTC in an NRF51822 and all that requires is a regular call to its time() method to avoid timer roll-overs. The Ticker (an MBED class which provides a regular callback) to handle this also checks if an alarm is due (and vibrates the watch motor if there is). The time keeping seems to be accurate to around 2 seconds a day. The full watch code is on MBED.
One of the challenges of using tiny modules like the BLE Micro is that there is no USB programming interface. It is, in theory, possible to program the BLE Micro over the air but, while this worked on a couple of occasions, the effort of transferring the program over to a smartphone to send to the watch proved to be too much. Instead a Seeed Arch BLE can be used. Disconnect the jumpers for SWDIO and SWCLK and connect cables from the header (including GND) to the BLE Micro – I used a tiny connector. This enables programming of the BLE Micro as though it was the equivalent module mounted on the Seeed Arch BLE board – i.e. by dragging and dropping the hex file generated from the online MBED tools.