How to build a High-Definition FPV UAV using a Rasperry PI with HD camera, using a high speed WiFi link

After 3 months of research, picking a platform, and building my own HD FPV rig, I decided to write this blog to share my experience. I have been flying FPV for about a year now, and this was the most fun project yet! 

Here is a picture of the finished product:

The platform I picked was the Hobby King 'Go Discover' FPV flying wing. There are many other possible platforms, but to accomplish my goal of creating an HD platform, this bird had the space and wing loading that would accommodate the components. I like the flying wing platform because of the simplicity of the servo setup - only two channels needed for flight. This made it possible for me to use a 6 channel radio and receiver. The Go Discover also has the camera gimbals for changing the viewing perspective in flight, and since I picked  flying wing, I had enough channels left to control the gimbals and the ArduPilot flight modes with a 6 channel radio. My previous FPV plane was the Phantom FPV (also from Hobby King), but its camera space is limited and there was not enough room in the main fuselage to fit all the electronics. The Go Discover turned out to be just right for everything to fit, but with nearly no room to spare. The final rig weighed in at 4.5 lbs, using a 4000mAH 4 cell lipo. 

The final cost was around $700, (not including the antenna tracker, and WiFi receiver), but for full HD, this was not too bad in my opinion, since some HD systems cost this much without the plane and other electronics.

Parts List:

Go Discover Kit ($118)

You can save money by using the PNF version, however I chose to build my own and choose the motor/ESC/receiver combination.

For the motor I picked this 700kv Outrunner ($36) It barely fits, so don't go bigger.

Turnigy Plush 60amp ESC ($35)

4000mAH 4 Cell Lipo ($37)

ArduPilot APM2.6 with GPS ($74)

Ethernet Switch Module ($16.50)

You will need the Ethernet Switch if you want telemetry over the same WiFi connection you will use for the video. To accomplish this, you will need a 'Serial-to-Ethernet converter', which can be purchased here:

Serial-to-Ethernet converter for APM Telemetry over TCP/IP ($22)

Power Supply for Raspberry PI ($7) (Optional if you want to power everything from the main battery).

1000 mAH battery to power the PI and ethernet switch ($11) (Optional if main battery used to power everything)

Raspberry PI with Case ($40)

PI Camera ($25)

Rocket M5 WiFi 5GHZ ($89) Note: you will need to also buy an access point (Nano M5 is here)

I am using the Nano M5 as the access point and an antenna tracker that I built. See my post here on how to build the tracker, or buy your own.

5.8 GHz Planar Wheel RHCP Antennas, you need 2 for MIMO connection using the Rocket M5 ($90) Less expensive antennas may work, but I have good results with these.

6 Channel 2.4 GHz receiver ($13) (Your choice of radio/receiver combo, my radio is a Turnigy 9xR)

2 Digital Servos for the wings ($40) I don't like to skimp on these. These are very good servos.

2 Analog Servos for the Gimbals ($10)

3, 1 Ft, ethernet cables ($7) (One for PI, one for Rocket M5, and One for Serial-to-Ethernet for Telemetry)

Power-over-ethernet cable for the rocket M5 ($5).  You can buy these at any electronics outlet or google it.

Misc RF connectors (Right angle SMA, and a short RG59 cable with SMA) ($10).

Total for Plane: $671.  + Ground station access point ($89),  $760.  I am not including the cost of the antenna tracker, but from my blog, you can build one for about $250.  The grand total should be under $1K, not including your ground station, but I assume you already have one.

Now for the fun part - assembly. I will describe my assembly for the Go Discover, but the process will be similar for any platform you choose. You will need to arrange the parts as you can to get everything in, and also achieve the correct CG. It took a bit of 'trial and error' for me to find the correct combination.

Step 1: Install the motor and ESC.

I chose to build from the back forward, installing the motor, ESC, then battery/electronics, then finally the Raspberry PI and camera. 

From other blogs about the Go Discover, the motor mount is very weak, so I chose to 'beef' it up by adding some EPO foam and epoxying a metal mount designed to support the SK3 motor. Here is a photo of my setup with the ESC and motor mounted in the rear:

Notice the area just in front of the motor mount where I added some extra foam to fill the space that exists in the stock model. I used some old EPO foam from a junk model and glued it into place. The ESC fits nicely right behind the battery. The battery is installed using Velcro to hold it in place. 

Unfortunately, the amount of electronics that exist in this space made it difficult to just swap the battery, but I could not find a way around it, so I leave the battery in place and charge it in the plane. Of course this limits the number of flights per day, but for such an advanced toy, it's a trade off.

Step 2: Install the ArduPilot, GPS and Serial-to-Ethernet converter.

In the middle section, there is a trapezoid-shaped area that I decided to use to mount the Ardupilot, GPS and Serial converter. Here is a picture of the installation:

In the trapezoid area, I cut out some cardboard that matches the shape, and placed it over the battery. I then mounted the 3 components on top of the cardboard cutout. The view of this photo is with the tail of the plane on the top. On the right side of the plane is the GPS module (with some duct-tape holding it in place). It's the purple square-shaped PCB. I used Velcro under the unit also, and for all the other components. 

In the center is the Serial-to-Ethernet converter. To connect it to the Ardupilot, you will need to modify the connector that is normally used to connect to the Telemetry port with the 900mhz transceiver that you can buy from 3-d robotics. There are 4 wires: ground, power, rx an tx.  You can find a schematic here.  I will explain later how to make this work with your PC software (download from the internet). The Serial-to-ethernet converter has the pinout silk-screened on the PCB and it's pretty obvious were to connect the wires. Make sure you connect TX to RX and RX to TX from the converter and the Telemetry port on the Ardupilot. 

Allow the pins of the serial converter to hang over the cardboard so you can plug in the connector, and velcro the unit to the cardboard. 

Finally, on the left side, you can mount the ardupilot.  Connect as usual to the GPS port, and radio. Please refer to the Ardupilot website on how to configure an connect your Ardupilot. I will not cover that portion here. 

Step 3: Install the Ethernet Switch,  Rocket M5 and antennas:

There is a bit of work to do here because the Rocket M5 comes in a big (sealed) plastic case. You MUST cut it out of its case, and you WILL void the warranty. Use a dremmel tool and CAREFULLY cut around the edge of the case (not across the top), and remove it from the plastic case.

It is highly suggested that you get the Rocket M5 and Nano M5 talking to each other BEFORE you install the M5 in the model. Follow the instructions on the Ubiquity website on how to do this. It's basically the same as connecting two WiFi terminals. Each unit has a built-in webpage for configuration. Configure your Nano as an "Access Point" and the Rocket as a client.  You should be able to "ping" both units from your PC and connect the Raspberry PI to the network and ping it also. For my Raspberry PI, I set the IP address of the ethernet port to, and the ground station PC address to  You will also need to set the IP address of the Rocket M5 and the Nano M5 when you configure them. 

Here is a photo of the position of the Rocket M5 installed in the plane after removal from the case:

Note: this view is the front of the model pointing to the right. The ethernet switch is mounted just in front of the trapezoid cutout that was used to mount the ArduPilot. It is mounted with the PCB vertical in the fuselage. Notice the Ethernet cables connected to it in the left side of the above photo. Again, I used Velcro to mount the ethernet switch.  Notice the gray cable. This is the POE (Power over Ethernet) cable that you will need to use to power the M5. You can get one of these on EBay or Amazon.

There are TWO RF connectors (left side of plane) on the Rocket M5 because this is a MIMO setup (Multiple Input, Multiple Output), which is the same technology used in LTE phone networks. The two antenna configuration gives this radio higher throughput, more range, and better SNR, all of which makes this setup work very well.

You should mount the antennas apart from each other, and for my setup I decided to place them on either side of the plane just under the wing. Since the Go Discover has a pretty big fuselage, the antennas don't touch the ground and are cleared by a couple of inches, so unless you go nose down on landing, they should be safe.  Notice the RF connector on the top of the photo. This is the 2nd antenna. The first antenna is mounted directly below the first RF connector on the left side of the plane.

