Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ESP32 Moving Head Light

A hardware project built around the ESP32 microcontroller, combining custom PCB design, 3D-printed mechanical enclosure, and embedded firmware for a miniature 3-axis RGB moving head light.

Quick Stats:

  • πŸŽ›οΈ 3-Axis Motion: Pan, Tilt, Roll (SG90 servos)
  • 🌈 RGB LED: 16 million colors (WS2812B addressable)
  • πŸ“‘ WiFi Control: REST API + web dashboard
  • πŸ”‹ Power: USB-C + optional 18650 battery
  • πŸ“ Size: Tennis ball (~6.5cm diameter)
  • πŸ’° Cost: ~$70/unit
  • ⏱️ Timeline: 4-5 weeks from start to working prototype

πŸ“‹ Project Structure

esp32-moving-head-light/
β”œβ”€β”€ firmware/                # ESP32 firmware (PlatformIO)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main.cpp
β”‚   β”‚   β”œβ”€β”€ config.h
β”‚   β”‚   β”œβ”€β”€ ServoController.h/.cpp
β”‚   β”‚   β”œβ”€β”€ RGBController.h/.cpp
β”‚   β”‚   β”œβ”€β”€ WiFiManager.h/.cpp
β”‚   β”‚   └── WebServer.h/.cpp
β”‚   └── platformio.ini
β”‚
β”œβ”€β”€ hardware/                # PCB schematics, layouts, BOM
β”‚   β”œβ”€β”€ bom.csv             # Bill of Materials (~$70)
β”‚   β”œβ”€β”€ schematics/
β”‚   └── pcb/
β”‚
β”œβ”€β”€ mechanical/              # CAD and 3D print files
β”‚   β”œβ”€β”€ cad/               # Fusion 360 / FreeCAD files
β”‚   └── 3d-prints/         # STL files ready for printing
β”‚
β”œβ”€β”€ docs/                    # Design documentation & guides
β”‚   β”œβ”€β”€ design-spec.md       # Complete technical specification
β”‚   β”œβ”€β”€ phase1-setup.md      # Environment setup & component testing
β”‚   β”œβ”€β”€ phase2-firmware.md   # Firmware architecture & web interface
β”‚   β”œβ”€β”€ phase3-mechanical.md # CAD design & 3D printing
β”‚   └── phase4-integration.md # System testing & integration
β”‚
└── README.md               # This file

πŸ“– Complete Documentation

Getting Started

Development Phases (4-5 weeks)

Duration: Week 1-2 | Goal: Verify all components work independently

  • Install PlatformIO development environment
  • Set up ESP32 breadboard with servos, LED, power
  • Test servo control (pan, tilt, roll independently)
  • Test RGB LED color control
  • Test power detection (USB/battery switching)
  • βœ… Outcome: Each component validated and working

Duration: Week 3-4 | Goal: Integrate all components into unified WiFi-controlled system

  • Modular firmware design (ServoController, RGBController, WiFiManager)
  • WiFi connectivity with auto-reconnect
  • REST API for control: /api/position, /api/color, /api/status
  • Web dashboard with color picker and position sliders
  • OTA (over-the-air) firmware updates
  • βœ… Outcome: Fully functional WiFi-controlled moving head light

Duration: Week 2-4 (parallel) | Goal: Design and manufacture custom 3D enclosure

  • CAD design of tennis-ball-sized housing
  • Servo mounting strategy (pan base, tilt arm, roll motor)
  • LED reflector/housing design
  • 3D print settings and material selection (PLA)
  • Assembly instructions with clips and inserts
  • Post-print finishing and testing
  • βœ… Outcome: Fully assembled mechanical package

Duration: Week 4-5 | Goal: Complete system validation and manufacturing readiness

  • Full system integration (electronics + mechanical)
  • Burn-in testing (1+ hour continuous operation)
  • Performance metrics (response time, servo precision, WiFi range)
  • Environmental testing (temperature, vibration, dust)
  • User manual and developer guide
  • Manufacturing readiness assessment
  • βœ… Outcome: Production-ready prototype

🎯 Key Features

Hardware

  • ESP32-WROOM-32D - WiFi/Bluetooth microcontroller
  • 3Γ— SG90 Servos - Smooth 3-axis motion control
  • WS2812B RGB LED - Addressable full-spectrum LED
  • USB-C Power - Modern power delivery with optional 18650 battery backup
  • Custom 3D-Printed Enclosure - Tennis ball sized, modular assembly

Firmware

  • Modular Architecture - ServoController, RGBController, WiFiManager
  • REST API - Full HTTP control interface
  • Web Dashboard - Intuitive browser-based UI
  • OTA Updates - Wireless firmware updates without USB
  • WiFi Auto-Connect - Resilient network handling

Control Interface

Web Dashboard:

  • Color picker (full RGB spectrum)
  • Pan/Tilt/Roll sliders (0-180Β° range)
  • Real-time status display
  • Preset animations (optional)

