Lab bench wiring
This page is the bench reference for the Phase 1 developer build: an ESP32 DevKit, an HX711 breakout, one load cell and a DS18B20 on a breadboard. It lists exact GPIO numbers, wire colours, an interactive schematic with a 3D bench view, and the power map. The production pod uses a different pin map; see production wiring.
Interactive wiring diagram
The schematic is the pin-to-pin map. Switch to 3D to orbit the bench. Click a wire or part for details. Power to the DS18B20 leaves the ESP32 3.3V pin, not the 5V USB rail.
Rendered with wire-diagram. Toggle Schematic / 3D in the canvas corner.
Complete pin allocation
| Function | ESP32 pin | Wire colour | Connected to | Notes |
|---|---|---|---|---|
| HX711 SCK (clock) | GPIO 17 (pin 28) | Blue | HX711 SCK pin | Firmware clock output |
| HX711 DT (data) | GPIO 16 (pin 27) | Orange | HX711 DT pin | Firmware data input |
| DS18B20 Data | GPIO 4 (pin 26) | Brown / Yellow | DS18B20 DQ + 4.7 kOhm pull-up to 3.3V | Mandatory pull-up resistor |
| DS18B20 VCC | 3.3V (pin 1) | Red | DS18B20 VDD pin | Do not use 5V |
| HX711 VCC | 5V (pin 19) or 3.3V | Red | HX711 VCC pin | This lab build uses 5V; the board accepts both |
| System GND | GND (pin 14) | Black | All GND pins (HX711, DS18B20, ESP32) | Must be common ground |
| I2C SDA (reserved) | GPIO 21 (pin 33) | Purple | Future humidity sensor | Do not connect anything yet |
| I2C SCL (reserved) | GPIO 22 (pin 36) | Grey | Future humidity sensor | Do not connect anything yet |
| Battery ADC (reserved) | GPIO 34 (pin 5) or GPIO 35 (pin 6) | White | Future voltage divider | Input-only pins, do not use for output |
Use the interactive schematic above for both the weight and temperature chains.
Firmware check: esp32-temperature.ino in the beehive-sensors repo currently defines HX711 DOUT on GPIO 19 and SCK on GPIO 21. Either rewire to those pins or change the two #define lines to GPIO 16 and 17 before flashing.
Breadboard layout
Left - power
- Top red rail: 5V from ESP32 USB
- Bottom blue rail: common GND
- A short 3.3V tap from the ESP32 3.3V pin for DS18B20 and the pull-up
Center - ESP32 + HX711
- Rows 10-11: ESP32 DevKit
- Rows 20-21: HX711, close so DT/SCK stay short
- Leave empty rows around both boards for jumper access
Right - sensors
- Row 30: 4.7 kOhm between 3.3V and the data node
- Rows 35-36: DS18B20 connector, brown/yellow to GPIO 4
- Load cell: screw terminals on HX711, not the breadboard
| Row | Component / connection | Notes |
|---|---|---|
| Top rail (red) | 5V from ESP32 USB | Powers HX711 VCC and ESP32 5V pin |
| Bottom rail (blue) | GND common bus | All GND connections meet here |
| Row 10-11 | ESP32 DevKit mounted | Leave space around the board for wiring access |
| Row 20-21 | HX711 board mounted | Close to ESP32 for short signal wires |
| Row 30 | 4.7 kOhm resistor between row 30 and row 35 | One end to 3.3V, other to DS18B20 data |
| Row 35-36 | DS18B20 probe connector | Brown wire to GPIO 4 via row 35 |
Pre-power checklist
Before applying power for the first time, verify every connection against this list:
First power-on sequence
- Connect the USB cable to the laptop.
- Open a serial monitor at 115200 baud.
- Press the ESP32 reset button if serial output does not start automatically.
- Check that firmware prints
HX711 found,DS18B20 found, and initial readings. - If anything fails, use the troubleshooting sections on the individual wiring pages.