PCB Quadrotor (Brushless)

 by scolton
Contest WinnerFeatured
Quadrotors are the new Segways: a mesmerizing, somewhat magical, self-stabilizing platform that every tech person wants to have. You can't ride a quadrotor (well, maybe you can), but they do fly, and you can build one yourself from scratch!

I helped with a previous quadrotor build (Instructable here), and after flying it I decided I wanted to make my own. I had an idea to make a miniature one comprising a single printed circuit board that is both its structural frame and its electronics motherboard. The end result was "4pcb", a 138-gram micro quadrotor. I designed it in EAGLE, soldered it, and tested it over the course of a few months. Here's some video of it flying, after a lot of control tuning (see Step 13) and practice:


More flight video in the final Step!

The idea of making a PCB-based quadrotor isn't unique (see links below for other examples), and 4pcb definitely isn't the smallest (see the Picopter Instructable for a really tiny one). But I think it strikes a good balance between size, cost, buildability, and flyability. It's also one of the only PCB quadrotors with integrated brushless motor drivers, so there's no need to wire up external ESCs. And it runs on XBee digital radios, so there's no RC receiver or servo-style wiring.

4pcb Specifications:
Size: 6.50" (165mm) motor center-to-center distance, diagonally
Battery: 3S (11.1V), 370mAh, 20-40C Lithium Polymer
Motors: HXM1400-2000 "hexTronik 5gram Brushless Outrunner 2000kv"
ESCs: Toshiba TB6588FG "3-Phase Full-Wave PWM Driver for Sensorless DC Motors"
Props: 4x2.5 (2), 4x2.5R (2)
Controller: Arduino Pro Mini 328 - 5V/16MHz
IMU: Pololu MinIMU-9
Radio: XBee Series 1
Total Weight: 138g
Additional Payload: <30g
Flight Time @138g: 8min

4pcb is a "low level" quadrotor build, by which I mean that there are very few black box components. The frame, motor control, flight control, radio interface, and ground station UI are all developed from component or sub-module level. Depending on your level of experience and interest, you may want to take a different approach where you buy commercial modules for some parts and DIY others. (I included links to some kits and modules below.) This Instructable includes all the files and information you would need to build one completely from scratch.

There are a few small changes I would make if I did a second version of the board, but overall, I think it could make a good standalone project or, even better, a great starting point for your own modifications! (6pcb hexrotor, anyone?) Here are some resources that you might find useful, whether you are building this particular quadrotor or a different multirotor:

Other Quadrotor Instructables:
quadrotor - Custom frame with Arduino-based controller.
RC Quadrotor Helicopter - Off-the-shelf frame with custom controller.
Picopter - A very tiny custom PCB quadrotor.

Multirotor Frame Kits:
HobbyKing
ArduCopter

Multirotor Controller Kits:
HobbyKing (based on KK Multicontroller)
MultiWii
ArduPilot
OpenPilot CopterControl

Complete Solutions:
Parrot AR.Drone - Very stable iPhone-controlled quad.

General Multirotor Resources:
RCGroups Miniature Quadrotor Thread
DIY Drones Quadcopter Forum
OpenPilot Multirotor Forum
PID Tuning for Multirotor (OpenPilot TV)

