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 192.168.1.2, and the ground station PC address to 192.168.1.1.  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: 29104


100KM
Comment by Hein du Plessis on September 28, 2014 at 11:22pm
Wow thanks for this, I'm going to give it a go.

MR60
Comment by Hugues on September 28, 2014 at 11:29pm

Well done! A true diy project. Can you explain a bit more why you have chosen WiFi over 433,900 or 1.3 transmission? 


Developer
Comment by Kabir on September 29, 2014 at 12:24am

Nice :) I suggest that you simply connect the APM to the Pi via serial and open a UDP stream(e.g via mavproxy) to the GCS from there. That's what I do on all my custom systems now.


100KM
Comment by Hein du Plessis on September 29, 2014 at 12:25am

What kind of range are you getting? @Hugues - 433 and 1.3 doesn't have enough "resolution" to carry the high bit rate required.


100KM
Comment by Hein du Plessis on September 29, 2014 at 12:28am

@Kabir - have you considered breaking out to 3G / LTE? I'm looking for a modem that I can plug into the on-board ethernet switch to break out to allow incoming connections from the mobile network to the video stream or the telemetry UDP port.


Developer
Comment by Kabir on September 29, 2014 at 1:52am

In India, we simply don't have proper 3G/4G coverage to justify converting my systems :(

I would have liked to do extensive testing with Rocket M5s, but stopped due to lack of funds/hardware.


100KM
Comment by Hein du Plessis on September 29, 2014 at 2:00am

Yea it gets expensive, especially on a DIY budget.

Comment by Georacer on September 29, 2014 at 3:02am

Thanks for including an Ubiquity radio in your project, Patrick. I always wanted someone to do a proof of concept for these radios.

Comment by Juraj Kolesar on September 29, 2014 at 3:42am

Nice ideas. I am playing also with RasPi cam with good results. We have RasPi with USBwifidongle onboard, which has at least 2x bigger range coverage than the 3DR telemetry module. So we thought how to transmit telemetry via TCP-IP. Serial to Ethernet convertor seems to be pretty simple solution.

@Kabir is there some detailed description for what you suggest (PiSerial via MavProxy). This was the way how we wanted to solve it before this post.

Comment by Gerard Toonstra on September 29, 2014 at 4:22am

Very nice. Should it not be possible to receive uart/telemetry stream on the rasp Pi directly and avoid the extra hardware?  Looking forward to a recorded video to see if you get any dropouts during the flight.

Comment

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

Join DIY Drones

Groups

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

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service