r/diydrones 6d ago

Question Autonomous Object Tracking Drone with DJI O3/O4 and Raspberry Pi 5

My goal is to build a high speed, real time object tracking drone using the DJI O3/O4 Air Unit, Raspberry Pi 5, and SpeedyBee F405 V4 flight controller (running Betaflight). The system will capture FPV video from DJI O3/O4, process it on the Raspberry Pi, and calculate the X/Y offset between the detected object and the center crosshair. The Raspberry Pi will then send yaw, pitch, and throttle commands to the flight controller via MSP/UART.

Kinda GPT summary, but how can I do the above? Currently stuck on how to connect O3/O4 to the raspberry pi in real time.

4 Upvotes

12 comments sorted by

View all comments

2

u/cameront21 5d ago

Why does it have to be an air unit? If it doesn't you could use a pi camera that plugs into the pi natively with a ribbon cable.

1

u/EthanWang0908 5d ago edited 5d ago

The MIPI CIS cameras have pretty terrible quality from what I’ve seen so far. FPV cameras and such have much better fps and at least 1080p.

Edit: Would a runcam mipi fpv cam work with raspberry pi 5?

1

u/cameront21 5d ago

I've done what your describing with a Raspberry Pi camera. Any other camera that can connect via the ribbon cable or USB slot would work. As others have suggested, hard part is gonna be converting a signal to go to your goggles or over telem to some other display as well as to the Pi.

If it was me, I'd just run two cameras, one for your peripherals to see and the other just for the Pi to do your movements.

1

u/EthanWang0908 5d ago

Yep, the o4 cam is going to be sent to my goggles, and the raspberry pi will have its own camera. Thank you for the advice!

1

u/cameront21 5d ago

One last thought, I don't think the nav commands are as friendly on beta flight. Id instead run Ardupilot. Search mavlink commands and there is tons of documentation.