Skip to the content
2 layers80.7 × 63.2 mmIcicle Alarm Clock, the printed circuit board in 3D

Icicle Alarm Clock

oSnwy/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

1

README

README.md

Icicle-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)

PartQuantityPriceLink
Lolin C3 Mini ESP321Provided in KitN/A
2.25in TFT display1Provided in KitN/A
Custom PCB1$8.67JLPCB
3.3V Piezo Buzzer1Provided in KitN/A
EC11 Rotary Encoder Switch Button1$7.55 CADAliExpress
1k ohm Resistor1$0.88 CADAliExpress
10k Ohm Resistor1$0.88 CADAliExpress
S8050 Transistor1$7.47 CADAliExpress
Case1Provided in KitN/A
Lid1Provided in KitN/A
1x8 2.54mm pin headers2$3.72 CADAliExpress
Keyboard Switches3Provided in KitN/A
Keyboard Keycaps3Provided in KitN/A
Male to male Dupont wires16$3.50 CADAliExpress
PriceHST (Ontario Sales Tax)Total PriceTotal USD Price
$32.67 CAD$4.25 CAD HST)$36.92 CAD26.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.

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.

Keep in mind that the type of microcontroller you are using may affect the firmware.

Libraries

C++
#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

C++
#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 21

Defining 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

C++
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 savings

We 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

C++
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

C++
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

C++
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

C++
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.

C++
// 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
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
3SW_PushBLARE:SW_MX_1uSW2, SW3, SW4
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2
11kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1BuzzerBLARE:Buzzer_12x9.5RM7.6BZ1
1Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ1
1RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1
1S8050Package_TO_SOT_THT:TO-92_InlineQ1
1WEMOS_C3_miniBLARE:WEMOS_C3_miniU2

Similar boards

  • 2 layers60 × 40 mmHASwitchPlate, the printed circuit board in 3D

    HASwitchPlate

    aderusha/HASwitchPlate

    LCD touchscreen for Home Automation

    16 parts738MIT
  • 10 layers224.5 × 160 mmHaasoscope pro adc fpga board, the printed circuit board in 3D

    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
  • 4 layers74 × 104 mmBeepy, the printed circuit board in 3D

    Beepy

    sqfmi/beepy-hardware

    Beepy Hardware

    160 parts348MIT
  • 2 layers189.5 × 204.9 mmSmartSpin2k Panelized, the printed circuit board in 3D

    SmartSpin2k Panelized

    doudar/SmartSpin2k

    Transform your spin bike into a Smart Trainer!

    749 parts292GPL-2.0
  • 2 layers13.7 × 21.4 mmZ2m partner, the printed circuit board in 3D

    Z2m partner

    smarthomefans/z2m_partner

    Hardware module for iobroker.zigbee

    52 parts186
  • 4 layers43 × 49 mmEsppdp, the printed circuit board in 3D

    Esppdp

    Spritetm/esppdp

    ESP32-based PDP11 simulator, based onSimH

    55 parts141
  • 2 layers85 × 56 mmHB RF ETH, the printed circuit board in 3D

    HB RF ETH

    alexreinert/PCB

    Some of my PCBs

    96 parts104

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.