Skip to the content
2 layers50 × 80 mmMoonClock, the printed circuit board in 3D

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

3

README

README.md

MoonClock

MoonClock in action

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_astro module, 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_astro CircuitPython 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
QtyValueFootprintReferences
8R_USResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R3, R4, R8, R9, R10, R11, R12
3100nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C4, C5
310kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR5, R6, R7
3Screw_Terminal_01x04TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ3, J4, J5
26pCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3
2Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ2, J6
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1, JP2
110KPotentiometer_THT:Potentiometer_Bourns_3296W_VerticalR1
1CR2032moonclock:BAT_BS-7BT1
1Conn_01x05Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ7
1Conn_01x06Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1ECS-.327-6-17X-C-TRmoonclock:XTAL_ECS-.327-6-17X-C-TRY1
1MCP47FVB22-E/STPackage_SO:TSSOP-8_4.4x3mm_P0.65mmU3
1MCP6002-xSNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1MCP7940N-xSNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU4
1RP2040-Zeromoonclock:RP2040-ZeroU1

Similar boards

  • 2 layers132.3 × 94.9 mmCheapino, the printed circuit board in 3D

    Cheapino

    tompi/cheapino

    An affordable split 36 keys keyboard

    59 parts1.2kCC-BY-4.0
  • 2 layers321 × 92.3 mmMx40, the printed circuit board in 3D

    Mx40

    zzeneg/stront

    Split keyboards with 38 or 40 keys, LCD display and Cirque trackpad

    181 parts353MIT
  • 2 layers255.9 × 99.3 mmZerosprey42, the printed circuit board in 3D

    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 mmStress, the printed circuit board in 3D

    Stress

    GroooveBob/Stress

    Pocket Arcade Fight Pad

    22 parts102MIT
  • 2 layers54 × 64 mmDonConIOmini, the printed circuit board in 3D

    DonConIOmini

    ravinrabbid/DonCon2040

    RP2040 based firmware and hardware for DIY Taiko no Tatsujin Drum Controllers

    96 parts66MIT
  • 2 layers52 × 50 mmRP2040-TestPatternGenerator VGA, the printed circuit board in 3D

    RP2040-TestPatternGenerator VGA

    nmur/RP2040-TestPatternGenerator

    A simple test pattern generator running on the RP2040 microcontroller

    12 parts64GPL-3.0
  • 2 layers120 × 40 mmBuinchiez40, the printed circuit board in 3D

    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 mmSoroka, the printed circuit board in 3D

    Soroka

    kapee1/soroka

    40% DIY-keyboard with base kit support

    126 parts47Unlicense

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