

MoonClock
A Raspberry Pi Pico-based Analog + Digital Lunar Clock
- Size
- 50 × 80 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 32
- Nets
- 39
- Pads
- 123
- Tracks, vias
- 439, 83
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 19 May 2025
- Updated
- 12 Oct 2026
Overview
MoonClock is an open-source printed circuit board by tcarmelveilleux, from the tcarmelveilleux/MoonClock repository on GitHub, published under the MIT licence. It is a 2-layer board of 50 × 80 mm with 32 parts on 39 nets, routed with 439 tracks and 83 vias.
It is built around the RP2040-ZERO, CR2032 and ECS-.327-6-17X-C-TR. Its parts include 12 resistors, 7 connectors, 5 capacitors, 4 ICs and 1 crystal. It belongs with the lEDs and displays boards and the RP2040 boards of this library.
Main components
3README
README.mdMoonClock
A unique analog and digital clock that displays the current phase of the moon and the number of hours of darkness available for astronomical observation in the evening.
Features
- Analog Moon Phase Dial: Visually represents the current lunar phase using a modified micro-ammeter.
- Analog Darkness Hours Dial: Indicates the duration of darkness in the evening after astronomical twilight, crucial for stargazing, using a modified micro-ammeter.
- Digital Time Display: A dot matrix display shows the current time.
- Real-Time Clock (RTC): Keeps accurate time, even when not powered.
- 3D Printed Frame: The clock's frame is a single piece designed to be 3D printed.
- Powered by Raspberry Pi RP2040: Uses the WaveShare RP2040-Zero module for its easy to use form-factor.
- CircuitPython Implementation: The project is coded in CircuitPython, making it accessible and easy to modify.
- Custom Astronomical Calculations: Employs the
tcv_astromodule, specifically developed for this project using algorithms from astronomical literature (primarily "Astronomical Algorithms" by Jean Meeus).
Hardware
- Raspberry Pi RP2040-based module (e.g., Waveshare RP2040-Zero)
- Real-Time Clock (RTC) module based on DS3231 (Rev 1) and MCP7940 (Rev 2)
- Dot matrix display based on MAX7219
- Modified micro-ammeters analog dials and associated DAC and amplifiers.
- 3D-printed frame (PETG)
Software
- CircuitPython firmware for the Raspberry Pi RP2040
- Custom build with Double Precision floating-point arithmetic enabled.
tcv_astroCircuitPython module (containing astronomical calculation functions).- This module was written custom for this project to have very little dependencies.
- Libraries for controlling the RTC, dot matrix display, and the modified micro-ammeters (a lot of Adafruit CircuitPython libraries)
tcv_astro Module
This project features a custom-built CircuitPython module, tcv_astro, which handles the necessary astronomical calculations. It implements algorithms described in Jean Meeus's "Astronomical Algorithms.":
- Meeus, J. (1991). Astronomical algorithms (1st ed.). Willmann-Bell.
This module computes:
- The current phase of the moon.
- Sunrise, sunset, moonset and moonrise times to determine the duration of evening darkness.
Getting Started
Instructions for building and setting up your own MoonClock will be provided in future updates. This will include details on:
- 3D printing the frame.
- Modifying and wiring the micro-ammeters and other electronic components.
- Installing CircuitPython and necessary libraries.
- Uploading the code to the RP2040-Zero.
Contributing
Contributions to this project are welcome! If you have ideas for improvements, bug fixes, or new features, please feel free to open an issue or submit a pull request.
License
MIT license, see the LICENSE file.
Acknowledgements
- The Raspberry Pi Foundation for the RP2040 microcontroller.
- The Afafruit CircuitPython community for their excellent libraries and support.
- Jean Meeus for his invaluable and authoritastive "Astronomical Algorithms" book
Parts
32| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | R_US | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2, R3, R4, R8, R9, R10, R11, R12 |
| 3 | 100n | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C4, C5 |
| 3 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R5, R6, R7 |
| 3 | Screw_Terminal_01x04 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal | J3, J4, J5 |
| 2 | 6p | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C2, C3 |
| 2 | Conn_01x04 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J2, J6 |
| 2 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1, JP2 |
| 1 | 10K | Potentiometer_THT:Potentiometer_Bourns_3296W_Vertical | R1 |
| 1 | CR2032 | moonclock:BAT_BS-7 | BT1 |
| 1 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J7 |
| 1 | Conn_01x06 | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J1 |
| 1 | ECS-.327-6-17X-C-TR | moonclock:XTAL_ECS-.327-6-17X-C-TR | Y1 |
| 1 | MCP47FVB22-E/ST | Package_SO:TSSOP-8_4.4x3mm_P0.65mm | U3 |
| 1 | MCP6002-xSN | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2 |
| 1 | MCP7940N-xSN | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U4 |
| 1 | RP2040-Zero | moonclock:RP2040-Zero | U1 |
Similar boards
- 2 layers132.3 × 94.9 mm

- 2 layers321 × 92.3 mm

- 2 layers255.9 × 99.3 mm

Zerosprey42
beekeeb/zerosprey42
Zerosprey42 Keyboard is a wired, beginner friendly, choc hotswap, MonoBlockSplit (Unibody), column-staggered, DIY mechanical keyboard.
96 parts140 - 2 layers146.3 × 69.5 mm

- 2 layers54 × 64 mm

DonConIOmini
ravinrabbid/DonCon2040
RP2040 based firmware and hardware for DIY Taiko no Tatsujin Drum Controllers
96 parts66MIT - 2 layers52 × 50 mm

RP2040-TestPatternGenerator VGA
nmur/RP2040-TestPatternGenerator
A simple test pattern generator running on the RP2040 microcontroller
12 parts64GPL-3.0 - 2 layers120 × 40 mm

Buinchiez40
ChrisChrisLoLo/bunchiez40
A pocket keyboard that makes use of mouse switches to achieve a miniscule size
90 parts56GPL-3.0 - 2 layers305.2 × 76.2 mm

Questions
How big is the MoonClock PCB?
It measures 50 × 80 mm and has 2 copper layers, 1.6 mm thick.
What parts does the MoonClock use?
32 parts, built around the RP2040-ZERO, CR2032 and ECS-.327-6-17X-C-TR. 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 MoonClock KiCad files?
From the tcarmelveilleux/MoonClock repository on GitHub, at the commit this page was made from: the board is Schematics/moonclock/moonclock.kicad_pcb and its schematic Schematics/moonclock/moonclock.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the MoonClock 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).
