

IOS MoonLamp
A Moon Lamp based on an ESP32 controlled using the iOS Home app.
- Size
- 60 × 60 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 33
- Nets
- 69
- Pads
- 193
- Tracks, vias
- 0, 0
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 31 May 2026
- Updated
- 13 Jun 2026
Overview
IOS MoonLamp is an open-source printed circuit board by mkhairyx, from the mkhairyx/iOS-MoonLamp repository on GitHub. It is a 2-layer board of 60 × 60 mm with 33 parts on 69 nets.
It is built around the ESP32-WROOM-32, AMS1117-3.3 and WS2812B. Its parts include 11 capacitors, 10 resistors, 5 ICs, 3 diodes and 3 switches. It belongs with the lEDs and displays boards and the ESP32 boards of this library.
Main components
3ESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsWS2812B
5mm X 5mm Surface Mount RGB LED with Intelligent ControlWorldsemiUncategorised
README
README.mdiOS Moon Lamp

Bought a battery powered Moon lamp a few years ago, and it was cool back then but now it’s boring that I have to turn it on and off manually every night. So I removed the insides of it and made it powered with an ESP32 controlled by the iOS Home app.
The Poster
High resolution poster available here.

The Design
The PCB:
Here's how the PCB looks like:
And here's the gerber view for it:

The Schematics:

The case:
The case is held together with four M5 screws.

Assembly
Step Files
Check Step_Files to see step files.
Exploded View:

Assembly video:
This video shows how to assemble and disassemble the case:
https://github.com/user-attachments/assets/3fa87b10-48f1-4240-b7dd-df9781dbfde8
Firmware
Compile and flash using the Arduino IDE
If you want to edit the code, compile it yourself, then flash it; you can download the arduino sketch and the required libraries here.
Flash the firmware as is
If you want to flash the firmware as is, you can download it here.
You can use ESPWebTool to flash the firmware directly to the ESP32 using your browser.
Operating the device
Power
The device is powered by a USB-C and does not have a battery, so please make sure that it's connected to a stable USB-C power source. The device shows wether it's powered on or not through the Red LED on the back near the USB-C port.
Blue Status LED
The device shows it's status through the Blue Status LED on the back near the USB-C port. Refer to HomeSpan's documentation on HomeSpan Device Status to be able to identify different states.
CLI
The CLI can be used to setup the device, change the WI-FI credentials, or factory reset the system.1 You can use the CLI through the onboard USB-C port on the back. Use a baud rate of 9600 for serial communication.
Control Button
The Control Button can be used to put the device in Command Mode and select different actions. Refer to HomeSpan's documentation on Device Command Mode to know how to use it
BOM
Available as a .csv file here
BOM Table (components only)
(Pricing for the enclosure and the PCB will depend on where the stuff are made)
Orders from different manufacturers
In Egypt:
Nori (PCB only): $19.05
metanoia (Case only): $5.77
Out of Egypt (international shipping):
JLCPCB (both PCB and Case): $32.42
Notes
The TTP 223 module is connected to the main PCB using three wires.
The 3D printed case, the PCB, and the Moon itself (the lamp) are not included in the BOM, but their costs are shown in Orders from different manufacturers.
The Moon Lamp it self was salvaged from an old lamp, so it costs nothing, therefore it wasn't included in the BOM.
Made and designed by @mkhairyx.
Supported by Fallout and Hack Club.
Powered by HomeSpan
Footnotes
-
Check the The HomeSpan Command-Line Interface (CLI) to be able to use the device's CLI through the onboard USB-C port. ↩
Parts
33| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 0.1uF/50V(10%) | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C3, C6, C7, C8, C9, C10, C11 |
| 3 | 22uF/10V(20%) | Capacitor_SMD:C_1210_3225Metric_Pad1.33x2.70mm_HandSolder | C1, C2, C5 |
| 2 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R7, R8 |
| 2 | 2k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3, R10 |
| 2 | 5.1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2 |
| 1 | (BOOT) | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx58-2LFS | SW1 |
| 1 | (CTRL) | Button_Switch_THT:SW_PUSH_6mm_H13mm | SW3 |
| 1 | (EN) | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx58-2LFS | SW2 |
| 1 | 220 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R9 |
| 1 | 22K(5%) | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R4 |
| 1 | 2K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R6 |
| 1 | 4.7uF/6.3V(10%) | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C4 |
| 1 | 47K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R5 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | BLUE LED | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D3 |
| 1 | CP2102N-Axx-xQFN28 | Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm | U2 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U3 |
| 1 | PC817 | Package_DIP:DIP-4_W7.62mm | U4 |
| 1 | RED LED | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D2 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal | J1 |
| 1 | WS2812B | LED_THT:LED_D5.0mm-4_RGB_Wide_Pins | D1 |
| 1 | ~ | Custom:Untitled | U5 |
Similar boards
- 2 layers38 × 56 mm

- 2 layers159 × 140.1 mm

Phazor
skrmsh/skirmish-hardware
Skirmish Hardware © 2022-2023 by Ole Lange is licensed under CC BY-NC-SA 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
123 parts10 - 2 layers50 × 50 mm

Rfid uhf wifi reader
OpenLaundry/wifi-rfid-uhf-reader
Portable long range RFID uhf reader with WIFI based on esp32
23 parts8 - 4 layers85.1 × 53.3 mm

- 2 layers290 × 210 mm

T8-Sequencer
lluisestape-upc/T8-Sequencer
16-step ESP32 groovebox: two-layer 290x210 mm KiCad board, DRC-clean and fabrication-ready, with the Python scripts that generated and repaired it
104 parts2MIT - 4 layers28.5 × 52.7 mm

- 2 layers100 × 100 mm

- 2 layers100 × 100 mm

Questions
How big is the IOS MoonLamp PCB?
It measures 60 × 60 mm and has 2 copper layers, 1.6 mm thick.
What parts does the IOS MoonLamp use?
33 parts, built around the ESP32-WROOM-32, AMS1117-3.3 and WS2812B. 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 IOS MoonLamp KiCad files?
From the mkhairyx/iOS-MoonLamp repository on GitHub, at the commit this page was made from: the board is source/KiCad - PCB/iOS_MoonLamp/_restore_backup_2026-05-30T03-58-17-070/iOS_MoonLamp.kicad_pcb and its schematic source/KiCad - PCB/iOS_MoonLamp/_restore_backup_2026-05-30T03-58-17-070/iOS_MoonLamp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the IOS MoonLamp design in my own project?
Its repository states no licence, so its author keeps all rights: ask mkhairyx before reusing the design.