← Baunuri

REV A · 65 × 57 MM

Baunuri HAT

One board for my robots

A Raspberry Pi HAT-sized controller board with an ESP32-S3, two servo buses, an IMU, a speaker amp, microSD, CAN and RS485. I designed it for Popm, and XL-Duck now runs on it. The design is open source, and if you'd like a board, get in touch.

3D render of the green board at an angle: the ESP32-S3 module with its antenna over the left edge, the 40-pin header row along the top, white JST plugs along the bottom edge, servo and battery pads on the right

Why

Popm started on a stack of small boards: an ESP32 servo driver board, an IMU breakout, an amp breakout, a buck converter, a charge diode and the wires between them, all inside a 17 cm egg.

This board puts all of that on one PCB the size of a Raspberry Pi HAT, and adds what the next robots need: a time-of-flight sensor plug, microSD, CAN and RS485. It runs a robot on its own, or sits on a Pi 5 when a robot needs more brain. Popm was the first robot to use it, and XL-Duck moved onto it in November.

Why a microcontroller and not a Pi or another Linux board: a trained walking network fits on the ESP32-S3 (XL-Duck's runs in about 2.4 ms a step), so a robot built on it just switches on and drives, with nothing to boot or shut down. It still has compute to spare for the rest, such as synthesizing XL-Duck's voice while it walks. When a robot needs more brain, the Pi header is there: a Raspberry Pi, or a Jetson with the same 40-pin header, sits on top. Underneath, it's simply a convenient board for hooking up servos or other drives over CAN and RS485, with a reasonable set of sensors.

What's on it

Top view render of the board: the ESP32-S3 module on the left, the Pi header along the top, CAN and RS485 plugs below the module, buck converter parts in the middle, two 3-pin servo plugs, and I2C B, I2C B, Qwiic and ToF plugs along the bottom edge; battery pads, UART plug and microSD slot on the right
Top: some connector 3D models are missing from the render (XT30, microSD slot, servo plugs)
Bottom view render of the board: the 40-pin header footprint along the top, the GPIO expander, IMU, 3.3 V regulator, CAN and RS485 transceivers, test pads and the silkscreen 'baunuri.com POPM-HAT rev A'
Bottom: the Pi header, the expander, the IMU, the CAN and RS485 chips, and the status LED

On a Pi, or on its own

The holes and the 40-pin socket match a Raspberry Pi, so the board can sit on top of one. On a Pi 5 it needs a tall stacking header and 15–16 mm spacers, otherwise the microSD card and the battery lead run into the Pi's Ethernet and USB jacks.

The Pi and the ESP32 talk over a UART, and the Pi can reset the ESP32 or put it into its bootloader. The Pi's 5 V can run the board's logic, but the robot's battery never feeds the Pi. Without a Pi, the ESP32 runs the robot by itself.

Specs

Size
65 × 57 mm, Raspberry Pi HAT hole pattern, 4 layers
MCU
ESP32-S3-WROOM-1 (N16R8): Wi-Fi, 16 MB flash, 8 MB PSRAM, USB-C
Servos
2 half-duplex serial buses (74LVC2G241), Molex SPOX plugs, battery voltage
Sensors
LSM6DS3TR-C IMU; plugs for an 8×8 ToF and Qwiic
Sound
MAX98357A amp, speaker plug
Storage
microSD (SPI)
Buses
CAN (SN65HVD230), RS485 (SP3485), UART, 2 × I2C
I/O
TCA9555 16-bit expander, status LED, BOOT button
Power
2S–4S pack on XT30, 5 A fuse, 5 V / 2 A buck, 3.3 V regulator; no switch, no charge port
Build
104 parts assembled by JLCPCB; the 40-pin stacking header soldered by hand

Bring-up

I ordered rev A on November 10, 2026. When the boards arrived, a test sketch checked every part it could reach over USB, then on a 3S pack with a servo plugged in:

PASS  module       16 MB flash, 8 MB PSRAM
PASS  imu          answers, accel reads 1 g, INT
PASS  expander     set up at 0x20
PASS  tof lpn      the ToF's enable line
PASS  sound        a beep, heard
PASS  wifi         sees networks
PASS  status LED   (on the bottom side)
PASS  can          a frame out and back (JP1 bridged)
PASS  microSD      FAT32, ~0.75 MB/s write, 1.3 MB/s read
PASS  battery      11.2 V, the servo reads 11.3 V
PASS  servos       STS3215 at 1 Mbps, within 0.4°
----  tof sensor   not yet
----  i2c bus B    not yet
PASS  rs485        XL-Duck's servos, 1 Mbps
----  uart         not yet

Popm's firmware already runs on it: its Wi-Fi, its phone page and its sounds, plus a new page for uploading songs to the microSD. The servos, IMU and OLED eyes aren't ported yet.

On the servo bus, an STS3215 answered and moved to within 0.4° of each goal, but a 90° move took 875 ms and peaked at only 190°/s, short of its rated speed. A position trace showed why: it ramps up at about 435°/s², whatever the acceleration register is set to. The cap is a servo register documented as factory read-only, the acceleration limit (85), set to 50 × 8.7°/s². It takes a write anyway, and at 254 the same move takes 455 ms and peaks at 286°/s, the servo's top speed (register 84).

XL-Duck was next, and it now runs entirely on the board. Its RX-28 Dynamixels hang off the RS485 port: the ESP32-S3's UART0 in its hardware RS485 half-duplex mode, at 1 Mbps, Dynamixel Protocol 1.0. The on-board LSM6DS3TR-C replaced the duck's old GY-521 (MPU-6050) module; the board sits upside down in the duck, so the firmware flips the IMU's axes. The duck's walking networks run unchanged, in about 2.4 ms per step, and the MAX98357A gave it a voice: a synthesized quack and a keyboard to make it sing.

Design

The schematic is written as code, in Python with SKiDL, which generates the netlist for KiCad, where the board is placed and routed. Four layers: signals on the outside, a solid ground plane and a signal layer inside. A script checks the board before it goes to the fab. Some choices in it:

Pin map

Servo bus
UART1: TX 17, RX 18, DIR 16
RS485
UART0: TX 43, RX 44, DE 8
CAN
TWAI: TX 41, RX 42
I2C A
SDA 6, SCL 7: IMU (0x6A), expander (0x20), ToF (0x29), Qwiic; IMU INT 15, ToF INT 14
I2C B
SDA 4, SCL 5: the two I2C_B plugs
Sound
I2S BCLK 10, LRC 11, DIN 12; amp shutdown 9
microSD
SPI: MOSI 38, MISO 47, SCK 21, CS 13
UART plug
UART2: TX 39, RX 40 (shared with the Pi's UART)
Other
Battery sense 1 (ADC), status LED 48, BOOT button 0

Open source, and getting one

The design is open source, on GitHub at baunuri/baunuri-hat: the SKiDL schematic, the KiCad board, the pin map, the bring-up firmware, and the exact Gerbers, BOM and placement files that went to JLCPCB, so you can read it, change it and order your own. The hardware is under CERN-OHL-S v2 (if you share a modified board, share its design too), the firmware under MIT and the docs under CC BY 4.0.

If you'd rather have a ready-made board, get in touch.

What's next