

Icicle Alarm Clock
Keep in mind that the type of microcontroller you are using may affect the firmware.
- Size
- 80.7 × 63.2 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 14
- Nets
- 18
- Pads
- 61
- Tracks, vias
- 102, 6
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 5 Jul 2026
- Updated
- 7 Sep 2026
Overview
Icicle Alarm Clock is an open-source printed circuit board by oSnwy, from the oSnwy/Icicle-Alarm-Clock repository on GitHub. It is a 2-layer board of 80.7 × 63.2 mm with 14 parts on 18 nets, routed with 102 tracks and 6 vias.
It is built around the S8050. Its parts include 4 switches, 2 resistors, 1 IC, 1 transistor and 1 connector. It belongs with the lEDs and displays boards of this library.
Main components
1README
README.mdIcicle-Alarm-Clock
Finished Build Images
![]() | ![]() | ![]() |
|---|

Initial goals:
Priority Goals:
- This alarm clock should be able to tell the time (obviously).
- This alarm clock should be able to store multiple alarms, as well as be able to toggle each alarm.
Less important goals
- This alarm clock should have a volume knob.
- This alarm clock should be able to play customized sounds.
Parts list (Bill of Materials)
| Part | Quantity | Price | Link |
|---|---|---|---|
| Lolin C3 Mini ESP32 | 1 | Provided in Kit | N/A |
| 2.25in TFT display | 1 | Provided in Kit | N/A |
| Custom PCB | 1 | $8.67 | JLPCB |
| 3.3V Piezo Buzzer | 1 | Provided in Kit | N/A |
| EC11 Rotary Encoder Switch Button | 1 | $7.55 CAD | AliExpress |
| 1k ohm Resistor | 1 | $0.88 CAD | AliExpress |
| 10k Ohm Resistor | 1 | $0.88 CAD | AliExpress |
| S8050 Transistor | 1 | $7.47 CAD | AliExpress |
| Case | 1 | Provided in Kit | N/A |
| Lid | 1 | Provided in Kit | N/A |
| 1x8 2.54mm pin headers | 2 | $3.72 CAD | AliExpress |
| Keyboard Switches | 3 | Provided in Kit | N/A |
| Keyboard Keycaps | 3 | Provided in Kit | N/A |
| Male to male Dupont wires | 16 | $3.50 CAD | AliExpress |
| Price | HST (Ontario Sales Tax) | Total Price | Total USD Price |
|---|---|---|---|
| $32.67 CAD | $4.25 CAD HST) | $36.92 CAD | 26.01 USD |
Planning:
- I plan to use a rotary encoder with a switch to navigate the UI, as well as extra switches to toggle alarms or other features easily.
- The buzzer will be integrated into a transistor circuit, increasing the volume of the alarm while keeping it adjustable.
Schemtaic (4 Hours):
- Due to the struggle for GPIO pins on the WEMOS, I was only able to add two switches.
- The rotary encoder and two switches use 5 GPIO pins, while the buzzer uses one.
- The THT display uses the other 6 GPIO pins.
- The 3.3V pin powers both the buzzer and the THT display.
Schematic (REVISED: +2 Hours):
- While creating the PCB, I added a pull-down resistor between the base of the transistor circuit and the GND pin.
- I changed the THT display to be connected with a generic 2.54mm 1x8 connector, so the keys and screen can be mounted on separate planes.
- The BL is now powered by the 3.3V pin, freeing the GPIO pin to be used for a third switch.
PCB (4 Hours)
- The PCB was wired in KiCad, using the footprints provided by Hack Club BLARE.
- All components were mounted on the top of the PCB.
- The PCB includes 4 mounting holes for M3 screws.
- This PCB uses a 1x8 connector for the display.
Case (3 Hours)
This case is designed to work in two parts. The main body of the case has M3 screw standoffs in the base, allowing the PCB to be screwed into the case securely. The LCD can be attached to the front of the case using M2 screws in the hole in the front. The lid functions as a quick access to all the componenets inside, as well as contains a hole to reach the knob and switches. The side of the case contains cutouts to better transmit the sound of the buzzer.
- All 3d files can be found in the 3d model folder.
- The case and lid are stored in /3d models/STEP files/Alarm Clock Base.step and /3d models/STEP files/Alarm Clock Lid.step
CASE (REVISED: +2 Hours):
Added holes for the usb c wire, as well as a lower lid for easier access to the switches. Also added full electronics 3d model.
Full Model With Electronics
![]() | ![]() | ![]() |
|---|---|---|
![]() | ![]() | ![]() |
Case
![]() | ![]() | ![]() |
|---|---|---|
![]() | ![]() | ![]() |
Lid
![]() | ![]() | ![]() |
|---|---|---|
![]() | ![]() | ![]() |
Code (8 Hours)
Easily the longest part of the project. The code was written in C++ in the Arduino IDE. I used the wifi capabilities of the ESP32 to sync the time accurately without an RTC. This allows me to retrieve the time from pool.ntp.org, but does mean that it must be connected to the wifi. However, we can use the rotary encoder and the switches in order to mantually adjust the time if needed, such as when wifi is not possible.
Resources Used
If anyone wants to learn how to code an Alarm Clock, these are some excellent resources to get started with.
| Use | Website |
|---|---|
| Install ESP32 in Arduino IDE | https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/ |
| How to connect ESP32 to wifi | https://randomnerdtutorials.com/getting-started-esp32-c3-super-mini/ |
| How to get the time on an ESP32 | https://randomnerdtutorials.com/esp32-date-time-ntp-client-server-arduino/ |
| struct TM reference sheet | https://cplusplus.com/reference/ctime/tm/ |
| WEMOS C3 mini reference sheet | https://www.wemos.cc/en/latest/c3/c3_mini.html |
Keep in mind that the type of microcontroller you are using may affect the firmware.
Libraries
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#include <WiFi.h>
#include "time.h"I used Adafruit and SPI to connect the microcontroller to the THT display, and wifi.h and time.h to get and store the time from pool.ntp.org. You may need to download the libraries before using them.
Pins
#define BZ1 0
#define ENC_A 1
#define ENC_SW1 2
#define ENC_B 3
#define SW2 4
#define SW3 5
#define SW4 6
#define TFT_CS 7
#define TFT_DC 8
#define TFT_RST 10
#define TFT_MOSI 20
#define TFT_SCLK 21Defining each pin of the microcontroller makes it easier and more organized. This will change depending on how your microcontroller is wired.
Setting up Wifi and Time
const char* ssid = "wifi name";
const char* password = "wifi password";
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = -18000; // offset from gmt to test (-5 hours)
const int daylightOffset_sec = 3600; //off set froim daylight savingsWe can access the wifi by using the ssid and password, which allows us to connect to the network later. The time can be found by getting the GMT timezone and offsetting it by the difference from GMT to EST, which is -5 hours. We can also use daylight savings offset to fix the hour difference.
Display
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
void setup() {
Serial.begin(115200);a
tft.init(284, 76);
tft.setColRowStart(82, 18);
tft.setRotation(2);
Serial.println("TFT Initialized!");
tft.fillScreen(ST77XX_BLACK);
tft.setCursor(0, 0);
tft.setTextSize(2);
tft.print("Intializing");
}This simply sets up the screen.
Clock
int tries = 0;
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED && tries < 30) {
delay(500);
Serial.print(".");
tries++;
}
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
if (getLocalTime(&timeinfo)) {
Serial.println("Time synced!");
showMessage("Time synced!");
delay(1000);
} else {
Serial.println("Time sync failed!");
showMessage("Time sync failed");
delay(1500);
}
} else {
Serial.println("\nWiFi failed!");
showMessage("WiFi failed");
delay(1500);This block of code allows us to sync the internal clock of the microcontroller to the timezone, as well as any offsets.
Alarm
void checkAlarm() { // check if its time to get up
int hour, minute, second;
if (!getCurrentTime(hour, minute, second)) {
return;
}
// Reset the one-minute trigger lock when we leave the alarm minute.
if (minute != alarmMinute) {
alarmTriggeredThisMinute = false;
}
// If alarm is enabled and time matches, start ringing.
if (
alarmEnabled &&
!alarmRinging &&
!alarmTriggeredThisMinute &&
hour == alarmHour &&
minute == alarmMinute
) {
alarmRinging = true;
alarmTriggeredThisMinute = true;
}
}We can use a function in order to check whether the alarm should be going off. The updateBuzzer function allows us to make the buzzer beep on and off, as well as test when it should be stopped.
Clock Adjustment
void changeValue(int amount) {
if (mode == SET_ALARM_MINUTE) {
alarmMinute += amount;
if (mode == SET_ALARM_HOUR) {
alarmHour += amount;
}We can use the rotary knob and switches in tandem to adjust the clock's time in case of desync.
// SW2 can set hour time
if (buttonPressed(sw2State, lastSW2)) {
mode = SET_ALARM_HOUR;
lastButtonTime = millis();
}
// SW3 toggles alarm on/off
if (buttonPressed(sw3State, lastSW3)) {
alarmEnabled = !alarmEnabled;
mode = SHOW_TIME;
lastButtonTime = millis();
}
// SW4 goes back to main screen
if (buttonPressed(sw4State, lastSW4)) {
mode = SHOW_TIME;
lastButtonTime = millis();
}
// Rotary encoder switch moves between setting hour and minute
if (buttonPressed(encSWState, lastEncSW)) {
if (mode == SHOW_TIME) {
mode = SET_ALARM_HOUR;
} else if (mode == SET_ALARM_HOUR) {The detection of the switches and rotary encoder allows us to change the UI and set the alarm and clock.
Parts
14| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 3 | SW_Push | BLARE:SW_MX_1u | SW2, SW3, SW4 |
| 1 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R2 |
| 1 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1 |
| 1 | Buzzer | BLARE:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J1 |
| 1 | RotaryEncoder_Switch | Rotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm | SW1 |
| 1 | S8050 | Package_TO_SOT_THT:TO-92_Inline | Q1 |
| 1 | WEMOS_C3_mini | BLARE:WEMOS_C3_mini | U2 |
Similar boards
- 2 layers60 × 40 mm

- 10 layers224.5 × 160 mm

Haasoscope pro adc fpga board
drandyhaas/HaasoscopePro
Affordable 2 GHz 3.2 GS/s 12 bit open-source open-hardware expandable USB real-time oscilloscope
586 parts485MIT - 2 layers100 × 57 mm

- 4 layers74 × 104 mm

- 2 layers189.5 × 204.9 mm

SmartSpin2k Panelized
doudar/SmartSpin2k
Transform your spin bike into a Smart Trainer!
749 parts292GPL-2.0 - 2 layers13.7 × 21.4 mm

- 4 layers43 × 49 mm

- 2 layers85 × 56 mm

Questions
How big is the Icicle Alarm Clock PCB?
It measures 80.7 × 63.2 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Icicle Alarm Clock use?
14 parts, built around the S8050. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Icicle Alarm Clock KiCad files?
From the oSnwy/Icicle-Alarm-Clock repository on GitHub, at the commit this page was made from: the board is kicad files/Icicle-Alarm-Clock.kicad_pcb and its schematic kicad files/Icicle-Alarm-Clock.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Icicle Alarm Clock design in my own project?
Its repository states no licence, so its author keeps all rights: ask oSnwy before reusing the design.




















