

Binary clock
Private home decor project.
- Size
- 66.5 × 58 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 9
- Nets
- 17
- Pads
- 47
- Tracks, vias
- 106, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 5 Sep 2024
- Updated
- 22 Apr 2026
Overview
Binary clock is an open-source printed circuit board by jbazant, from the jbazant/esp8266-binary-clock repository on GitHub, published under the MIT licence. It is a 2-layer board of 66.5 × 58 mm with 9 parts on 17 nets, routed with 106 tracks and 0 vias.
It is built around the WEMOS D1 MINI and AM2302. Its parts include 4 resistors, 3 ICs and 2 switches. It belongs with the lEDs and displays boards and the ESP8266 boards of this library.
Main components
2README
README.mdWEMOS D1 mini Binary clock
This is a private project. No support is provided. No input expected. Also as soon as I finish 1st version, I will probably not work on it anymore.
Esp8266 based, IKEA Skadis mounted, NTP synchronized, "smart" binary clock with temperature and humidity sensor.
Binary clock based on a WEMOS D1 mini and a 8x8 LED matrix. Shows the seconds, minutes, hours, day in month, day in week, month, lunar phase and last two decimal digits of year in binary format. Also uses a DHT sensor to show the temperature and humidity. Time is synchronized via NTP.
Two buttons allow to disable display and set the brightness.
How to read the clock
- Columns correspond to bits. Read them as (from right to left): 1, 2, 4, 8, 16, 32, 64.
- 8th bit is used for temperature as a sign bit (0 - positive, 1 - negative).
- Some rows have different meaning for top-most bits, but it should be obvious, once you get the idea.
- Labels on display cover should guide you.

