element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents Moon Phase Display with Raspberry Pi Pico -- Episode-641
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 24 Jan 2024 5:52 PM Date Created
  • Last Updated Last Updated: 8 Feb 2024 6:44 PM
  • Views 2040 views
  • Likes 10 likes
  • Comments 6 comments

Moon Phase Display with Raspberry Pi Pico -- Episode-641

In this week's episode of element14 presents, Lorraine takes on the challenge of creating a moon phase display. Inspired by a fascination with the moon's different phases, Lorraine envisions a desk accessory that displays the moon phase based on a user-input date. 

Watch the Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The project involves incorporating a keypad and LED displays for user interaction, as well as a motor to control the moon phases. Lorraine discusses the selection of a motor drive board based on the DRV8833 by Kitronik, allowing control of a servo or stepper motor. She also dives into the Astronomy API in Python to retrieve moon phase data based on the entered date. 

image

The video showcases the coding process in Python, including how to obtain and process data from the API. Lorraine addresses challenges with keypad functionality, detailing the mapping of keys to pins and troubleshooting issues with the middle rows. 

image

Moving forward, the hardware implementation takes shape, using 3D-printed components and a pre-purchased moon lamp. Lorraine takes viewers through the steps of disassembling the moon lamp, adapting it to fit her project, and 3D printing parts for the case. 

 image

The final assembly consists of wiring up LEDs, integrating a spinning shadow maker inside the moon, and calibrating the motor's start position. Lorraine shares her delight in the successful test of the moon phase display, expressing surprise at how well the project turned out despite some cosmetic adjustments that are needed. 

image

image

image

Downloads and Links:

  • Episode 641 Resources
  • Link to the code by peppe8o
  • KitronikLtd GitHub:  https://github.com/KitronikLtd/Kitronik-Pico-Simply-Robotics-MicroPython/blob/main/SimplyRobotics.py
  • Github for Code and Laser Cut Files: https://github.com/Lorrainbow/moonphases
  • Moon Phase API 

Bill of Material:

Product Name Quantity Buy Kit
Raspberry Pi Pico W 1 Buy Now
Harwin Pin headers 1 row of 20 pins 1 Buy Now
micro USB cable 1 Buy Now
Multicomp Jumper Wire Kit, Male to Female, Multi-Coloured, 200 mm, 0.1" Dupont Connector, 0.2 mm² 1 Buy Now
NANOTEC Stepper Motor, High Torque, Single Shaft, 42 mm, Bipolar, 1.8 °, 0.09 N-m, 1.4 A 1 Buy Now
KITRONIK Robotics Board, 3.0 V to 10.8 V Supply, 2 Stepper Motors, Raspberry Pi Pico 1 Buy Now
TR FASTENINGS m3 nuts 30 Buy Now
TR FASTENINGS m3 machine screws 30 Buy Now
Multicomp Right angle pins 1 Buy Now
 

Additional Parts:

3d fillament to print the 3d brackets, motor holders and the shadow
Wood or acrylic for the case
A moon!
  • Arduino Moon Phase Project
  • buttons
  • e14p_LU
  • Maker Electronics Tutorial
  • Lunar Phase Display Project
  • Electronic Keypad Coding
  • raspberry pi pico w
  • Maker's Lunar Calendar
  • Hardware Calibration Techniques
  • raspberry pi pico
  • DIY Moon Phase Indicator
  • DIY Moon Phase Gadget
  • Electronic Desk Accessory
  • motors
  • LED Moon Display Tutorial
  • raspberry pi
  • moon
  • Moon Phase LED Display
  • Lunar Phase Calendar Device
  • astronomy
  • electronics
  • Stepper Motor Moon Project
  • Astronomy API Integration
  • friday_release
  • 3D Printed Moon Lamp Hack
  • moon phases
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply

Top Comments

  • beacon_dave
    beacon_dave over 1 year ago +1
    There is a rather nice moon phase animation on the NASA website science.nasa.gov/.../moon-phases-2024.mp4 https://science.nasa.gov/moon/
  • beacon_dave
    beacon_dave over 1 year ago

    There is a rather nice moon phase animation on the NASA website

    Play this video

    https://science.nasa.gov/moon/

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 1 year ago

    Nice visual project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to beacon_dave

    Another feature might be to vary the brightness depending on the Moon's distance from the Earth. 

    Would need to take into account the ambient light level but there is a sensor for that.

    This may not be very noticeable though if continuously varying so might work better if it was based on a near perigee threshold for a Supermoon or a near apogee threshold for a Micromoon. Or alternatively have it continuously varying but with a separate indicator light which illuminates based on the thresholds.

    ( PS if you run on a Supermoon you can shave up to about 42,000km off the total target distance Slight smile  )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to beacon_dave

    Does the API give you data such as blue moons and blood moons ? If so, perhaps you could change the colour of the light to indicate it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago

    Very nice project but is this your way of telling us that the running schedule is falling a bit behind target ? Instead of running to the moon you bring the moon closer to you...  Joy

    Perhaps you could by default synchronise the moon to the current date until someone enters a specific date, at which point it shows that date and then after a delay, synchronises back to the current date again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 1 year ago

    Great project. Even coming up with the clever idea for the project is impressive.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube