ReferenceParts and prices
What Arduino, ESP32 and Raspberry Pi actually do on a stage
Nobody buys a microcontroller. They buy a thing that has to happen at 21:47. Which board, what it costs, what it is bad at, and three worked effects with the parts list and the failure mode written down.
Nobody buys a microcontroller. They buy a thing that has to happen at 21:47, and the board is whichever one makes that thing cheap, repeatable and safe. Choosing it is a five minute decision if you know what each one is bad at, and a two week decision if you do not.
This page is the reference behind Class 5 and behind most capstones. It is deliberately concrete: what the board is, what it costs in the band you should expect, what it is good at, what it will embarrass you with, and a worked effect you could actually build.
Prices are bands, in HKD, for planning only. They move, they differ between a distributor and a market stall in Sham Shui Po, and the number in a tender has to be a quotation rather than a memory. The bands are here so you can tell a fifty dollar decision from a five thousand dollar one, which is the part that actually changes a design.
The four questions, applied to a board#
Before the part number, four questions. They are the same four from Class 1, pointed at hardware.
- What has to happen, and by when? A relay closing within 20 ms of a cue is a different machine from a projection that has to be frame-locked. Write the deadline down as a number.
- What does it do on every pass? A board with one job forever is a microcontroller. A board that is also serving files, decoding video and running a desktop is a computer, and it will occasionally be late.
- What does it assume? Mains that never dips. A network that is always there. An operator who presses go once. Name each assumption, because each one is a fault you have not written down yet.
- What does it do when it is alone? Power up with no network. Lose the cue mid-move. Get the same trigger twice in 40 ms. This is the question that separates a prop from a product.
The three families#
| Arduino (AVR) | ESP32 | Raspberry Pi | |
|---|---|---|---|
| Typical board | Uno R3, Nano, Mega 2560 | ESP32-WROOM devkit, ESP32-S3 | Pi 4, Pi 5, Pi Zero 2 W |
| Band, board only | HK$40–260 | HK$35–120 | HK$300–900 |
| Clock | 16 MHz, one core | 240 MHz, two cores | 1.5–2.4 GHz, four cores |
| RAM | 2–8 KB | 320–512 KB | 1–8 GB |
| Boot | Milliseconds | Milliseconds | 20–40 seconds |
| Networking | Add a shield | Wi-Fi and Bluetooth built in | Ethernet and Wi-Fi, full stack |
| Timing you can promise | Microseconds, repeatable | Microseconds on core 1 if you keep Wi-Fi on core 0 | Milliseconds, usually, never guaranteed |
| Pulling the power | Fine | Fine | Can corrupt the card |
| Analogue in | 10-bit, decent | 12-bit, noisy and non-linear near the rails | None without an add-on |
| Video, audio, files | No | No | Yes, that is the point |
| Language | C++, some MicroPython | C++/Arduino, ESP-IDF, MicroPython | Anything |
| The one sentence | One job, forever, on time | One job, on time, on the network | A small computer that happens to have pins |
The decision, in one line each. If it must be on time, it is a microcontroller. If it must be on time and on the network, it is an ESP32. If it must play media, hold files, or talk to something that expects a computer, it is a Pi, and you give the timing-critical part to a microcontroller sitting next to it.
The pairing is not a compromise, it is the normal answer. Almost every good rig on this page is a Pi doing the talking and a microcontroller doing the moving, over a serial link. Each does the thing it cannot be beaten at, and neither is asked to do the thing it is bad at.
Arduino: one job, forever#
An 8-bit microcontroller on a board with a USB socket and a bootloader. That is the entire product, and its value is that it is boring: the same sketch on the same board does the same thing in the same number of microseconds, in 2015 and in 2026.
Where it wins. Anything where lateness is the failure. A trigger that must fire within a millisecond of a contact closing. A stepper that must not lose a step. A safety interlock you can read the whole of in one sitting.
Where it embarrasses you. Two kilobytes of RAM. A string library will silently eat it and the board will start rebooting in a pattern that looks like a hardware fault and is not. Anything involving a network needs a shield, a library, and a week you did not budget.
The failure that will catch you. delay(). It is in every example sketch and it stops the board doing anything else, including reading the stop button. Class 5 spends 35 minutes on this and the coding lab has it as an exercise, because it is the single most common bug in theatre firmware.
Worked effect: the letter that catches fire#
A prop letter is dropped into a brazier. Two seconds later a flicker starts, builds for four seconds, holds, then dies over eight.
| Part | Band |
|---|---|
| Arduino Nano | HK$40–90 |
| IRLZ44N logic-level MOSFET ×3 | HK$25 |
| 12 V 5 A supply | HK$120–200 |
| Warm white and amber LED strip, 1 m | HK$60–120 |
| Microswitch in the brazier rim | HK$15 |
| Enclosure, terminals, sleeving | HK$150 |
Total in the band of HK$450–650, one evening to build, one to make reliable.
The logic is the whole job. A flicker is not random: it is two noise sources at different rates summed and clamped, because real fire has a slow body and a fast edge. Random per frame looks like a fault. The fade calculator gives you the PWM frequency that will not beat against a camera, which matters the moment somebody films it for marketing.
What it does when it is alone. On power-up, off. On a second trigger while running, ignore for half a second, then restart: an actor who fumbles the drop must not get a double flare. On loss of the trigger wire, off, because a floating input reads as noise and noise reads as fire.
ESP32: on time, and on the network#
Two cores at 240 MHz, Wi-Fi and Bluetooth on the die, for less than an Arduino. It is the board that made networked props ordinary.
Where it wins. Anything wireless that has to be on time. A prop that must respond to a cue with no cable to it. Art-Net or sACN straight into a pixel string. A battery-powered costume piece with 100 pixels and a radio.
The two-core rule, which is the whole craft of using it. Wi-Fi and its stack live on core 0 and they are not deterministic: the radio will occasionally take milliseconds and give you no warning. Pin your timing-critical work to core 1 and it stays microsecond-clean. Ignore this and you get a board that works in the office and stutters in a room with four hundred phones in it.
Where it embarrasses you. The ADC is genuinely poor: non-linear near both rails and noisy enough that a fader will jitter unless you average it. Wi-Fi in a full house is a different medium from Wi-Fi in a rehearsal room, and a costume piece that worked in tech can drop out on press night for reasons no logic analyser will show you. If it matters, it is on a wire.
Worked effect: forty wireless pixel batons#
Forty performers, each with a 30-pixel baton, all changing colour together on a cue from the desk.
| Part | Band, each |
|---|---|
| ESP32 devkit | HK$35–90 |
| 30 × WS2812B on a strip | HK$40–80 |
| 18650 cell, holder and protection | HK$60–110 |
| Boost or buck to 5 V, 2 A | HK$40 |
| Tube, diffuser, end caps | HK$80–150 |
About HK$260–470 each, so forty is in the band of HK$10 000–19 000 plus your labour, against a five-figure hire for the nearest commercial equivalent. That comparison is the real content of this example: sometimes building is right, and the way you know is arithmetic rather than enthusiasm.
The design decisions that make or break it.
- Broadcast, do not unicast. Forty unicast streams is forty times the airtime. One multicast or broadcast frame is one. sACN is multicast for exactly this reason.
- Send state, not events. "Everybody go red now" repeated ten times a second recovers from a lost packet on its own. "Change to red" sent once does not, and the one baton that missed it is the one the audience watches.
- Decide what a lost radio means, per cue. Hold the last colour, or fade to a safe amber over two seconds, or go dark. All three are correct in some show. Choosing none of them is not.
- Battery is a show-length problem. Measure the current at the brightness you will actually use, divide, and add a third. Then charge them in a labelled rack, because the failure on this rig is never the code.
Raspberry Pi: a small computer that happens to have pins#
A full Linux computer. Treat it as one: it boots, it has a filesystem that corrupts, it gets updates that change behaviour, and it has no idea your cue is in 40 ms.
Where it wins. Media playback. Talking protocols that assume a computer: OSC, HTTP, MQTT, NDI, Art-Net at scale. Holding a show file. Being the thing that a designer can SSH into and change.
Where it embarrasses you. Boot time, in front of an audience. Filesystem corruption after the power is pulled, which in a theatre is every night unless you stop it. Timing: a Pi will do the right thing 999 times and be 40 ms late on the thousandth, and 40 ms late is a visible miss on a lighting bump.
The three things that make a Pi show-safe, and they are not optional:
- Read-only root.
raspi-confighas an overlay filesystem option. Turn it on. The card stops being writable, so pulling the power stops being a risk. Logs go to RAM or to a network drive. - A watchdog. The hardware watchdog reboots the board if the software stops petting it. A Pi that reboots itself in 25 seconds is better than a Pi that is quietly hung.
- Fixed everything. Static IP. No automatic updates. A pinned OS image, imaged once, cloned to every card, and a copy of that image in the show folder. "It works on mine" is a sentence about a Pi that was not built this way.
Worked effect: the show-control box that is not a product#
A Pi 4 that listens for OSC from the lighting desk, plays four video files to a projector, sends timecode to sound, and closes two relays.
| Part | Band |
|---|---|
| Pi 4, 4 GB | HK$500–800 |
| Industrial SD card or SSD on USB | HK$120–400 |
| PoE or 5 V 3 A supply | HK$120–260 |
| Relay board, opto-isolated | HK$60 |
| Case, panel mount connectors | HK$300–600 |
HK$1 100–2 100 against a commercial show controller starting around HK$25 000. And here is the honest half: the commercial box comes with support, a warranty, a signed off failure mode, and somebody to blame at 23:40. Yours comes with you. That is the decision, and it is a producer's decision as much as a technical one. Class 4 and the systems page are where it gets argued properly.
ESP32 against Pi, on the question that actually decides it#
| The thing you are building | Board | Why |
|---|---|---|
| A cue-triggered pyro-safe relay | Arduino or ESP32 | Deterministic, no OS, no boot |
| Wireless costume pixels | ESP32 | Radio on the die, timing on core 1 |
| A prop that plays a 20 second video | Pi | It has a video decoder and a filesystem |
| Art-Net to 8 universes of pixels | ESP32 for 4, Pi or dedicated node beyond | Airtime and CPU, not principle |
| Reading 12 buttons on a set piece | Arduino | It is a shift register and a loop |
| Turning a stepper on a cue, to a position | Arduino or ESP32, never a Pi alone | Missed steps are the failure and Linux misses steps |
| A touchscreen for the DSM | Pi | It is a computer with a screen |
| An interactive install running for six months | Pi, read-only, with a watchdog | Nothing else survives being ignored |
| Anything that could hurt somebody | None of them, alone | Hardware interlock first, board second |
The last row is not a joke and it is not a disclaimer. A microcontroller is allowed to make an effect happen. It is never the thing between a performer and a machine that can hurt them. The emergency stop is a hardwired circuit that removes power and asks no processor for permission, and Electronics for Theatre Class 15 is the four hours on how that circuit is built.
What each one costs you in time, which is the number nobody quotes#
| Arduino | ESP32 | Pi | |
|---|---|---|---|
| First blink | 10 minutes | 20 minutes | 40 minutes, most of it imaging |
| First useful effect | An evening | An evening | A day |
| Making it survive a run | A day | Two days, most of it radio | Three days, most of it Linux |
| Handing it to somebody else | An hour | An hour | Half a day, because there is an OS to describe |
The last row is the one that gets forgotten in a schedule and then costs a weekend. A build is not finished when it works; it is finished when the next person can run it. That is the capstone standard, and it is on the handover card.
Going deeperMicroPython, CircuitPython, and when not to#
Both boards run Python. It is genuinely pleasant: no compile step, a REPL over serial, and a student who learned Python in Class 2 can be doing something on hardware in ten minutes.
The trade you are making. Interpreted Python on an ESP32 gives you tens of microseconds of jitter where C++ gives you sub-microsecond. For a fade, a relay or a sensor read, that is invisible. For bit-banged WS2812 timing, a stepper at speed, or anything measuring a pulse width, it is the difference between working and flickering.
Use it when the board is doing logic and talking, and the timing is measured in milliseconds. Do not use it when the timing is the point.
The same argument, one layer up, decides between writing your own show controller and buying one, and that is the systems page.
Numbers from this page#
| Number | Value | Why it matters |
|---|---|---|
| Arduino Uno RAM | 2 KB | A few long strings will exhaust it and the symptom looks like hardware |
| ESP32 clock | 240 MHz, two cores | Pin timing to core 1, leave Wi-Fi on core 0 |
| Pi boot | 20–40 s | Never in a cue, always before the house opens |
| WS2812 frame, 170 pixels | ~5.1 ms | The reason a universe is 512 slots and a long string is slow |
| One DMX frame | ~23 ms at full 512 | 44 Hz maximum, and your loop has to fit inside it |
| Safe loop budget at 30 Hz | 33 ms | Anything blocking longer than this is a missed cue |
| Typical relay bounce | 1–10 ms | Debounce in firmware or count one press as three |
| 5 V pixel current, full white | ~60 mA each | 170 pixels is 10 A, and that is a power design not a USB cable |
Where this goes next#
- Class 5 is the four hours where you build one of these and measure it.
- The model box is the project that puts all three families in one rig at 1:25 scale.
- The systems page is the same decision at product scale: buy it, or build it.
- Electronics for Theatre is sixty four hours below the connector, and it is where the power design on this page actually gets taught.