API Endpoints:

  • GET /api/status - Get current position & color
  • POST /api/color?color=#RRGGBB - Set LED color
  • POST /api/position?pan=X&tilt=Y&roll=Z - Set servo positions

πŸ’‘ Design Highlights

Motion System

  • Pan (Horizontal): 180Β°+ rotation via bottom servo
  • Tilt (Vertical): 0-180Β° via side servo on pan arm
  • Roll (Spin): 0-180Β° via servo on tilt arm

All servos controlled independently with smooth interpolation for professional motion.

Optical System

  • WS2812B Addressable RGB LED - 16 million colors
  • Parabolic/Conical Reflector - Focuses or diffuses light beam
  • Adjustable Brightness - 0-100% power control

Power Management

  • USB-C Input: Direct 5V power (modern, reversible connector)
  • Optional Battery: 18650 Li-ion with TP4056 charger module
  • Voltage Regulation: Separate 5V rails for servos and logic
  • Runtime: 2+ hours on battery

πŸ“Š Cost Breakdown

Category Qty Cost/Unit Total
ESP32 DevKit 1 $10 $10
SG90 Servos 3 $4 $12
WS2812B LED 1 $2 $2
Power Modules 2 $4 $8
Battery & Charger 1 $6 $6
PCB/Breadboard 1 $5 $5
3D Print Material - - $10
Connectors/Misc - - $7
TOTAL ~$60-70

πŸ› οΈ Technology Stack

Hardware:

  • ESP32-WROOM-32D (WiFi/Bluetooth SoC)
  • SG90 servo motors (3Γ—)
  • WS2812B addressable RGB LED

Firmware:

  • Arduino framework (C++)
  • PlatformIO (build system)
  • ESP32 core libraries
  • Adafruit NeoPixel (LED control)
  • ESP32Servo (motor control)

Development Tools:

  • VSCode + PlatformIO extension
  • FreeCAD or Fusion 360 (CAD design)
  • Cura or Prusaslicer (3D print slicing)
  • Git/GitHub (version control)

πŸš€ Quick Start

Prerequisites

  • Computer with USB port
  • USB-C cable
  • PlatformIO installed in VSCode
  • Basic soldering skills (optional - can use breadboard)

Step 1: Order Components (Week 1)

πŸ‘‰ Use Bill of Materials - components available from Amazon/AliExpress

Step 2: Follow Development Phases

  1. Phase 1 (Week 1-2): Environment Setup - test components
  2. Phase 2 (Week 3-4): Firmware Development - build WiFi control
  3. Phase 3 (Week 2-4): Mechanical Design - CAD & 3D print
  4. Phase 4 (Week 4-5): Integration & Testing - validate system

Step 3: Access Web Interface

1. Power on device via USB-C
2. Connect to WiFi network (SSID: "moving-head-light")
3. Open browser: http://192.168.1.XXX
4. Use color picker & sliders to control

πŸ“ˆ Project Timeline

Phase Task Duration Status
0 Design & Specification 1 week βœ… Complete
1 Component Testing 2 weeks ⏳ Pending
2 Firmware Development 2 weeks ⏳ Pending
3 Mechanical Design 2 weeks ⏳ Pending
4 System Integration 2 weeks ⏳ Pending
Total 4-5 weeks In Progress

πŸ“š Documentation Checklist

  • Design specification (technical details, component selection)
  • Bill of Materials (suppliers, costs, quantities)
  • Phase 1 guide (environment setup, component testing)
  • Phase 2 guide (firmware architecture, web server)
  • Phase 3 guide (CAD design, 3D printing)
  • Phase 4 guide (integration, testing, manufacturing)
  • This README

πŸŽ“ Learning Outcomes

After completing this project, you'll have experience with:

Hardware Design:

  • ESP32 microcontroller programming
  • Servo motor control (PWM)
  • Addressable LED (WS2812B) control
  • Power management (USB, battery, voltage regulation)
  • Electrical debugging and troubleshooting

Firmware Development:

  • Modular C++ architecture
  • WiFi connectivity and OTA updates
  • REST API design
  • Web server implementation
  • Embedded systems optimization

Mechanical Design:

  • CAD modeling (Fusion 360/FreeCAD)
  • 3D printing workflow
  • Component integration
  • Assembly design

Project Management:

  • Requirements specification
  • Design documentation
  • Testing and validation
  • Iterative development

πŸ”— Resources


πŸ“ License

MIT License - Feel free to use, modify, and distribute for personal or commercial purposes.


πŸ‘€ Author

tillingcode - Full design, firmware, and documentation
Project started: 2026-03-30


🀝 Contributing

Want to improve this project?

  • Fork the repository
  • Make improvements
  • Submit a pull request
  • Share feedback and suggestions

πŸ“ž Support

For questions or issues:

  1. Check the relevant phase documentation
  2. Review Design Specification
  3. Open a GitHub issue
  4. Check existing GitHub issues for solutions

Last Updated: 2026-03-30
Version: 1.0.0 - Alpha (Concept & Design Phase Complete)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages