The device has a switch to turn it on/off and an encoder with a button. Using the encoder we can enter menu, select options and enter numerical and boolean values. Pressing the button confirms the selection.

When switching on for the first time after installing a CR2032 battery, the user interface of the device prompts the user to enter the current time. After that it works as usual (till the time the RTC module is reset again).

The dawn procedure

The dawn procedure is as follows: the user sets the alarm for a specific time and dawn duration. At the right time, the red color turns on and accumulates brightness, then after a while the green color turns on and accumulates brightness, then the blue color does the same. By the set time, all colors are turned on at maximum brightness and, depending on the user's settings, a buzzer sounds or does not sound. If the dawn is ended and buzzer is making sound (if it was enabled by user), pressing the encoder button first time turns the buzzer of but keeps the light on. Then the next press turns off the light.

The more dawn duration user selected, the less fade is added to colors brightness on each minute.

Charge level control

The device measures the battery charge level at startup. If it is low, the buzzer beeps 3 times. The user can manually check the charge level by selecting the ChAr option in the menu and holding the encoder button. Since the protection board is used to charge the accumulator of the device, if the voltage level gets too low the board will cut off the power.

DawnAlarm_mkII is charging.

USB ports

Since the boost DC-DC converter used in the device has a USB port, and it would be difficult to desolder it, I decided to bring the port out of the case. Thus, the device can power a small consumer of 5V (up to 150 mA). A transparent flexible plate protects the USB ports from dust when the USB ports are not used.


User settings are stored in the non-volatile memory of the DS1307, so they are lost when the CR2032 battery is removed. The charge level is measured using a voltage divider. The buzzer is powered through the BC337 transistor as the STM8 board was unable to provide enough power to make it buzz. The boost DC-DC converter for the RGB strip is fixed in such a way that we can access it if we open the case, so we can regulate the voltage that powers the strip. (currently 10V).

DawnAlarm_mkII was assembled in such a way that it could be partially disassembled, if desired, something to modify.


Just check the repo.

Since I used the TM1637 module in this project, I wrote a simple cross-platform library for it: