Introduction: Micro GPS Quadcopter
This project is my attempt to make the smallest GPS-enabled quadcopter that can do both distance (safely, with Return To Home) and also speed/racing/proximity. It seems like you either get one or the other, and if you do want to get a GPS quad, that it has to be HUGE. Similarly with racer quads, you can't fly them long distance.
Another aim was to make something reasonably affordable for the average DIY enthusiast. There's no end of awesomeness possible with an unlimited budget, but I'm always interested in what components are out there that give the best bang for buck. For hobbyists who already have some common gear, like radio and FPV goggles, this build should come in at around $170 USD.
This little quad is a lot of fun to fly and has plenty of go. It's not necessarily going to win races, due to the compromises I had to make to fit everything under the hood, but you can still zip around and thru trees and all the proximity flying fun.
For U.S. hobbyists out there, it's also well under 250 grams, so you don't need to register it with the (stupid) FAA! Actual take-off weight will vary, but my one came in at 188 grams, even with a couple of heavier-than-necessary components I have had to compromise on.
I am assuming you have some hobby/radio control experience. I'll be using a lot of acronyms here and there, with some explained below for those who are not sure:
- FC - Flight Controller
- ESC - Electronic Speed Controller
- PDB - Power Distribution Board
- RX - Receiver
- TX - Transmitter
- LiPo - Lithium Polymer (battery)
- CF - Carbon Fiber
- FPV - First Person View
- VTX - Video Transmitter
Things You'll Need
This is a completely custom frame design, made from CF sheet and aluminium spacers, while the canopy is made from an ordinary spring water bottle. I'll endeavour to put links for where you can get these frame parts in subsequent sections.
The tools you'll need are:
- power drill
- scroll saw (or a CNC machine if you're lucky enough to have one!)
- soldering iron
- hobby knife
- heat gun (for making canopy)
- Dremel (with cutting wheel)
- metal file (square)
- metal file (round)
The Flying Fun
Here is a video which is a raw recording (from some video goggles) of the 5.8G reception from this little quad. It was a pretty cloudy day, so lighting is far from ideal. It is, however, a good demonstration of the quad itself, and the various components, like the AOMWAY video transmitter, micro camera, Naze FC, DYS motors, etc.
The slight transmission glitches here and there are more from the fact that I put a temporary (and stripped-down) linear-polarized 5.8G antenna for this flight. (I'm still waiting for my light-weight CP antenna).
Youtube link: https://youtu.be/Mefi1L6Ha2I
Step 1: The Plan
Pictured is a scan of the 1:1 scale drawing giving the motor layout, and placement of various components like the flight controller, power distribution board, etc. Hopefully you can find all the critical dimensions from this. The dark blue grid is 1cm square, with 1mm light blue grid.
The frame has an upper plate, lower plate (which is smaller), four rectangular shaped arms (rounded at one end), all connected by four aluminium standoffs (two at front, two at rear spaced further apart). The arms can then be kept from swivelling by cable ties, or just by friction from tightening the top/bottom bolts into the four standoffs.
All of the power distribution and LiPo battery are on the lower level, with the flight controller, receiver and FPV components on the upper level. The GPS receiver is best mounted somewhere above everything else, to avoid interference, and towards the back to keep it as far away from the video transmitter as possible.
Step 2: Electronic Components
The major components are pictured here. Below is a list of them and links to where you can buy them:
- DYS 1104 brushless motor combo - ~ $80 USD
- Naze32 10DOF (w/ compass and baro) - ~ $20 USD
- Matek 5-in-1 power distribution board - ~ $9 USD
- AOMWAY 5.8g 200mA video transmitter - ~ $23 USD
- 800TVL CMOS camera - ~ $13 USD
- Ublox 7 GPS - ~ $14 USD
- CP antenna
- 450mAh 3S LiPo battery - ~ $10 USD
You also need other general hobby/RC equipment, which it is assumed you already have:
- 2.4GHz radio transmitter and receiver (PWM or PPM)
- 5.8GHz FPV receiver and monitor/goggles
- LiPo battery charger
Step 3: Power Distribution
Next thing is to solder the ESCs and the JST battery connector to the PDB.
Lay the ESCs and PDB over the plan to estimate how long the red/black power wires will need to be. The PDB will be position all the way at the front, on the lower level, and the ESCs will be on the underside of each arm. I shortened the two front ESC wires, and had to lengthen the wires to the two rear ESCs (as pictured).
Also, make sure you orient the Matek PDB the right way around. The three-pin connector should be pointing towards the rear of the quad. These pins will be use later and will be pointed UP to go through a hole in the upper frame plate.
The JST battery connector will go through a hole in the lower carbon fiber plate, and should be relatively short (as pictured).
Step 4: Setup Flight Controller
To save weight, and so that everything will fit inside the canopy, I opted to solder the RC input wires and the GPS wires directly to the Naze32 FC (as pictured).
TIP: do all this setup on a plastic board, or over the paper plan, ie. not near anything conductive! It's very easy to short out the delicate electronics while doing this setup!
There are many guides online on how to do the setup/wiring for the Naze32. Here is one for Rev5.
I found that the factory firmware on the FC was quite old, or not compatible with CleanFlight, so had to flash it with the latest version first.
I have setup my OrangeRX 6 channel receiver (pictured here with the orange plastic case removed to save weight/size). This is a non-PPM receiver, so there's a separate wire per channel, plus a ground (black) and 5V (red) wire going to the Naze32. For such receivers and GPS, the Naze has a strange convention where the rx/tx from the GPS must go to pins 3/4 on the Naze, with the regular flight channels (AIL, ELE, THR, RUD) on each side, on pins 1,2 then 5,6. Aux1 and Aux2 are then on pins 7,8.
PPM receivers just have the single signal wire go to pin 1 (and ground/5V wires to usual pins), and GPS rx/tx to pins 3,4.
I did the setup of the Naze32 (in the CleanFlight configurator software) with the pictured setup. The Matek PDB has a 3-pin connector for attaching to an AUX channel on receiver (this is for manually turning on the beeper and/or LEDs), but is also very handy as a way to get the regulated 5V power to your receiver and Naze FC. (in picture this is the three-wire lead going from PDB to receiver, into its AUX2 channel)
With all of this setup, make sure CleanFlight is reporting the receiver channels correctly, and a valid GPS signal. It's harder to make changes to all of these connections later on when it's installed, so better to get it right at this stage.
Solder the motor output pins
The Naze32 FC comes with two sets of pins which you can solder to the board. There are straight, and 90 degree (bent) pin sets. Take the straight set (the 6x3 straight pin set), and cut off the last two 3-pins from one end so that you have 4x3 pins. Solder these pins onto the underside of the Naze, occupying outputs 1-to-4 (of the 6). Outputs 1-to-4 will be for connecting the four ESC's signal cables.
The LEDs of the Naze should be showing in the upper side, with the pins now soldered onto the underside (to outputs 1-4)
Step 5: The Frame Plates
The frame has an upper and lower Carbon Fiber plate. The upper plate was made with 1.5mm thick sheet, and the bottom plate uses 1.0mm. You could opt to use 1.0mm for both top and bottom and it should be plenty strong enough. (or 1.5mm for top and bottom to lower costs)
But, the four arms should be at least 1.5mm thickness to be strong enough in a crash. (if you have any, maybe use 2.0mm)
I got my CF sheet from eBay. Here are some links:
Scratch the shape of the plate (measured from the plan) onto the CF sheet. I used the point from a compass, but you can use anything sharp (and pointy!)
TIP: make sure you keep well clear of the fine CF dust that is produced when cutting! Do this outside, or in well ventilated area. The dust is very toxic.
I then cut out the plates using my scroll saw, keeping safely just wide of the lines. After cutting out the whole piece I then used a Dremel with a cutting wheel attached to trim the plate to the scratched lines, and to clean up the pieces.
Next, drill four 3mm holes for mounting the Naze FC. (refer to the plan). These should form a 30.5mm square, which is a standard size for these boards.
You will also need to cut a rectangular hole (see 3rd picture) for connecting a standard 3-wire RC servo cable to the Matek PDB's 3 pins. I don't have the position of this on the plan, unfortunately. Just place the PDB over the CF plate, in its proper position, and mark where the 3-pins will be (when bent upwards, to go through this CF plate).
Lining up the upper/lower plate holes
This is probably the most critical part of the frame build. You can either measure out where there four 3mm holes will be, on upper plate and lower plate, drill the four holes in each plate, then hope they line up. Or, you can scratch alignment lines on the upper and lower plate, eg. from some known common point like the CENTER of the quad, then stick the two plates together with double-sided tape, then drill the four holes from points marked on, say, the top plate.
This way the four holes will line up exactly. if these are out of alignment by even a millimeter, the frame will have a twist in it and will result in the arms being uneven and not level with each other.
Step 6: Connect the Arms
Cut out four arms (measuring 12mm x 62mm), and trim one end with a Dremel to give a rounded end.
Drill a 3mm hole at one end (refer to plan, for the distance) for connecting to the main plate, with M3 bolt and aluminium standoff (should be 12mm long). I only had 20mm aluminium standoffs, and had to cut them down to 12mm :-( (was a major pain)
TIP: scratch a center-line down the CF arms. These will be used later for lining up the arms. (refer to 3rd picture)
Step 7: Drill Motor Mount Holes
The 1104 DYS motors have mounting holes 9mm in diameter. Mark where the center of the motor will need to be (refer to plan) then scratch a diagonal line and mark where the two mounting bolt holes will be (ie. 4.5mm from each side of center, along the diagonal line). Drill 2mm holes.
Next, change to a 5mm drill bit, and widen the center hole (see 2nd picture).
The 2mm bolts included with the DYS motors are about 6mm long (I believe), which is too long for these arms. If the bolts touch the inner windings of the motors, you will get stuttering in the motors, or at worst, the motor will go up in smoke! So, I had to trim the bolts down (using a Dremel) to about 4mm long.
Test-fit each motor to make sure the 2mm mounting bolts fit. Also, orient the motor so the three wires are pointing inwards towards the frame.
TIP: after tightening the mounting bolts, flick the propeller and make sure the motor turns without resistance. If it seems to be rubbing, unmount the motor then use a round file and file away some of the center hole. Repeat mount the motor until the propeller spins freely.
Step 8: Install the Power System
Now you need to insert the soldered PDB and ESCs into the lower level of the frame.
The JST battery connector needs to be pulled through the hole in the lower plate (see 2nd picture).
Once everything is in position, cable tie the ESCs to each of the arms.
The ESC signal wires (twisted) will be routed outside of the frame, to the upper level. Just leave them loose for now.
Solder motor wires to ESCs
Now you need to solder the three motor wires to the three ESC (output) wires. It doesn't matter which three you connect with which at this stage. But these are the steps you need to follow (with each motor):
- trim the silver-coated ends of the exposed motor wires down to about 4mm. (for some reason these DYS motors have a huge amount of exposed wire)
- Cut some 3mm heat shrink tubing and place over each motor wire.
- Pre-tin (solder) the motor wires and the ESC wires (separately)
- Solder the three motor wires to the three ESC wires, making sure the heat shrink tubing is still in place!
Do not shrink the heat-shrink tubing yet! (See 3rd picture for reference)
Step 9: Verify the CW/CCW Motor Directions
This next step is to ensure each motor spins in the correct direction! (clockwise or counter-clockwise)
You need to follow this setup for each of the four motors one-by-one.
Before you start, refer to the 1st picture above, and make sure you are doing this with ALL motors/ESC wires not touching each other! Just bend two wires (on each motor) so that they are well clear of the middle wire, or if you are especially worried, put a piece of sticky tape temporarily over the exposed solder.
The Naze32 (and most other quadcopter FC's) have a motor layout convention, and have the motor directions going CW, CCW (for front-left, front-right motors) and CCW, CW (for rear-left, rear-right motors). This step is about ensuring each of the brushless motors spins in the correct way.
For each motor, follow this procedure:
- connect the ESC's signal wires to the receiver's THRottle channel.
- Turn on your transmitter, with throttle low/off.
- power up the PDB, and wait for the beeps.
- Move the throttle stick on your transmitter and note which way the motor turns.
- If the motor is NOT turning the correct way, remove the battery (ie. power down) and swap any two wires between the motor and ESC. (ie. with soldering iron)
- Re-test as above, just to make sure.
Once you have finished each motor, you are then safe to shrink the heat-shrink tubing over the exposed solder, to protect them. (refer to 2nd picture).
And, once this is done you are then free to put a final cable tie over the whole wire/ESC mess to keep it all tidy! (probably removing the place-holder cable tie that was there before)
Step 10: Initial Flight Testing
At this stage you can do some initial flight testing, and PID tuning of the Naze32.
I just double-sided taped the GPS receiver to the front of the frame, to keep it out of the way. (and cable tie the cable to one of the nylon standoffs!)
TIP: Do the initial tests with the propellers off, just in case something is wrong with the Naze config!
Once you have verified that arm/disarm works properly, and that throttle up/down behaves, then install the propellers, and verify that all of the primary flight controls (AIL, ELE, RUD) are correct. (If either goes in the wrong direction, you will need to set a Reversing in your radio transmitter)
For those of you who don't like PID tuning (like me!) here are the ones I have in mine:
PID Controller: MultiWii Rewrite
Proportional Integral Derivative
ROLL 1.7 0.040 20
PITCH 1.7 0.040 20
YAW 4.5 0.055 0
To help the barometer sensor have fewer fluctuations in measurements while in flight, you can tape some breathable foam over the sensor on the Naze32 board. Refer to the PDF guide for where this is located.
Step 11: Install FPV Components
This was a step I did a little after-the-fact. If I knew the exact dimensions of the video transmitter and camera I probably could have planned this a little better, but still, the frame is fairly easily separable for modifications like this.
The camera mounting is easy. Just double-sided tape it to the upper frame plate as pictured. Then, given it's length you can then position the 5.8GHz video transmitter vertically, with the connectors pointing down (and through the frame), and the SMA connector pointing up (which will go through the plastic canopy).
TIP: the particular video transmitter and camera you use will dictate where and how you position these, and how you do the subsequent wiring.
One other constraint is how you feed power to the video transmitter. The AOMWAY is awesome, as it lets you feed the raw volts from the PDB to it (I stripped/trimmed the supplied cable) which then supplies a clean 5V to the micro camera. Again, I stripped/trimmed the supplied camera cable to the required length.
Once all is in place, do a quick power test, and make sure you can receive the video properly in your own monitor (or goggles).
Step 12: Making the Canopy
The canopy really adds the Wow factor to this build. On a practical front, it also adds considerable protection to the FC and other electronics. And, in cases where you could encounter some moisture/rain, it protects the sensitive electronics from water-related shorts.
By far the hardest part of this step is making the mold! I carved mine from a block of balsa wood. Again, refer to the plans for the required dimensions.
Once you have carved/sanded the mold, it's simply a matter of putting the mold inside a PET plastic bottle (I used a small spring water bottle) and using a heat gun to shrink it around the mold.
Use a hobby knife and cut a line down the center of the canopy, on the underside (in a Y-shape). You should then be able to remove the mold relatively unharmed.
Then you need to trim the plastic canopy to fit. This will take a number of attempts where you make small cuts, to leave room for the arms, etc, with repeated test-fits. See 3rd pic for reference of the desired final result.
Feel free to choose your own color scheme, although I think good-old black looks awesome!
With the unpainted canopy fitted, mark with a pen where the Naze32's LED lights are. Basically, if you leave this area unpainted, you will be able to see the FC's status, including whether it has a GPS lock!
Now, turn the canopy upside-down, and paint the inside of the canopy. This will result in a much smoother look on the outside! See 5th picture for reference.
Making holes for Camera and vtx antenna
This is a little tricky, plus you sort-of only get one chance at it. As long as you have your mold, however, you can always crank out more canopies.
I used a soldering iron to melt holes for the video camera, and vtx antenna, first with small melted holes. I then test-fitted the canopy to see whether the small holes were off at all, and fine-tuned the holes to larger ones.
I then used a round-shaped file to file away the holes to the right shape, ie. just the finer parts.
Step 13: Finishing Up
At this scale, having the GPS work reliably is a challenge, and requires some trial and error to get right.
This will also depend on the actual GPS receiver you end up using, and how sensitive it is.
Unfortunately, I couldn't test the mini GPS listed in the parts list, as I couldn't get it to boot up properly. Hopefully that's just down to the fact that I got a defective unit. (a replacement is on the way, thanks to GearBest)
I had to use a much heavier GPS which I bought a year ago. (sorry, don't have the model name handy). It does, however, have the benefit of having a separable patch antenna, which you can see pictured here at the rear, mounted on top of the canopy. (double sided tape)
For best results, the GPS will work better when mounted on a mast, probably at least 6cm or so for this model. I haven't proposed a mast design here, and is up to you. For this build, and this GPS receiver, I've found mounting it just on top of the canopy gives good-enough results. Interestingly, when the antenna was mounted just under the canopy, the results were worse. (in terms of satellite lock) This is more due to distance (from other electronic interference) not the canopy itself.
I've also found that the FPV system you use is a big contributing factor to the GPS's ability to acquire a lock. Mount the GPS as far away from your VTX as possible. Also, the mW power of your VTX will play a big part. Keeping the VTX to 200mW or less is desirable.
Step 14: Setting Up Return-To-Home
Auto-pilot related functionality has not had much attention in CleanFlight, as of this writing. If the FC hardware has the right sensors (compass, barometer and GPS), various modes will be made available to you in the CleanFlight configurator, like Return-To-Home, Altitude Hold and Position Hold, but they are pretty crude.
There is an experimental branch of the CleanFlight firmware called iNav, which attempts to implement better auto-pilot modes, and renames these to NAVHOLD, and NAVRTH. The main thing you want to get configured is the NAVRTH, and make this mode kick-in in the failsafe condition. (ie. signal lost)
There is a pre-built firmware binary for the Naze32 here. Download the 'Inav_NAZE.hex' file, and flash this to your Naze board. You will have to re-configure all the CleanFlight options again (like receiver type, modes, PIDs, etc)
If your radio's receiver supports Programmable Failsafe, then you are in luck. Usually this is programmed when you Bind to your transmitter. ie. whatever position your switches (and sticks) are in when you perform the TX/RX binding are stored in the receiver, and used if the receiver loses its link with the transmitter. So, if you have such a radio, enable NAVRTH on one of your switches (like AUX1) and have this switch enabled when you perform the Binding. (also have both sticks centered!)
You can make sure everything is setup by progressively doing the following tests:
- Remove all props, power up your transmitter and quad, then connect the Naze to CleanFlight via USB. Go to the 'modes' tab, Arm the quad and move throttle up slightly. Then turn OFF your transmitter, verifying that the mode changes to NAVRTH. (will go solid green background)
- Try NAVRTH manually out in the field by flicking the appropriate transmitter switch. The quad should climb to about 15 meters then start to fly backwards towards the take-off point. If it starts doing anything strange, take back control by moving the switch back to normal position.
- Then try a Low Altitude failsafe test. ie. fly it just a short distance away, just a meter or so high, and turn off your transmitter. The quad should climb to about 15 meters, then start making its way back to you, hovering overhead. If it starts drifting away or doing anything strange, quickly regain control by turning the transmitter back on.
Once NAVRTH is setup properly, you are Free to just head towards the horizon! It's actually a cool feeling just exploring, looking around, and not worrying about getting out of range. Especially if you're on holiday somewhere interesting and want to do some unique sight-seeing! (NOTE: you still need to keep a timer and make sure you don't run the battery flat)