
Project Name: Moon Lamp – Controlled by ESP32-C3
Project Author: carele_i
I made a super beautiful moon lamp!
Even beginners can do it!
Because its moon model + circuit + software are all open-source!
The highlight of this moon lamp is — easy to replicate! Multiple usage scenarios!
-
Can be a gift, cost is not high, but it’s handmade and thoughtful!
-
Can be a desktop ornament, full of atmosphere.
-
Can be a bedside night light, just looking at it brings happiness.
…
Next, I will share the moon lamp’s — controller hardware and software design, moon lamp model design.
The controller is the moon lamp’s “brain”, very important, designed with ESP32-C3 as the main control..
Schematic Diagram
PCB Design
The controller needs to be as compact as possible, so smaller components are required, as explained below.
The MCU usesESP32-C3-MINI-N4.
It has a built-in USB JTAG controller,which allows direct programming via USB, saving the cost and space of an additional USB-TTL chip.
It has WIFI and Bluetooth capabilities, allowing connection to IoT platforms.
Power management needs to meetbattery charging,system power supply distribution and control.
The power architecture is shown in the diagram below:
Power management usesETA6002.
It must have R! G! B!
Using the more mainstreamWS2812b LED, selected in 5050 package
Due to limited space, only two were included, with limited brightness.
But, no one should use this thing for lighting, right?
A polymer battery with dimensions L35W30H10mm was selected,with a capacity of 1000mAh.
Want a well-controlled moon lamp? Want beautiful lighting effects? Want to extend battery life?
The software part is to solve the above three problems!
The software needs to implement: lighton/off, lightbrightness switching, lightcolor switching.
This project uses a single button forfunction reuse.
They are:
-
KEY1 long press: turn light on/off
-
KEY1 double click: switch light color (5 presets)
-
KEY1 single click: switch brightness (8 levels)
In button function reuse, theOneButton library is used to implement it.
WS2812b is a programmableRGB LED, which can be controlled through programming. This project usesFastLED library for control.
In the highest brightness state, it can be used continuously for 6 hours.
Therefore, in the future I will add two functions:
-
By letting the MCUenter low power state during idle time to reduce some power consumption and extend battery life.
-
After connecting to IoT, you can use an app to check the light status, control the light status orintegrate with Mijia lights.
How to make the same moon lamp?
-
Open the open-source model files (specific base and flange models)
-
Import the flange model, adjust to the appropriate position
-
Merge the two models, or directly slice them.
-
Finally,import to the printer for printing.
-
It is recommended to use embeddedM3 nuts to secure the flange hole.
-
The assembly screws useM3x26.
This is the moon model I printed a long time ago, at that time the printer was not well calibrated, and the layer lines are still very obvious:
The moon files are open-source, please refer to the instructions at the end of the articleto view the original text (you can also give a thumbs up to the project author).
This project is open-source!
——Want to replicate? Want to give the author a thumbs up? You can copy the open-source URL to go to the original text.
Open-source URL:https://oshwhub.com/carele_i/moonlight
Click on the end of the article 【Read the original text】 to directly enter the original text.
*This article reprinted user creations from the “Lichuang Open Source Hardware Platform”. If there is any infringement, please contact for deletion.