Also, not shown in this picture is the 2nd battery (1000 mAH) and the control receiver, that are mounted under the Rocket M5. The power supply for the Raspberry PI is also mounted in this space, just behind the Rocket M5. 

Note: to hold the Rocket M5, I created a couple of EPO foam mounts to make sure it didn't move, and glued them in place under the M5, and then I used Velcro to hold it down. 

Here is a photo of where I installed the antennas:

Notice the two white posts on either side. These are the 5GHz planar wheel antennas. 

Here is another set of photos showing the RF connectors:

Notice also in the above photo, on the left side is the radio receiver (Orange RX DSMX type for my radio). Out of view (under the M5) is the power supply used to power the Raspberry PI. You can mount this anywhere, but this is a convenient spot.  The placement of the radio is also convenient to connect the servo wires to the ArduPilot.

Step 4: Installing the Raspberry PI and Camera

(More to come)

Views: 29830

Comment by Kabir on September 29, 2014 at 8:15am

Hey Patrick, I no longer the APM and neither do I have a Pi, but you should be able to follow this to get it working

Comment by Patrick Duffy on September 29, 2014 at 9:15am

Hello Kabir, I looked at the post, and it seems not exactly what I need - but close, unless I am misunderstanding the setup. This setup is to talk to the PI via mavlink, not the other way around. What I need is to talk to the APM through the PI's network connection to the Rocket M5 over TCP/IP, and then through the PI via the serial port pins, and then communicate to the APM via the PI.  I think some code work will have to be done on the PI-side to accomplish this, but it can certainly work.

Comment by Artem on September 29, 2014 at 11:59am

Patrick there is a ser2net program for pi, just hook up your telemetry to the Pi's UART (via a logic level converter), the rest is done by ser2net utility. very easy to use, I was experimenting with it about this time last year and was able to establish mavlink with my apm over the internet from my office PC. Here are some links:

all of the links use internet, with just a local network it will be much easier. 

another things, use a cross-hair on your ground-station to increase range, especially since you have a tracker

Comment by Patrick Duffy on September 29, 2014 at 12:05pm

Artem, thanks!  I'll give this a try. I wish I had thought of this to begin with.

Comment by Patrick Duffy on September 29, 2014 at 12:10pm

Someone also posted that the Rocket M5 can be removed without cutting the case. Mine seemed to be epoxied shut, I tried removing all the screws and no luck. Please do try to remove it first without cutting if possible.

Comment by Artem on September 29, 2014 at 12:20pm

@ patrick, how bad is the latency on your video stream? the best I was able to get was 87ms on a local ethernet network with just 640x480 15fps settings. with a 720p stream I could not get below 1.5 second at all, it seams the most delay comes from Pi's low power ARM processor, especially when coupled with cameras streaming  in YUYV format.  A better alternative would be beagle bone black which can offload h.264 on its GPU and than stream that over wifi, you could easily  get 720p with less than 120ms delay. this has already been done, but I cannot find an example right now. 

Comment by Patrick Duffy on September 29, 2014 at 1:03pm

Artem, check out my post on part two of the blog. I am streaming 1280x720 with virtually no latency. I have not measured it, but it's as close to real time as I can see with my setup. This is with a B+ model PI, and standard GStreamer commands.

Comment by Artem on September 29, 2014 at 1:08pm

unfortunately I do not see the part 2, am I blind or you haven't published it yet? 

Comment by Patrick Duffy on September 29, 2014 at 1:23pm

Artem, I think it's waiting approval. Give it a few hours.

Comment by Justin Stiltner on September 29, 2014 at 2:23pm

To save some weight you can make your own POE cable for most of the ubuquiti gear.  If you have the equipment to make your own CAT5 cables you will need nothing else, otherwise you butcher up an existing cable and use the blue and brown pairs to supply the power.  The white/blue should be + and the white/brown should be -.  I have done this a few times and it worked great from a 3s lipo.


You need to be a member of DIY Drones to add comments!

Join DIY Drones

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service