Rows
Rows from top to bottom:
- 1st row: temperature (in Celsius) - 8th bit is a sign bit (0 - positive, 1 - negative)
- 2nd row: relative humidity (in %) - 8th bit is not used (and it is also not visible on the display)
- 3rd row: years - last two decimal digits (or year % 100, if you prefer), 8th bit is not used plate place is occupied by temperature labels)
- 4th row:
- Bits 1 - 4: months (1 = January, 12 = December)
- Bits 5 - 8: lunar phase (see description below)
- 5th row:
- Bits 1 - 5: day in month
- Bits 6 - 8: day of week - read from right to left - 6th bit means 1, 8th bit means 4 (1 = Monday, 7 = Sunday)
- 6th row:
- Bits 1 - 5: hours (24h format)
- Bits 6 - 8: not used (and on the display plate place is occupied by day of week labels)
- 7th row:
- Bits 1 - 6: minutes
- Bits 7 - 8: status bits for DHT sensor. 7 - last read failed (Error), 8 - reading sensor in progress (F etching)
- 8th row:
- Bits 1 - 6: seconds
- Bits 7 - 8: status bits for NTP synchronization. 7 - last synchronization failed (Error), 8 - time synchronization in progress (Fetching)
Lunar phase
| Bits 5 - 8 | Lunar phase | 🌝 |
|---|---|---|
| 0000 | New moon | 🌑 |
| 0001 | Waxing crescent | 🌒 |
| 0011 | First quarter | 🌓 |
| 0111 | Waxing gibbous | 🌔 |
| 1111 | Full moon | 🌕 |
| 1110 | Waning gibbous | 🌖 |
| 1100 | Last quarter | 🌗 |
| 1000 | Waning crescent | 🌘 |
Photo of the clock shows: Wednesday, 18th of September 2024, 12:17:35, full moon, 28°C, 52% relative humidity.
Hardware
- WEMOS D1 mini
- 8x8 LED matrix with MAX7219 controller (FC-16)
- DHT22 sensor
- 2 buttons
- 4 pull-up 10kOhm resistors (2 for the buttons, 1 for the DHT sensor and 1 for reset pin)
Software
The software is written as arduino project mostly in C++ and can be found in the esp8266-binary-clock folder (to
satisfy arduino project structure).
Dependencies
- DHT library by Bert Melis (GitHub)
- NTP library by Stefan Staub (GitHub)
- LedController library by Noah Kirschmann (GitHub)
- moonPhaser library by Steve Sienkowski (GitHub)
Configuration
- Create
secrets.hin theesp8266-binary-clockand specify your WiFi credentials. (seesecrets.h.example) - Adjust
CONFIGURATIONsection andinitTimezoneAndDSTmethod inesp8266-binary-clock.inoto your needs (or just leave as is).DHT_INTERVAL_S- interval for reading DHT sensor (in seconds), default 1 minuteNTP_INTERVAL_S- interval for NTP synchronization (in seconds), default 12 hours
PCB
The PCB is designed in KiCad and can be found in the pcb folder. Size of the PCB board is 66 x58 mm with LED matrix
and DHT22 sensor overhanging the board.
Board is actually pretty simple and uses just one Cu layer and 0.5mm clearance between tracks. You need to use 1.6mm PCB
thickness or adjust the case (bottom part).
Case
The case is designed in OpenScad and can be found in the case folder. Optimized (well as much as I was able to...) for
FDM 3D printing.
- optimized for 0.4mm nozzle and 0.2mm layer height
- tested with PLA
- no supports
- 2 perimeters and 15% infill is more than enough
Case is divided into 3 parts:
- bottom (
case_bottom.scad) - top (
case_top.scad) - display cover (
display_plate.scad)
One can render all parts with the case.scad file.
All the parts should snap together without any screws or glue.
Dependencies
- BOSL library by Revar Desmera (GitHub).
- Roboto (bold) font by Christian Robertson (Google fonts).
Case bottom
Case is printed with supports that are included in the model. Do not add supports in slicer! After printing, remove the "triangle" simply by tilting it back and forth and "mouse ears" with a knife.
Assembled PCB (optimized for 1.6mm height) should fit into the model without any screws or glue. Some force is needed to snap it in.
Case top
- (Optional) color change at heights:
- Start with color for "ventilation" grids.
- Change color at 1.4mm for the base one.
Display cover
- Use some pretty contrast colors for the display cover. Change filament color at the height of 1.2mm.
- (Optional) Use nozzle of 0.25mm for better readability of the labels.
Parts
9| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 10K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R2, R3 |
| 2 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1, R4 |
| 1 | AM2302 | Sensor:ASAIR_AM2302_P2.54mm_Lead2.75mm_TabDown | U2 |
| 1 | Intensity | Button_Switch_THT:SW_PUSH-12mm | SW2 |
| 1 | On/Off | Button_Switch_THT:SW_PUSH-12mm | SW1 |
| 1 | WeMos_D1_mini | Module:WEMOS_D1_mini_light | U1 |
| 1 | ~ | LED_THT:FC-16 | U3 |
Questions
How big is the Binary clock PCB?
It measures 66.5 × 58 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Binary clock use?
9 parts, built around the WEMOS D1 MINI and AM2302. 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 Binary clock KiCad files?
From the jbazant/esp8266-binary-clock repository on GitHub, at the commit this page was made from: the board is pcb/binary-clock.kicad_pcb and its schematic pcb/binary-clock.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Binary clock design in my own project?
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).
Similar boards
- 4 layers101.6 × 141.7 mm

- 2 layers46.5 × 38.1 mm

Mainboard smd
OpenHumidistat/hardware
KiCAD design files for PCBs for the OpenHumidistat humidity controller
30 parts4 - 2 layers

Mars rover navigation system
tjiuce/rover
Rover Navigation Optimization System (R-NOS): An ESP32-powered autonomous robotic prototype designed for real-time environmental monitoring.
4 parts4 - 2 layers

Weather balloon V1.0
Launchpad-Incubator/weather-balloon
The research repository for Launchpad's flat-packed weather balloons.
3 parts2 - 2 layers

Priject 2 ESP32 build
Aanuoluwap/555blinker
This repository contains electronics design projects created using KiCad.
12 parts1MIT - 2 layers100 × 100 mm

GasGuard
pasinduh2002/GasGuard
IoT and ML-based LPG monitoring system with ESP32 leak detection, automatic valve shutoff, real-time mobile alerts and refill prediction. Built with React Native, Firebase and Python.
14 parts1MIT - 2 layers125 × 68 mm

- 2 layers94 × 68.5 mm

