Introduction
The main incentive behind this project was to see how much I could cram, in terms of both hardware and software, into a wristwatch-like device that is no larger than the display itself. An OLED display was chosen for being only 1.5mm thick and not requiring a backlight (each pixel produces its own light), but mostly because they look cool. The watch was originally going to have a 0.96″ display, but this proved too difficult to get all the things I wanted underneath it. Going up a size to 1.3″ was perfect.
Video
Hardware
On the
hardware side the watch contains an Atmel ATmega328P microcontroller, 2.5V
regulator, Maxim DS3231M RTC, 1.3″ 128×64 monochrome OLED, 2 LEDs (red and
green), a buzzer sounder, 3 way switch for navigation, powered by a 150mAh LiPo
battery which can be charged via USB and 2 PCBs (though one PCB is just used as
a raiser for the OLED).
The ATmega328P uses its internal 8MHz oscillator and runs on 2.5V
from a linear regulator. Its current draw is around 1.5mA when active and 100nA
in sleep mode.
The DS3231M RTC is an excellent chip, housed
in a small 8 pin package which includes a built-in temperature compensated MEMS
resonator with an accuracy of ±5ppm (± 2 minutes 40 seconds per year). Only a
decoupling capacitor and a few extra pull-up resistors were required. The RTC
is wired up so that instead of having power applied to the VCC pin, it’s
applied to the Vbat pin which reduces its current draw from around 100uA down
to 2.5uA.
Unfortunately this chip seems to be very hard to get hold of at a reasonable price if you’re not in the US. I had to get mine as samples.
Unfortunately this chip seems to be very hard to get hold of at a reasonable price if you’re not in the US. I had to get mine as samples.
The
battery charging circuit uses a Microchip MCP73832 along with some additional
components for load sharing, where the battery can charge without the rest of
the watch interfering with it.
You might
have noticed in the schematic that the LEDs are directly connected to the
microcontroller without any resistors. The internal MOSFETs of the microcontroller
have an on resistance of around 40Ω, so with a 2.5V supply voltage and LEDs
with 2Vf, around 20mA ends up through the LEDs. I would have liked
to have a blue LED, but the voltage drop for those are usually more than 3V
which would have required some additional resistors and a MOSFET.
As the
microcontroller is running on 2.5V the battery voltage needs to be brought down
a bit to obtain an ADC reading. This is done by a simple voltage divider.
However, with the voltage divider connected across the battery there would be a
current of around 350uA constantly flowing through it, this is a huge waste of
power. A P-MOSFET (and some voltage level conversion for it, which I forgot
about in the first version so it was always stuck on) was added so the divider
can be turned on only when needed.
The 2.5V
regulator being used is a Torex XC6206, primarily chosen for its tiny quiescent current
of just 1uA.
Why a linear regulator and not a switching regulator? The switching regulators I looked at had an efficiency of at least 80% with a 2mA load, but that efficiency quickly dropped off to less than 50% with loads of 100uA. Since the devices connected to the regulator draw 2-3uA in sleep mode, a switching regulator would have performed incredibly poor compared to a linear regulator. The 2.5V linear regulator efficiency is 60% with 4.2V input going up to 83% with 3V input.
Why a linear regulator and not a switching regulator? The switching regulators I looked at had an efficiency of at least 80% with a 2mA load, but that efficiency quickly dropped off to less than 50% with loads of 100uA. Since the devices connected to the regulator draw 2-3uA in sleep mode, a switching regulator would have performed incredibly poor compared to a linear regulator. The 2.5V linear regulator efficiency is 60% with 4.2V input going up to 83% with 3V input.