This project is an ESP32-based DMX Slave that controls:
- Stepper Motor (TMC2209 with Sensorless Homing)
- 2 x H-Bridge DC Motor
- 4 x RC Servos
- 2 x Relays
- DIP Switch for Base DMX Address Selection
- DMX Slave using
esp_dmx
- Stepper Motor Control (via
TMC2209
, with Speed and Position control) - Sensorless Homing using
StallGuard
- H-Bridge DC Motor Control (PWM & Direction)
- Servo Control (RC Servo via PWM)
- Relay Control (On/Off)
- DIP Switch-Based DMX Address Selection
The MultiDMX Web Configuration Interface allows users to configure stepper motors, servos, and DMX settings via a web-based UI served by an ESP32 microcontroller. Settings are saved persistently and can be adjusted dynamically.
✅ Web-based UI for easy configuration
✅ Saves settings in ESP32 Preferences (persistent storage)
✅ Supports stepper motors, servos, and DMX controls
✅ Built-in Wi-Fi access point for standalone configuration
✅ Dynamic settings loading via JavaScript (AJAX)
- Power on the ESP32 module.
- The ESP32 creates a Wi-Fi Access Point named:
MDMX-XXXXXXXX
(whereXXXXXXXX
is the last 4 bytes of the ESP32 MAC address). - Connect to this Wi-Fi network
- Open a web browser and go to:
http://192.168.4.1/
- Displays a static HTML page.
- Loads current configuration dynamically using JavaScript from
/config
API. - Allows modifying stepper, servo, and DMX settings.
- Returns current settings in JSON format (used by the webpage to auto-fill form fields).
- The form submits changes to
/save
. - Settings are stored in ESP32 Preferences.
- ESP32 automatically restarts if changes are detected.
- Clicking "Reset to Defaults" clears all settings and restarts the ESP32.
Setting | Description |
---|---|
Stepper Current | Adjusts the stepper driver current |
Stepper Scaling Factor | Scale for step position |
Stepper Max Speed | Maximum step speed (steps/sec) |
Stepper Acceleration | Acceleration (steps/sec²) |
Stepper Homing Speed | Speed during homing sequence |
Stepper Homing Acceleration | Acceleration during homing |
Stepper Homing Timeout | Timeout (ms) for homing |
Stepper Homing Step Limit | Maximum steps for homing |
Stepper Reversed | Checkbox to reverse stepper direction |
Setting | Description |
---|---|
Servo Min Micros | Minimum PWM pulse width |
Servo Max Micros | Maximum PWM pulse width |
Servo Reversed | Checkbox to reverse servo direction |
The following DMX channels are used in the system:
DMX Channel | Function |
---|---|
Base DMX Address + 0* | Controls Servo 1 Angle, mapped 0-255 → 0-180° |
Base DMX Address + 1* | Controls Servo 2 Angle, mapped 0-255 → 0-180° |
Base DMX Address + 2* | Controls Servo 3 Angle, mapped 0-255 → 0-180° |
Base DMX Address + 3* | Controls Servo 4 Angle, mapped 0-255 → 0-180° |
Base DMX Address + 4* | Controls Motor A Speed & Direction, 1-127 reverse, 129-255 forward, 0/128: standstill |
Base DMX Address + 5* | Controls Motor B Speed & Direction, 1-127 reverse, 129-255 forward, 0/128: standstill |
Base DMX Address + 6* | Sets stepper speed, mapped 0-255 → 1-"Stepper Max Speed" |
Base DMX Address + 7* | Sets stepper position , mapped 0-255 → 1-"Stepper Scaling Factor" |
Base DMX Address + 8* | Controls Relay 1 0-127 off, 128-255 on |
Base DMX Address + 9* | Controls Relay 2 0-127 off, 128-255 on |
- The Base DMX Address is determined via DIP switch input.
- Open
http://192.168.4.1/
in your browser. - The webpage fetches current settings from the ESP32 using
/config
. - Adjust values in the form.
- Click "Save Settings" – the ESP32 will restart if settings changed.
- Use Arduino Serial Monitor at
115200
baud rate. - The ESP32 prints Wi-Fi connection logs, configuration updates, and DMX data.
- To clear saved settings, use the "Reset to Defaults" button on the web interface.