Luna - the Live Moon Phase Display

Published Oct 19, 2025
 1 hours to build
 Beginner

I created Luna — The Moon Phase Display. “Luna” is the Latin word for “Moon, ” and this device is like having a real moon in your hand or on your wall. It shows the live moon phase based on your current location.

display image

Components Used

Waveshare 1.28-inch ESP32-S3 Round Touch Display
1
500mAh Li-Po Battery
1
USB Type-C Cable
1
3M Double-Sided Tape
1
Description


ChatGPT Image Oct 13, 2025, 12_01_44 AM.png

 

I love two things, my girlfriend and the Moon. There’s no doubt that my girl shines like a full moon, but the real Moon has its own unique beauty, its texture, its glow. I really enjoy watching the Moon’s phases and seeing how its illumination changes over time.

So, I created Luna — The Moon Phase Display. “Luna” is the Latin word for “Moon, ” and this device is like having a real moon in your hand or on your wall. It shows the live moon phase based on your current location.

By the way, Subscribe to my YouTube channel for more projects like this. I also update my upcoming projects on Instagram.

buy me a coffee! ☕: Donate


 

compress_gif.gif

How It Works

The device connects to Wi-Fi and automatically detects your location and coordinates. Based on that, it retrieves the local time and calculates the current phase of the Moon according to your time-zone.

What Are Moon Phases?

In simple terms, moon phases are the different shapes of the sunlit part of the Moon that we can see from Earth.

Think of it like this: The Moon is a giant rock in space that doesn't produce its own light. It shines because it reflects light from the Sun. As the Moon orbits (travels around) the Earth, we see different amounts of this sunlit half.

It's like taking a ball outside in the sunlight and slowly spinning around. You'll see the bright part of the ball change shape, even though the ball itself isn't changing.

The Main Phases

  • 🌑 New Moon: The Moon is between the Earth and the Sun. The side that is lit is facing away from us, so it seems invisible.
  • 🌒 Waxing Crescent: A tiny sliver of light becomes visible on the right side. "Waxing" means it's growing bigger.
  • 🌓 First Quarter: Half of the Moon is illuminated (the right side). It's called a "quarter" moon because it is one-quarter of the way through its cycle.
  • 🌔 Waxing Gibbous: More than half is now lit up and still growing.
  • 🌕 Full Moon: The Earth is between the Sun and the Moon. We see the entire sunlit face, making it look like a perfect, bright circle.
  • 🌖 Waning Gibbous: The light starts to shrink. "Waning" means it's getting smaller. The left side is now lit.
  • 🌗 Last Quarter: The left half of the Moon is illuminated. It's three-quarters of the way through its cycle.
  • 🌘 Waning Crescent: Only a thin sliver on the left side remains before it returns to the New Moon.


 

FJLAJD2MEUA1IUI.jpg

 

Supplies

For this project, you’ll need just a few components to bring Luna to life:

Waveshare 1.28-inch ESP32-S3 Round Touch Display

This is the heart of the project—a compact yet powerful development board. It features a 1.28-inch capacitive touch LCD, built-in ESP32-S3 MCU, and an onboard 6-axis sensor (3-axis accelerometer + 3-axis gyroscope), making it perfect for interactive projects. It also includes a Li-ion battery charging manager for portable use. With its small form factor and rich features, it’s easy to integrate into DIY builds or final products.

500mAh Li-Po Battery

This rechargeable Li-Po battery provides portable power for the Luna device, ensuring it keeps running even during power outages. A 500mAh capacity is a sweet spot for this project—it’s compact enough to fit inside the 3D-printed case while still delivering several hours of backup time. It also pairs perfectly with the Waveshare ESP32-S3 round display, since the board already has a built-in Li-ion battery charging manager over Type-C, making integration simple and reliable. I chose this battery because it’s lightweight, safe, and provides just the right balance of size, capacity, and compatibility for the display module.

3D-Printed Case

Designed in Tinkercad to fit the ESP32-S3 round display and 500mAh battery snugly. The case has a sleek cylindrical shape, with space for the Type-C port and a flat back for easy wall mounting using 3M tape. Lightweight, compact, and modern-looking, it keeps everything protected while blending seamlessly into a home setup.

