DMX in 60 seconds.
DMX512 (often shortened to just DMX) is the standard protocol stage lighting has used since the 1980s. One DMX universe carries 512 channels, each with a value from 0 to 255. A controller — hardware console or software like QLC+, SoundSwitch, or Lightkey — sends those values down a chain of XLR cables, and every fixture or receiver on the chain reads its assigned channels.
For a small DIY rig, the typical pattern is: controller → DMX cable → MAX485 transceiver → ESP8266 → relay / LED strip. The ESP8266 reads the DMX universe, picks the channels it cares about (e.g. channels 1–4 for four zones), and maps them to GPIO outputs or LED brightness.
You don't need a full lighting console to use DMX. QLC+ is free and runs on a laptop; a $30 USB-to-DMX dongle is enough to drive a small rig. The point is the protocol is well-defined, the hardware is cheap, and the ecosystem exists — you don't have to invent any of it.
Parts for a basic ESP8266 DMX receiver.
The MAX485 is the only part you might not already have. Everything else is a normal electronics-bench item.
| Part | Cost | What to look for |
|---|---|---|
| ESP8266 board (NodeMCU v2/v3 or Wemos D1 mini) | $4–6 | Either works. Wemos D1 mini is tidier for a permanent install in a case. |
| MAX485 transceiver module | $0.80–1.50 | The 5V variant — it accepts the 5V DMX differential signal and converts it to UART. The MAX485 and MAX3485 are interchangeable for receive-only use. |
| 120Ω termination resistor (1/4W) | $0.10 | Place across A and B at the last device. This is the most-skipped part and the cause of most "DMX works on the bench, flickers on stage" symptoms. |
| DMX XLR cable (3-pin) | $3–8 | Standard mic-style XLR cable works for short runs. Use proper DMX cable (110Ω impedance) for runs over ~10 m. |
| 5V power supply (for the MAX485 VCC and ESP8266) | $3–6 | A small phone charger is enough. The MAX485 and the ESP8266 share the same 5V rail. |
| LED strip OR relay module | $1–25 | The output side. ESP8266 maps DMX channels to either relay coils (on/off zones) or addressable LEDs (dim/colour zones). |
ESP8266 ↔ MAX485 wiring diagram.
The MAX485 module has 8 pins on one side (logic) and 4 pins on the other (DMX). You'll use 5 of the 8 logic pins for receive-only mode, plus A and B for the DMX side.
MAX485 receive-only — ESP8266 ↔ DMX chain
MAX485 module
┌──────────────┐
│ │
5V ────────┤ VCC │ A ──────► to DMX chain (pin 3)
│ │
GND ───────┤ GND │ B ──────► to DMX chain (pin 2)
│ │
ESP D7 ────┤ RO │ GND ────► to DMX chain (pin 1)
(GPIO13) │ │
│ DI (NC) │
│ │
│ DE ──┐ │
│ ├── GND │ ← tie DE and RE LOW
│ RE ──┘ │ to force receive-only mode
│ │
└──────────────┘
A standard 3-pin XLR pinout is pin 1 = ground, pin 2 = Data − (B), pin 3 = Data + (A). Connect MAX485 A to pin 3, B to pin 2, and GND to pin 1. The 120Ω termination resistor goes between A and B at the last device on the chain — not at the ESP8266 unless it's the last one.
GPIO pin choice
The MAX485's data output (RO) needs a UART RX pin on the ESP8266. The right pin matters:
| NodeMCU label | ESP8266 GPIO | DMX use |
|---|---|---|
| D7 | GPIO13 | Use this for DMX RX — the default ESP-DRX serial mapping |
| D1 | GPIO5 | Free for relay output / status LED |
| D2 | GPIO4 | Free for relay output / I2C SDA |
| D5 | GPIO14 | Free for relay output |
| D4 | GPIO2 | Avoid for DMX — boot-time pull-up fights the MAX485 direction pin |
| D8 | GPIO15 | Avoid — reserved for boot mode (must be LOW at boot) |
The 120Ω resistor that fixes stage flicker.
DMX512 was built around a single daisy-chained RS-485 bus. The electrical specification says: the last device on the chain must have a 120Ω resistor across the A and B lines.
This resistor absorbs signal reflections. Without it, signals bounce back from the open end of the cable and arrive as noise — visible as flickering channels, stuck values, or random drops. It's the #1 cause of "it worked when I tested it on my desk but flickers at the venue."
How to add it:
- Solder a 120Ω resistor directly between the A and B pins on the XLR connector of the last device on the chain.
- If you're using a DMX terminator plug ($3 from any pro audio shop), it has the resistor built in — plug it into the last XLR output.
- Don't put the resistor at the first device — the rule is "only at the last device."
If your ESP8266 is the only thing on the DMX chain, the resistor goes between A and B on the same MAX485 module — easiest done by soldering it directly across the A and B screw terminals.
What goes wrong and how to dodge it.
Save yourself a Saturday-night tech rehearsal. These are the four DMX issues I've debugged in the wild.
Already covered above. If the chain is more than ~5 m of cable and you're seeing any flicker at all, the first thing to check is the 120Ω resistor at the last device.
If the ESP8266 is powered from a separate USB charger and the DMX controller is on its own supply, the two grounds can sit at slightly different voltages and inject noise into the data line. Run both from the same power strip, or add an optocoupler on the data line for true isolation.
GPIO2 has a boot-time pull-up that conflicts with the MAX485's direction pin and causes random lockups. Stick with GPIO13 (D7) for DMX and don't use GPIO2.
Mic cable has the wrong impedance (typically 60–80Ω vs DMX's 110Ω). For runs under ~10 m you usually get away with it, but past that reflections build up and the flicker returns even with termination. Proper DMX cable is cheap — use it.
DMX vs music-reactive — when to use which.
If you're building lighting that has to follow a live show — DJ console, live band, stage production — DMX sync is the right choice. The console sends the actual scene data; your ESP8266 just executes it. No false triggers, no ambient-noise surprises, no latency from audio processing.
If you're lighting a room where music is just background and the lights are decoration — a party, a lounge, a casual bar — mic-based music-reactive is simpler. No DMX console, no cable runs, just an ESP8266 + a $2 microphone module reading the room sound. See the music-reactive guide for that build.
If you want DMX sync without writing the code yourself, the Kachang Sia pack ships with a ready-to-flash DMX firmware for exactly this setup — flash, wire the MAX485, set a start address in the config, and the relays track the console.
DMX sync without writing the firmware yourself.
If you want DMX sync without writing code, the Kachang Sia pack ships with a ready-to-flash DMX firmware for exactly this setup — flash, wire the MAX485, set a start address, and the relays track the console. See the ESP8266 Event Lighting Pack for $19.
👉 See the ESP8266 Event Lighting Pack ($19)Quick answers before you wire.
Can an ESP8266 receive DMX512?
Yes. With a $1 MAX485 transceiver module wired to GPIO13 (D7) and the ESP-DMX library (rdmiller on GitHub), an ESP8266 reads the full DMX512 frame at 250 kbps. That's enough to switch 4–8 zones or drive an LED strip from any DMX console.
Why does my DMX flicker on stage but work in the workshop?
Almost always a missing 120Ω termination resistor across the A and B lines at the last device in the chain. Long cable runs expose signal reflections that look like flicker or stuck channels. Add the resistor (or a DMX terminator plug) at the last device and the issue disappears.
Which GPIO pin should I use for DMX on ESP8266?
GPIO13 (D7 on a NodeMCU / Wemos D1 mini). GPIO2 (D4) has a boot-time pull-up that conflicts with the MAX485's direction pin and causes random lockups. GPIO15 (D8) is reserved for boot mode and should not be used for anything.
Do I need DMX or is music-reactive enough?
Music-reactive (mic-based) is fine for a party room where ambient sound is enough. For events where the lighting must match the show exactly — a DJ's console, a live band — DMX sync from the console is more reliable: no false triggers, no surprises when someone in the crowd claps.