Space_Clock

by leman10 in Circuits > Arduino

124 Views, 2 Favorites, 0 Comments

Space_Clock

Space_Clock_DashBoard.jpg

Built around an ESP32-C3 and a circular GC9A01 display, Space Clock is an autonomous, NTP-connected clock that mimics an interplanetary radar. It brings a space traffic control screen to life with a central spacecraft, planets marking the hours and minutes, and real-time astronomical events.

Connect the hardware, upload the code, set up Wi-Fi using the embedded Access Point, and explore the stars!

Supplies

Capture d'écran 2026-07-24 005309.png
Capture d'écran 2026-07-24 005338.png
Capture d'écran 2026-07-24 005653.png

It doesn't take much to spark wonder in kids — young and old!

Components needed:

  1. ESP32-C3 Super Mini
  2. GC9A01 round screen
  3. Dupont ribbon cable
  4. 1A USB power supply
  5. USB Cable

Connecting Components

20260704_095944 _ mini.jpg

By matching the pinout of the round display, connecting it to the ESP32 is quick and easy with female-to-female Dupont jumper wires :

Pin GC9A01 (Fonction) <> Pin ESP32-C3

VCC (Power supply) <> 5v

GND (Ground) <> GND

CS (Chip Select) <> GPIO 0

RST (Reset) <> GPIO 1

DC (Data/Command) <> GPIO 2

SDA (MOSI) <> GPIO 3

SCL (SCLK) <> GPIO 4


I also used pin connectors to reduce the length of the connections.

Code

1784850201366_mini.jpg

Download code from the GitHub deposit to your ESP32-C3 using Arduino IDE

Configuration Sequence (Captive Portal)

1784849951643_Mini.jpg
  1. Network Detection: If no valid credentials are found in NVS memory, the system launches a secure local Wi-Fi access point named SpaceClock_Setup (static IP: 192.168.4.1).
  2. User Interface: An HTML captive portal allows the user to scan for nearby networks, submit the security key, and configure the time zone (e.g., Europe/Paris).
  3. Storage and Reboot: The variables are permanently saved, triggering the deactivation of the access point and a switch to standard operating mode.

Clock Screen

20260704_095518 - micro.jpg

The main screen simulates an Air Space Traffic Control (ATC) interface:

Radar Grid: A design of four bluish concentric circles intersected by indexed orthogonal lines.

Hour (Earth): A midnight-blue and white celestial body positioned on the inner radius (60px). Generates a pulsed green radar echo when the sweep passes over it..

Minute (Mars): A yellow and orange celestial body positioned on the outer circle (85px). Also generates a pulsed green radar echo.

Second (Sweep): A continuous green sweep line emanating from the center and connected to a peripheral circular marker.

Center: An isometric wireframe spacecraft drawn with green vector lines, featuring alternating flashing navigation lights.

On Board Cinematics

1781260586785_mini.jpg

Spoler Alert !

If you want to discover all the embedded cinematics by yourself, don't read back :)

Here is the complete description of the seven cinematic sequences and visual animations integrated into the SpaceClock code.

Each sequence was designed to combine the aesthetic of a sci-fi tactical radar with astronomical precision, all optimized for an ESP32 processor.

1. Radar Sweep and Planetary Echo (Continuous Mode)

  1. Trigger: Continuous (1 full rotation per minute).
  2. Visuals:
  3. A bright green radar sweep line rotates at 6° per second around the screen center.
  4. When the beam passes over Earth (hour indicator) or Mars (minute indicator), an expanding circular echo wave erupts from the targeted planet.
  5. Text labels (Hr:XX and Min:XX) illuminate upon beam contact and smoothly fade out over time.

2. Spaceship Mission Cycle (Every Minute)

The central fighter ship features atakeoff and landing sequence precisely synchronized with the arrival of each new minute:

  1. Phase 1: Alert & Takeoff :
  2. Wingtip navigation lights flash in red alarm mode.
  3. Engine thrusters ignite with moving yellow/orange plasma flames.
  4. The ship accelerates toward the top of the display and fades out off-screen.
  5. Phase 2: Mission :
  6. The ship remains off-screen during the Second 0 animation (Ping, Syzygy, or Warp).
  7. Phase 3: Return & Touchdown :
  8. The ship reappears from the bottom of the screen with engines firing.
  9. It glides back to lock onto the exact radar center, cuts its thrusters, and returns to normal navigation lights (green/red).

3. Organic Comet Flyby (Random/Periodic Event)

  1. Trigger: Once per minute , occurring at a dynamically calculated second and lasting for 15 seconds.
  2. Visuals : The comet cuts across the screen from edge to edge on a ballistic trajectory.

4. "Real Syzygy" Event (Planetary Alignment)

  1. Trigger: At second 0, exclusively when Earth, Mars, and the Center are geometrically aligned (Conjunction 6°).
  2. Visuals:
  3. Electromagnetic Interference: The entire radar grid undergoes a rapid, jittery vibration along the X/Y axes.
  4. Tactical Warning: A "SYZYGY DETECTED" alert flashes at the center of the screen with a chromatic glitch effect (amber and red offset shadows).

5. Standard Sonar Ping (Regular Minute Transition)

  1. Trigger: At second 0on standard minutes (when no alignment or hour transition occurs).
  2. Visuals:
  3. A neon-green shockwave expands outward from the center to the radar boundary while fading to transparent, simulating a deep-space sonar pulse.

6. Hyper-Space Jump / Warp Speed (Hour Transition)

  1. Trigger: Every hour on the hour.
  2. Visual Sequence (5 Steps):
  3. Earth and Mars quickly fade to black.
  4. The radar grid powers down.
  5. Background stars suddenly stretch into long, glowing speed trails converging from the center.
  6. Complete blackout in deep space. The star map resets with a newly randomized starfield.
  7. Smooth fade-in of the radar grid, new starfield, and planets at their updated positions.

7. Maintenance Sequence / NTP Synchronization

  1. Trigger: Every hour at 25 min 30 sec.
  2. Visuals:
  3. The radar interface fades out, replaced by a green-and-white flight computer diagnostic terminal.
  4. System status messages display: "Wi-Fi Connection", Access Point SSID, and "NTP Sync".
  5. As soon as time is synchronized, the Wi-Fi radio powers down and the screen snaps back to the main radar mode.

Let's Dream !

1781528507543_mini.jpg

I hope you enjoy this trip into space! It's simple, cheap, doesn't use too many components, and I really like daydreaming while looking at it :)