Hardware and pin map
You’ll need:
- an ESP32-S3 board with at least 4 MB of flash (we use the DevKitC-1)
- a Plantower PMS5003 particulate sensor
- a Sensirion SHT30 temperature and humidity sensor
- a 128×64 I²C OLED, with either an SH1106 (default) or SSD1306 controller
- three push buttons (left, right and pair), a breadboard and some jumper wires
- optional: an RGB status LED (WS2812). Every ESP32-S3-DevKitC-1 has one on board
Here’s how it all connects. Pick the breadboard if you’re wiring it by hand, or Proto2 if you have the carrier board.
Breadboard build
Proto2 carrier
Breadboard build
The devkit is too wide for one breadboard, so it spans two, across the rails between them. We cut the rails off the top of the lower board and move them to its bottom edge, for the I²C bus. Jumper wires run to each part, in the usual colours. Turn off the breadboard to see the same wiring point to point. Tap any wire or part to trace it.
Proto2 carrier
The devkit and parts plug into sockets, and the board’s copper does the wiring. The pins are the same as on the breadboard. Tap any trace or part to follow it.
5 V power
5V pinComes from USB through the devkit and powers the PMS5003, whose fan and laser need 5 V.
3.3 V power
3V3 pinPowers the OLED and the SHT30. On the breadboard it runs along the + rail.
Ground
GNDEvery part shares one ground. On the breadboard, one wire takes the devkit’s GND pin down to the lower board’s − rail, and everything else joins it there.
I²C data
GPIO 5The OLED and SHT30 share this line. On the breadboard it has its own rail in the bottom strip, with one wire up to the devkit. The bus runs at 400 kHz and needs pull-ups: most breakouts have them already, and if yours don’t, add 4.7 kΩ to 3.3 V.
SDA400 kHz
I²C clock
GPIO 4The clock for the same bus, shared by the OLED and SHT30. On the breadboard it runs along the strip’s other rail. It needs a pull-up too.
SCL400 kHz
ESP TX → sensor RX
GPIO 18The ESP32-S3 talks to the PMS5003 here, at 9600 baud. TX always crosses to RX.
UART9600 baud
Sensor TX → ESP RX
GPIO 17The PMS5003 sends its particle readings here, at 9600 baud.
UART9600 baud
Right button
GPIO 15Cycles the screens. Wire it to ground: the chip’s internal pull-up keeps the pin high until you press. Hold the pair button for 3 s to start Bluetooth pairing.
Left button
GPIO 6Cycles the screens the other way. Like the right button, it connects the pin to ground when pressed. Hold the pair button for 3 s to start Bluetooth pairing.
Pair button
GPIO 7Hold it for 3 s to start Bluetooth pairing. Like the others, it connects the pin to ground when pressed.
ESP32-S3 devkit
DevKitC-1Runs the firmware. Every signal we use is on one header, and the status LED shows the AQI colour (GPIO 48, or 38 on v1.1 boards).
PMS5003
particle sensorCounts particles with a small fan and a laser. It runs on 5 V, but its data pins use 3.3 V logic, so they connect straight to the devkit. It plugs in on a 4-wire cable (TX RX VCC GND) and sleeps and wakes by UART command, so SET and RESET stay unconnected. Cable pin orders vary, so match the labels.
OLED display
SH1106 or SSD1306A 128×64 screen on the I²C bus, at 0x3C or 0x3D. Modules order their pins differently, and some swap GND and VCC, so check yours before you plug it in.
0x3C0x3D
SHT30
temperature + humidityShares the I²C bus, at 0x44 or 0x45. It sits on wires, away from the devkit’s warm spots, so the temperature stays honest.
0x440x45
Breadboard
Two boards, because the devkit’s headers are 25.4 mm apart. It spans the seam, leaving four free holes below each signal pin. Holes in a short column of five are joined, so a wire there connects to that pin. The lower board’s top rails would sit under the devkit, so cut them off (a sharp knife through the backing works) and stick them along its bottom edge. That strip carries SCL and SDA; the long rails above it carry 3.3 V (+) and ground (−).
Proto2 board
rev ISingle-sided and all through-hole, so you can solder it by hand. The traces here are simplified; the board files have the real routing.
R1, R2
4.7 kΩI²C pull-ups from SDA and SCL to 3.3 V. They’re built in, so your breakouts don’t need their own.
C1–C4
capacitors47 µF and 100 nF on 5 V, 10 µF and 100 nF on 3.3 V. They keep the supply steady for the sensor and the radio.
| Part | Signal | ESP32-S3 pin |
|---|---|---|
| OLED + SHT30 | SDA | GPIO 5 |
| OLED + SHT30 | SCL | GPIO 4 |
| PMS5003 | sensor TX → ESP RX | GPIO 17 |
| PMS5003 | sensor RX ← ESP TX | GPIO 18 |
| Right button | active-low | GPIO 15 |
| Left button | active-low | GPIO 6 |
| Pair button | active-low (Proto2) | GPIO 7 |
The PMS5003 needs only four wires: TX, RX, VCC and GND. Since firmware v0.4.4 it rests between samples by UART command, so SET and RESET stay unconnected; the sensor pulls them up itself. If your breadboard still has them wired to GPIO 8 and 16, that’s fine too.
This is the map for the Proto2 carrier board. If you wired a breadboard before it, yours probably uses SDA 8, SCL 9, sensor TX 18, sensor RX 17 and buttons 4 (right) and 5 (left). Rewire it, or keep using firmware from before the change.
- I²C: the OLED and SHT30 share one 400 kHz bus at 3.3 V, and it needs pull-up resistors. Most breakouts already have them. If yours don’t, add 4.7 kΩ from SDA and from SCL to 3.3 V, like Proto2’s R1 and R2.
- PMS5003: it needs 5 V power, and its UART runs at 9600 baud with 3.3 V logic. Cable pin orders vary, so wire by the labels.
- Status LED: the firmware sends the same signal to GPIO 48 and 38, so the devkit’s LED lights on either board revision. Leave both pins free.
- Buttons: wire to ground; the chip’s internal pull-ups do the rest.
At boot, the firmware looks for the SHT30 at 0x44 or 0x45 and the OLED at
0x3C or 0x3D. If a part is missing, it’s logged and the rest keeps working.
The OLED controller can’t be detected, so choose it at build time
(OLED_CONTROLLER=sh1106 or ssd1306) or grab the matching release image.
src/board.rs in the device repository is the source of truth for pins. The
board itself, with schematic, Gerbers and BOM, is in
open-aiq/hardware. Stuck on wiring?
Ask us in a GitHub issue.
Buttons
Section titled “Buttons”There are three: right, left and pair.
| Press | What happens |
|---|---|
| Right | Next screen: AQI, Readings, Network |
| Left | Previous screen |
| Hold pair for 3 s | Opens Bluetooth pairing for 5 minutes. Holding it again restarts the 5 minutes |
On a breadboard, wire the pair button from GPIO 7 to ground, like the other
two. Without one, you can still open pairing by typing BTN:PAIR in the
serial console.
Flash layout
Section titled “Flash layout”partitions.csv holds two 1.94 MB app slots (ota_0, ota_1), which enable
over-the-air updates with rollback. It fits any ESP32-S3 module with
4 MB of flash or more. Provisioning settings live in nvs and survive updates.