# A reCamera gimbal gets a face-tracking brain

Two Seeed XIAO boards split the work: one sees faces with an OV2640 camera, the other drives brushless motors over CAN bus. The result is a pan-tilt head that follows you around the room.

- Category: Hardware (build)
- Device: [reCamera Gimbal](https://afterware.xyz/d/recamera-gimbal)
- Made by: [Zeller,MA](https://www.hackster.io/Zeller) on Hackster.io
- Original: https://www.hackster.io/Zeller/face-tracking-gimbal-d3c073
- On Afterware: https://afterware.xyz/p/a-recamera-gimbal-gets-a-face-tracking-brain

## Can I build this?

- Difficulty: Intermediate
- AI-buildability: 4/5 (Most of the work is firmware (Zephyr CAN motor control, ESP32 face detection, web UI), with modest soldering and wiring between off-the-shelf boards.)
- Time: A weekend
- Cost: $150–250
- Parts: Seeed Studio XIAO ESP32S3 Sense, Seeed Studio XIAO STM32C5, XT30 2+2 Power Separation Board, Digilent 60W PCIe 12V 5A Power Supply
- Tools: soldering iron, 3D printer, bench power supply

Estimates based on the original write-up. How the AI-buildability score works: https://afterware.xyz/ai-buildability

## Build sheet

- Motor controller: XIAO STM32C5 (Zephyr)
- Vision: XIAO ESP32S3 Sense, OV2640
- Motors: LK3008 + LK3506 over CAN
- Link: UART between MCUs

## Starter prompt

```
Based on "A reCamera gimbal gets a face-tracking brain" on Afterware: https://afterware.xyz/p/a-recamera-gimbal-gets-a-face-tracking-brain

Write ESP-IDF firmware for a XIAO ESP32S3 Sense that captures OV2640 frames, runs on-device face detection, and streams video over Wi-Fi to a browser page. Compute the horizontal and vertical offset of the largest face from frame center and send target pan and tilt angles over UART at 115200 baud. Keep a manual virtual-joystick mode alongside an AUTO mode.
```

## Story

Zeller found a brushless motor assembly pulled from a reCamera Gimbal with no controller attached. Instead of buying a driver board, the build hands the motors to a Seeed XIAO STM32C5 that talks CAN bus, with its onboard transceiver and no terminating resistor to configure. A XIAO ESP32S3 Sense with an OV2640 camera does the seeing, running on-device face detection and streaming video plus a control panel to a browser over Wi-Fi.

The two MCUs share a UART link. The ESP32-S3 sends target angles, the STM32C5 sends back actual motor angles, and the webpage shows both. Switch to AUTO mode and the gimbal turns toward wherever your face sits in the frame. Manual control runs through virtual joysticks and sliders. The STM32C5 side is built in PlatformIO with Zephyr RTOS.

The reusable trick is the split itself: let a camera MCU decide the target and a motor MCU chase it, with a single XT30 cable carrying both power and CAN. The enclosure reuses the reCamera Gimbal's own housing, so the motors fit without custom mounts.

## Resources

- [Project page](https://www.hackster.io/Zeller/face-tracking-gimbal-d3c073)
- [Firmware repo](https://github.com/lewuq/XIAO_Gimbal)
- [Housing print file](https://hacksterio.s3.amazonaws.com/uploads/attachments/2017081/platform-gimbal_(1)_Ib0Fy8Dfpp.3mf)
- [XIAO STM32C5 CAN FD guide](https://wiki.seeedstudio.com/xiao_stm32c5_canfd_usage/)

Tags: face tracking, brushless motor, can bus, esp32-s3, stm32, pan-tilt, upcycled

AI assistants can search all Afterware builds through the MCP server at https://afterware.xyz/mcp (setup: https://afterware.xyz/agents).