USB Type-C Cable

Essential for both charging the 500mAh Li-Po battery and uploading code to the ESP32-S3 round display. A standard, reliable Type-C cable makes development and everyday use simple and hassle-free.

3M Double-Sided Tape

Strong adhesive tape used for mounting the device on a wall without screws or drilling. It keeps the case secure while allowing easy repositioning—perfect for a clean, renter-friendly setup.


 

FK3UJ2NMEUA1J70-ezgif.com-video-to-gif-converter.gif

 

Designing the Enclosure in Tinkercad

I wanted the enclosure to look just as sleek and modern as the round display itself. Using TinkerCAD, I designed a three-part snap-fit case—a front shell, back cover, and middle ring. Before designing, I carefully measured the dimensions of the display, battery, and USB Type-C port to ensure everything fits snugly without extra gaps. The middle section holds the display firmly, while also leaving a clean opening for the charging port. The snap-fit design means no screws are needed, making it simple to assemble, lightweight, and easy to maintain while keeping a professional finish.STL : https://www.tinkercad.com/things/eZ5kSptAERO-mendly 

FFJ2TONMEUA1IX3.png

 

3D Printing the Enclosure

Printing Details:

  • Nozzle: 0.1 mm (for fine detail and smooth finish)
  • Infill: 20% (strong yet lightweight)
  • Material: ABS – Black (durable, heat-resistant, and gives a professional look)

F8RVR9YMEUA1JBV.jpg

 

Programming the Device (Arduino IDE)

Download the Code

Get the project files from my GitHub repository.

Install Required Libraries

In Arduino IDE, open the Library Manager and install:

  • TFT_eSPI

Configure TFT_eSPI

  • Open the file:
  • Documents/Arduino/libraries/TFT_eSPI/User_Setup_Select.h
  • Uncomment:
#include <User_Setups/Setup302_Waveshare_ESP32S3_GC9A01.h>
  • Comment out:
#include <User_Setup.h>

Connect WiFi

Open the code and set your Wi-Fi name and password on lines 19 and 20.

Set Board Settings

Match the board configuration as shown in the reference image (ESP32-S3, correct flash, PSRAM, etc.).

Connect the Device

Use a USB Type-C cable to connect your Waveshare ESP32-S3 display to the computer.

Compile and Upload

  • Click Verify to compile the code.
  • Then click Upload to flash the firmware onto the device.

Once uploaded, your Luna will try to connect to Wi-Fi, and after a successful connection, it will display the Moon.

GitHub: https://github.com/vishalsoniindia/Luna---The-Live-Moon-Phase-Display

F44OUVOMEUA1IYI.jpg

 

Assembly

  • Clean the 3D-printed parts by removing supports and smoothing edges.
  • Insert the display into the top part, ensuring the USB-C port aligns.
  • Snap the middle frame into place to hold the display securely.
  • Connect the 500mAh Li-Po battery and place it inside.
  • Add foam pieces to keep components snug and stable.
  • Close the back cover until the snap-fit joints lock.

ChatGPT Image Oct 13, 2025, 12_01_44 AM.png

 

Mounting the Device

  • Mount the device on a wall using 3M double-sided tape.
  • Place it near a wall socket for easy charging and power access.
  • Connect the Type-C USB cable to power up the device.
  • The Luna is now ready to use!

IMG_20251012_172237.jpg

 

Using the Device

  • Set the correct Wi-Fi name and password in the code.
  • Once the code is uploaded and the device is turned on, it will show a “Connecting” message.
  • After it connects to Wi-Fi, it will start displaying the Moon phase based on your location.
  • The device automatically detects the time and location from your Wi-Fi network.

compress_2.gif

 

Improvements & Future Ideas

  • Provide Bluetooth connectivity for setup or local control without Wi-Fi.
  • Show sunrise and sunset times along with the moon phase.
  • Include offline mode so it still works without Wi-Fi.
  • Include indicators for full moon or special events.

By the way, Subscribe to my YouTube channel for more projects like this. I also update my upcoming projects on Instagram.

buy me a coffee! ☕: Donate

 

 

 

Codes

Downloads

FFJ2TONMEUA1IX3 Download
Comments
Ad