Mini Quads (5" props)
TinyCopter (custom build)
BabyCopter (custom build)
Turnigy Integrated PCB Micro-Quad (KIT) (commercial)
Blade mQX (commercial)

Micro Quads (4" props):
4pcb (custom build)
Kawaiicopter (custom build)

Nano Quads (3" props):
Nanocopter (custom build)
Nano quadcopter wii (custom build)

Pico Quads (2" props):
Walkera QR Ladybird (commercial)
CrazyCopter (custom build)
Picopter (custom build)
Chibicopter (custom build)
NC-ONE (custom build)

My Pages:
4pcb and other Flying Things
The Balance Filter - Merging accelerometer and gyro signals.
 
Remove these adsRemove these ads by Signing Up

Step 1: The Setup: Parts, Tools, Software, and Files

The attached file (4pcb_DOC.zip) contains all of the support files for making and flying 4pcb. Included in the zip file are:

4pcb_ARD (folder) - Arduino project (Arduino 0022, .pde).
4pcb_EAG (folder) - EAGLE board files and libraries (EAGLE 6.0.0 Light Edition).
4pcb_EXE (folder) - Ground station executable (requires .NET Framework 2.0 or later).
4pcb_GRB (folder) - Gerber files for PCB printing.
4pcb_VB (folder) - Ground station source (Visual Basic Express 2008 or later).
4pcb_BOM.xlsx - Bill of material in Excel format.
4pcb_DIR.jpg - Coordinate system of quadrotor and IMU.
4pcb_EXT.pdf - Details of external connections.
4pcb_IMU.jpg - Image showing vibration mounting and wiring of Pololu minIMU-9.
4pcb_SCH.pdf - PDF schematic of the board.

Bill of Materials / Cost:

The Bill of Materials (4pcb_BOM.xlsx) lists all the components required to put together one PCB quadrotor and ground station. The total cost to build the quadrotor is about $240. The ground station consists of a USB game controller, an XBee radio, and and XBee-to-USB adapter. If you don't already have these, they add an aditional $80 or so.

Soldering:

This board requires a good amount of surface-mount soldering, including passives as small as 0603 and four TSOP36 ICs. They can all be hand-soldered (no BGA or leadless).

Additional Tools and Hardware:

- Wire (22AWG and 28AWG stranded would work) and wire cutters/strippers.
- Solder braid for cleaning up bridges.
- FTDI cable for programming the Arduino Pro Mini.
- Hex key set.
- Double-sided foam mounting tape.

Software:

-EAGLE
If you want to modify the printed circuit board, you'll need EAGLE v6.0.0 or later. You can download it here. The free "Light Edition" is sufficient, even though the outline of the board is larger than 100x80mm limit (see Step 2). You will also need EAGLE to reference the board layout when placing components. (e.g. Type "show R32" in the board window command line to figure out where to put resistor R32.) There are no designators on the board itself.

-Arduino
The flight controller is written in the Arduino IDE. You can download the latest version from here. Make sure you set the board type to "Arudino Pro Mini (5V/16MHz) w/ ATmega328".

-Visual Basic Express (Optional)
The ground station is programmed in Visual Basic Express. If you want to modify the ground station software, you can download the free edition, Visual Basic Express 2010 from here.

-.NET Framework
The ground station requires the .NET Framework runtime files. (Unfortunately, this makes it Windows-only.) These files come with Visual Basic 2010, so if you plan on modifying the ground station software, there's no need to download them separately. If you just want to run the ground station executable, you can download the .NET Framework runtime files from here.

-Processing? (Optional)
Although I haven't done so myself, it is possible to port the ground station software over to Processing, which would make it compatible with other operating systems. To read from the USB game controller, there is a third-party library called ProCONTROLL. I did some work with this for a XBee-based robot controller, the details of which are here. This could be a good starting point for making a non-Windows ground station.
bgumelar says: May 19, 2013. 8:26 AM
how long this quadrotor can fly??
hdman1203 says: Dec 22, 2012. 3:46 PM
excellent project and videos. i saw a TED video of this a while back really wanted to do this.

i am new to this so was wondering if there are any books/literature you would suggest to better how this particular system works as a whole and how each of its parts interact with each other? also, if one wanted the altitude feedback and return to horizontal position, would it be just as easy as rewriting some of the code for the Arduino board or would some extra hardware/electronics such as the gyros be required as well? Thanks!!
scolton (author) in reply to hdman1203Dec 26, 2012. 3:10 PM
I don't know of any books in particular, but many of the links at the bottom of Step 1 have great information on the different components involved in multirotor systems. As written, the code already has "return to horizontal" capability (see Step 13), but if you wanted to add altitude hold, you would need some way of measuring absolute height, such as a barometer or ultrasonic distance sensor.
danblakemore says: Dec 5, 2012. 9:44 AM
I'm surprised you got it so small and it could still carry its own battery. Nice work.
I'm working on a similar project with a much larger form factor (Turnigy Talon v1) and we're having massive trouble with vibration on our gyro. I have the picture of your foam mounting but I can't really tell how it's set up. Is the sensor board weighted and set on top of a foam loop, or is the gray foam wrapped around something?
Thanks.
scolton (author) in reply to danblakemoreDec 5, 2012. 4:05 PM
The weighted IMU sat on top of the foam loop.

I also have a Talon v1...it's a great frame. But yeah I haven't had much luck with mounting the controller or IMU directly to it. Some kind of isolation is needed.
zaphv says: Oct 22, 2012. 12:51 AM
In the schematic , Obviously where it says DNP is open circuit however where it lists the resistors as 0 is that meant to be a closed circuit. For example R18 is a direct connection from pin 15 to the 3 resistors but there is no cap to ground ?
scolton (author) in reply to zaphvDec 5, 2012. 3:58 PM
Yes, all DNP and zero-ohm resistors are for configuring the various settings on the TB6588FG. They're either shorts or open-circuits. So you could use a solder bridge instead of an actual zero-ohm resistor.
Alastor136 says: Sep 16, 2012. 6:24 PM
I was about to ask if you were affiliated with MIT, then I noticed you were testing it in Building 7!
Bill WW says: Sep 1, 2012. 11:23 PM
Congrats on the win!
You provide excellent specs on components.

Bill
TechNotes says: Aug 2, 2012. 8:20 AM
How did you choose your motors?
scolton (author) in reply to TechNotesAug 2, 2012. 9:56 AM
For this size quadrotor, there weren't many options. But in general, you would choose the motor and propeller at the same time. There are suggested propellers listed for most motors. Sometimes you can also find data on thrust/RPM/current values with different propellers.

The total maximum thrust should be 2-3x greater than total weight, so that you have plenty of extra thrust available for maneuvering and stability. I think on this quad it was much closer to 1x when I was using the 7.4V battery. Switching to 11.1V made it closer to 2x, which improved the stability a lot.
TechNotes in reply to scoltonAug 2, 2012. 10:16 AM
Would this battery be a good choice for this quadrotor?

http://www.hobbyking.com/hobbyking/store/__11895__Turnigy_nano_tech_370mah_3S_25_40C_Lipo_Pack.html
scolton (author) in reply to TechNotesAug 2, 2012. 11:45 AM
Yes, that's the exact one I used.
TechNotes says: Aug 2, 2012. 8:32 AM
As of August, 2012, there is MinIMU-9 version 2. Did you use the version 1 or 2, and would the other one work with the quad just as well?
scolton (author) in reply to TechNotesAug 2, 2012. 9:57 AM
I'm using the version 1, but I think the version 2 would also work fine.
WYE_Lance says: Jul 13, 2012. 11:23 AM
Allow me to be the first to congratulate you on the grand prize win! Well deserved!
scolton (author) in reply to WYE_LanceJul 16, 2012. 9:49 PM
Thank you! I'm glad people like it and I hope there will be swarms of PCB quadrotors in the near future.
francisroan says: Jun 28, 2012. 10:40 AM
guys i have an idea...see i wanted to build this but it is too expensive i mean like 300$? ya like ma parents are gonna give me that so i wanted to make the worlds most cheapest quadrocopter!!! and i really mean it ..in this one he used an xbee which is really expensive plus he didnt add the cost to make the transmitter so add another 50 to 100 bucks so total about less than 500$?
so i had abt module laying around so i thought hey why cant we make a bt quadrocopter instead of an r/c?(cheaper u can get two modules for like 15 $ at ebay one for transmitter and another for reciever

most probably ill make this one and maybe make an instructable for u guys

by the way awesome instructable(this) well explained well done!!!
scolton (author) in reply to francisroanJun 30, 2012. 8:49 AM
The total cost for everything including the ground station transmitter hardware (XBee, XBee Explorer, Game Controller) is about $320. Without the transmitter hardware it's $240. It's definitely not the cheapest project, mostly because I built everything from scratch.

Bluetooth would be cool, but the range isn't as good as the XBee Pro. It would be perfect for indoor use though, and then you don't need an adapter for your computer if it already supports Bluetooth. Or maybe a smartphone-based controller. That would certainly bring the cost down.
tabare.perez says: Jun 6, 2012. 7:58 AM
VERY NICE INSTRUCTABLE!!

You can try KiCad Open Source solution instead of Eagle.

Best regards from Uruguay!
Tabaré
blanchae says: Jun 3, 2012. 10:26 PM
When two worlds collide, I read your excellent instructable then came across this artist who turned his dead pet cat into a helicopter (yes, you read right!). Probably the funniest and most morbid thing I read in a while. So if you want to expand your quadrotor in a new direction.....
udawatabhimanyu4 says: Jun 3, 2012. 7:45 PM
Really, there should be a category for Super-Awesome-Advanced-Level-Instructables. Also, you could have taken it to an even higher level by including the ATmega328 from the pro mini on the PCB itself and maybe the inertial measurement unit too.
Extremely detailed Instructable +10
scolton (author) in reply to udawatabhimanyu4Jun 3, 2012. 1:49 PM
Thanks! Putting the ATmega328 on-board is definitely something I want to do in a future revision. Or maybe somebody here will do it first. ;)

I'm not sure about putting the accelerometer and gyro on-board, though, because they wouldn't be isolated from mechanical vibrations.
Geraldes says: Jun 3, 2012. 4:15 PM
Awesome instructable.
Have you tried using any Kalman filtering?
scolton (author) in reply to GeraldesJun 3, 2012. 7:00 PM
Thanks! No, I haven't tried any Kalman filtering. The complementary filter handles gyro/accelerometer merging very nicely in this application, and with very few lines of code.

If I wanted to merge in more data, such as the magnetometer, or GPS, I might consider using a Kalman filter.
Trebawa says: Jun 3, 2012. 11:26 AM
Really cool! I was watching the first video and I went, "hey, that's Building 13!"
hydrostream76 says: Jun 3, 2012. 9:25 AM
unbeleivable great work
dchall8 says: Jun 2, 2012. 9:42 AM
¡Aye dios mío!

This is more like a Masters Thesis than an Instructable. Need a new website for Incredible Instructibles. I don't think I've ever given 5 stars before. 
Heliosphan says: Jun 2, 2012. 5:38 AM
Hi
This is awesome work, well done!
But when u say it doesn't fly itself, what do you mean? It cant be as bad as trying to fly a traditional helicopter can it? Does it at least self stabilise? Keeping itself in the air, but just wander in all directions?
Im also curious about control differences between the early days and now after refinement? When you started off, could it be held in the air by someone with great flying experience, or was it simply uncontrollable by anyone? I would suspect it was unflyable, so how long was it before it was flyable by anyone?
I think these factors are important for anybody making these, like me at some point, to know what piloting skills and technical tweaking, trimming was required, etc. as I am no engineer like you clearly are.
thanks!
scolton (author) in reply to HeliosphanJun 2, 2012. 9:04 AM
I mean that this quad isn't autonomous. It will self-level, but if the trims are off or if there is any air current, it will drift away from its current position with no inputs. Additionally, there is no altitude feedback, so that throttle control is entirely on the pilot. Although I have no experience flying RC helicopters, I imagine it's more similar to that than to flying, say, a Parrot AR.Drone.

For example, my PCB quad can't do this:
http://www.youtube.com/watch?v=zBTW54SPU5g

The AR.Drone uses image processing, ultrasonic sensors, and a much more sophisticated flight control algorithm to self-stabilize in {x, y, z} in addition to {pitch, yaw, roll}. Since I only use inertial sensors, they don't know the difference between standing still and moving at a constant velocity. This is the physical reason why it drifts around with no inputs.

Some of the commercial multirotor controller kits are approaching or surpassing the sophistication of the AR.Drone, by going beyond inertial sensors and incorporating ultrasonic, GPS, barometry, optical flow (or full image processing). The ArduPilot and OpenPilot CopterControl boards can do these things.

On the other extreme is the KK Mulitcontroller (link in the Intro): it has gyros, only, and can't self-level. If you take your fingers off the sticks, the quad holds its current attitude but won't return to horizontal.

In terms of flight experience required, my quad is closer to the KK board, but with self-leveling. Adding down-facing sonar and closed-loop altitude hold to it would help reduce the pilot's workload a lot, I think. I have one sitting in a box that I haven't gotten to use yet. It's also a small quad, which makes it harder to fly I think. Big quads move slower and it's easier to react to what they're doing.

Looking at the flight test videos, #1 and #2 were unflyable by anyone, I think. Just too twitchy. #3 would be flyable with a lot of practice. #4 and #5 are unflyable for other reasons (bad motor, new IMU with bad settings). #6-#9 are all flyable with practice. In its present state, I've handed it off to people with helicopter/quad flight experience and they can handle it right away. I've also handed it off to people with no experience and the results vary. Most people can keep it in the air for a short period of time, but have trouble controlling either the altitude or the yaw. (If it yaws away, it's easy to get disoriented.)
Heliosphan in reply to scoltonJun 2, 2012. 9:30 AM
Excellent, thanks for the clarification, I always wondered about this.
The fact that your design self levels, but drifts, is good enough as far as Im concerned!
Throttle control isnt an issue either, but if I were to make one from your designs I'd definitely use a non-centring joystick/joypad, or have it centred at zero thrust. But thats just me.
Brilliant, thanks!
LifeBringer says: Jun 2, 2012. 4:58 AM
Epic... fun stuff. Thanks!
EdrZero says: Jun 1, 2012. 3:25 PM
Wow!, simply wow!!!!
mikeasaurus says: May 31, 2012. 4:36 PM
Amazing work, and good job on keeping the video going to show us the progress!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!