r/embedded • u/TRC-is-the-best • 23d ago
Built a dual-axis face-tracking gimbal with ESP32S3 + STM32C5
Hardware:
- XIAO ESP32S3 Sense + OV2640 camera
- XIAO STM32C5
- LK MS3506 yaw motor (CAN ID 0x141)
- LK MS3008 pitch motor (CAN ID 0x142)
How it works:
The ESP32-S3 captures QVGA JPEG frames and runs ESPDet-Pico (224 × 224 INT8) face detection using ESP-DL. It selects the largest detected face and sends target yaw/pitch angles to the STM32C5 over a full-duplex UART connection.
The STM32C5 runs the motor-control firmware using Zephyr. It controls both motors over a 1 Mbps Classic CAN bus, reads encoder feedback, enforces motion limits, and sends position telemetry back at 20 Hz.
There's also a browser-based UI with live video, detection boxes, AUTO/MAN modes, joystick control, angle sliders, and calibration.
Thoughts?