How leonvandenbeukel/3d-7-segment-digital-clock works
Purpose and Entry Point
This repository defines a physical, 3D-printed four-digit seven-segment digital clock. The Arduino firmware entry point is 3D-7-Segment-Digital-Clock.ino; it drives addressable LEDs and integrates time, environmental sensing, and Bluetooth control.
Firmware Control Layer
3D-7-Segment-Digital-Clock.ino is the device’s central runtime. It is expected to initialize the Arduino Nano peripherals, repeatedly obtain clock/sensor state, map that state to segment patterns, and update the LED strip. It is the only software implementation source in the repository.
Timekeeping Boundary
The clock’s authoritative time source is an external DS3231 real-time-clock module with battery backup. Firmware communicates with that hardware from 3D-7-Segment-Digital-Clock.ino, separating persistent timekeeping from Arduino power/reset behavior.
Display Rendering and LED Topology
A one-meter, 30-pixel WS2812B RGB LED strip provides the display output. The physical LED-to-segment mapping is documented by:
• 7_Segment_Display with LED indexes 0 - 13 right segments - minutes.pdf
• 7_Segment_Display with LED indexes 16 - 29 left segments - hours.pdf
The firmware translates hours/minutes into seven-segment illumination states and emits per-pixel color data to the strip. The index documents are the key contract between code, LED wiring, and printed digit geometry.
External Inputs and Wireless Control
The Arduino integrates:
• HC-05 Bluetooth module, intended to receive commands from the linked Android clock app.
• DHT11 or DHT22 temperature/humidity sensor for environmental readings.
Both are hardware-service boundaries managed by 3D-7-Segment-Digital-Clock.ino; Bluetooth provides the external control path, while the DHT sensor contributes displayable telemetry.
Electrical and Physical Assembly
The hardware wiring/PCB design is represented by Schema.fzz (Fritzing schema). The runtime infrastructure is an Arduino Nano, 5V/2A power supply, WS2812B strip, DS3231, HC-05, DHT sensor, and custom PCB/wiring. Power capacity is important because LED brightness and color updates directly determine current draw.
Printed Enclosure and Optical Components
The display enclosure is a modular STL assembly that constrains LED placement, segment separation, and contrast:
• STL/Horizontal Segment.stl
• STL/Vertical Segment.stl
• STL/OuterRingSegments.stl
Supporting separator, center, and colon components include STL/Betweenblock.stl, STL/Middle.stl, and STL/DotRing.stl. These files are not firmware dependencies, but they define the physical rendering surface that the LED index maps target.
Main entry points: 3D-7-Segment-Digital-Clock.ino Clock runtime · Schema.fzz Wiring / PCB schema · 7_Segment_Display with LED indexes 0 - 13 right segments - minutes.pdf Minute digit pixels · Horizontal Segment.stl Segment enclosure
Components 16
Arduino firmware
- Clock runtime · Central device control loop.
3D-7-Segment-Digital-Clock.ino - Clock state · Hours and minutes for display rendering.
- Segment renderer · Maps clock and telemetry state to pixel colors.
3D-7-Segment-Digital-Clock.ino - LED index mapping · Defines pixels for the right-minute digits.
7_Segment_Display with LED indexes 0 - 13 right segments - minutes.pdf - Minute digit pixels
7_Segment_Display with LED indexes 0 - 13 right segments - minutes.pdf - Hour digit pixels · Defines pixels for the left-hour digits.
7_Segment_Display with LED indexes 16 - 29 left segments - hours.pdf
Electronics
- Arduino Nano
- DS3231 RTC · Battery-backed authoritative time source.
- DHT11 / DHT22
- HC-05 Bluetooth
- Android clock app
- WS2812B strip · One-meter display light source.
- 5V / 2A supply · Supplies controller and LED load.
- Wiring / PCB schema
Schema.fzz
Printed display
- Segment enclosure · Positions LEDs and separates seven-segment light paths.
STL/Horizontal Segment.stl - Separator and colon parts · Supporting display separators and colon optics.
STL/DotRing.stl
Connections 19
- Clock runtime → Arduino Nano: runs on
- Clock runtime → DS3231 RTC: reads time
- Clock runtime → DHT11 / DHT22: reads telemetry
- Clock runtime → HC-05 Bluetooth: receives commands
- Android clock app → HC-05 Bluetooth: Bluetooth commands
- DS3231 RTC → Clock state: supplies time
- Clock runtime → Clock state: maintains
- Clock state → Segment renderer: hours and minutes
- DHT11 / DHT22 → Segment renderer: environment data
- Segment renderer → WS2812B strip: pixel color data
- LED index mapping → Minute digit pixels: documents
- Minute digit pixels → Segment renderer: minute pixel layout
- Hour digit pixels → Segment renderer: hour pixel layout
- WS2812B strip → Segment enclosure: illuminates
- Segment enclosure → Separator and colon parts: assembled with
- Wiring / PCB schema → Arduino Nano: wiring design
- Wiring / PCB schema → WS2812B strip: wiring design
- 5V / 2A supply → Arduino Nano: powers
- 5V / 2A supply → WS2812B strip: powers LED load