Simplified circuit diagram for the AL304 watch is shown on figure 1.
Figure 1.
At first I did not have a clear idea on how schematic for this watch
should look like. The very first thing which I did was soldering four
indicators together into one four-digit display. Later I added resistor
assembly with serial to parallel shift register in order to conveniently
control the display since the MCU that I used did not have enough
outputs to manipulate display on its own.
As an MCU I used ATtiny44A because it has a very small package and also
because it was the only spare MCU which I had at that moment and as it
turned out in the future it was a perfect choice. After I settled down
with display and MCU it was time to decide how will my watch measure time.
There were two options for me:
- First one is to use RTC chip like DS1337, let
it measure time and read it via I2C bus. But such solution was not suitable
in this case because TWI pins for I2C bus is already taken by SPI bus for
shift register. Theoretically it is possible to multiplex TWI bus and switch
between SPI and I2C interfaces but it will complicate circuit and programming
(TWI pins are also used to program MCU).
- Second one is more old fashioned and quirky - it is clock generator which
generates short voltage pulse each minute. Generators circuit consists of 2Hz
generator on CD4060 and frequency divider on CD4024 which divides input 2Hz
frequency by 120 and in result we get exactly "1 minute" frequency clock.
"One minute" clock goes to MCU's EXTI0 pin. EXTI0 pin can be configured to
call corresponding interrupt on falling edge of external signal which in this
case is clock signal. Reaction only on falling edge is helpful because MCU
should count only one minute per one clock pulse. If level change interrupt is
used (like PCINT1) interrupt routine will be called twice which means that MCU
will count two minutes pre one clock pulse! Instead PCINT1 interrupt is used to
wake-up MCU from POWER_DOWN mode under which it consumes the least current.
Another interrupt PCINT0 is used to both wake-up MCU and show time, battery
charge and set the time if necessary. Two latter functions can be chosen by
pressing specific combinations of two buttons. Two buttons are distinguished
by MCU by voltage level that both buttons generates after it was pressed.
Voltage levels are readen by MCU's ADC. If YELLOW button is pressed once and
released watch will show only time. If YELLOW button is pressed and held for
four seconds watch will show battery charge. If GREEN button is pressed and held
immediately after YELLOW button was pressed a set time mode is activated.
Battery charge is also measured with MCU's ADC. When option to display battery
charge is selected ADC input is switched from channel ADC6 to ADC0 to which
resistive divider is connected. Divider is activated only when YELLOW button
is pressed otherwise battery voltage is cut from divider and it does not
consume current.
Entire watch is powered by LIR2032 Li-Ion battery with capacity of 40mA/h.
Battery is protected from short circuit, overcharge and underdischarge and
can be charged from type-C USB. In sleep mode watch consumes approximately
10 uA.
It also can be seen that on 4-th digit segment "b" does not emit light.
Unfortunately it was burned during soldering process when I was soldering
main circuit to watch's frame. Maybe in the future I will replace that
indicator but for now it is fine :)