Step 19: Ground Station

The ground station transmits the commands {throttle, pitch, roll, yaw} to the quadrotor based on user inputs. It consists of three parts: a user input device, an XBee radio as discussed in the previous step, and some software to map input device axes to commands.

Input Device: Logitiech Gamepad

I chose to use a Logitech Dual Action gamepad as my input device. The first image shows how the Logitech gamepad's joystick axes get mapped to the four quadrotor commands. Experienced RC pilots might recognize this joystick layout as Mode 2. Unlike an RC radio, the throttle stick on the gamepad will be spring loaded. This makes it a little more difficult to hold altitude, but it's not too hard to get used to.

You can use any other USB HID device as the controller, but you'll have to modify the ground station software to correctly map the joystick axes to the commands. I've also tried a flight simulator joystick. I didn't like the feel as much, but this was back when I was first learning how to fly it.

You can also use a standard RC flight transmitter. In this case, you don't even need a computer for interfacing. An Arduino can read the pulse position modulation (PPM) signals from the transmitter's trainer port, and send out commands via XBee. Here's a guide on how to map signals from the transmitter's trainer port to the XBee.

Interfacing Software:

If you do decide to use a USB HID controller, you'll need some software running on a computer to interface with the controller and to send commands to the XBee radio. This software can also grab telemetry from the quadrotor and display it, or log it for later analysis.

I wrote a simple ground station program in Visual Basic, which is included in the project documentation (Step 1). The executable is in the 4pcb_EXE folder and the source is in the 4pcb_VB folder. To run the executable, you'll need the .NET Framework runtime files, which can be downloaded from here. If you're interested in modifying the ground station software, you can use Visual Basic 2010 Express, which is free.

My ground station is nowhere near as functional as it could be. First, only some of the trims are active and they don't save their values when you close the program. It also only logs the telemetry (in a text file called 4pcbdata.txt). It could do so much more - like display a virtual 3D quadrotor on the screen that mimics the orientation of the real quadrotor.

The .NET-based ground station will only run in Windows. If you're on a different OS, you can still write ground station software in any programming language that can interface to HID game controllers and a virtual serial port (so, pretty much any language). One easy option is Processing, an application/GUI programming language with and Arduino-like IDE. There is a third-party library for Procssing called ProCONROLL which interfaces to HID controllers. I wrote a very quick Processing/ProCONTROLL-based ground station for controlling robots that could easily be modified to send the command packet needed for the quadrotor.
<p>thank you .it was exellent</p>
<p>fantastic &lt;3 ^_^</p>
<p>It's a nice instructables!<br>I also want to build my own arduino-based quadcopter, but I have problems in controlling the motors.<br>Do you have your program saved somewhere, for example github or anything else? I really want to take a look at it for my reference, especially for implementing the PID Control<br>Thanks before!</p>
<p>Hi, your whitepaper link does not work. Do you have it saved elsewhere online? Would love to read it. Thanks!</p>
<p>I really enjoyed ;)</p>
<p>I really enjoyed. thankssssssss ;)</p>
<p>Great instructable. I have a quick question; in the schematic why did you use 0 ohm resistors and why are some components not meant to be placed( the parts you said DNP)? You could have excluded the parts you do not need.</p>
<p>Only Wow, this project is amazing! <br>(Frist sorry for my bad English) <br>I tried to adapt the code in my own quad to do it fly in x mode, but without success. The difference is that my IMU is turned 45 degrees compared to the project that there is here, the pitch of the IMU is at the center between the motors. This orientation of the IMU creates problems?<br>Thanks to the help and the patience. </p>
<p>found this blogspot by shane: http://scolton.blogspot.com/2011/08/something-like-flight.html. this particular blog about the control structure really helped me. the entire blog site, matter fact, is a gold mine of information. go check it out if you're also having trouble or would just like to see how amazing shane really is.</p>
<p>Would like to thank you man. Your balance filter theory helped us a lot get through our final undergraduate research last year. Worked better than any DCM or kalman filter code we ever wrote, probably because we understood your filter the most. I just got back to the hobby after a half-year lay-off, and just now remembered I should thank you for posting all these wonderful control information, without which I'm sure we would have all stayed grounded.</p>
mark !very cool
Great Instructable. I just have one question... In a video that was added its mentioned that activating the 12.5HZ low pass filter on the gyro really helped stability. After reading the datasheet on the gyro it says that there is a low pass filter but the sheet only gives instructions for controlling the High-Pass. Did you add a software filter or am I missing something on the datasheet?
It is a little unclear in the datasheet. Right above the High Pass settings, starting on p.29 of http://www.pololu.com/file/download/L3G4200D.pdf?file_id=0J491, there is a setting for &quot;DR and BW&quot; (data rate and bandwidth) which are the low-pass filter and output data rate settings. The lowest setting is 12.5Hz cut-off for the LPF. It's rather harsh, but it seemed to work better than 25Hz. If you could cut the vibration down a lot (by careful balancing of propellers and such), a higher frequency cutoff would be better.
how long this quadrotor can fly??
Flight time is about 8 minutes, depending on the size of the battery.
Hi, i think u did a great job. at least, i think it's a tall order for me. though i love href=&quot;http://www.rctophobby.com/rc-helicopters.html&quot;&gt;rc helicopters, i still knew <br>nothing about the details of the machine. however, after your presentation, i think i have a notice note about it. thanks for share it, good job!
Hi, i think u did a great job. at least, i think it's a tall order for me. though i love href=&quot;http://www.rctophobby.com/rc-helicopters.html&quot;&gt;rc helicopters, i still knew <br>nothing about the details of the machine. however, after your presentation, i think i have a notice note about it. thanks for share it, good job!
found this blogspot by shane: http://scolton.blogspot.com/2011/08/something-like-flight.html. this particular blog about the control structure really helped me. the entire blog site, matter fact, is a gold mine of information. go check it out if you're also having trouble or would just like to see how amazing shane really is. <br>
Hi shane. great work by the way. I've been trying to implement the same control structure in my own quad. My quad is way bigger than yours but I'm using the same IMU. My propellers are 10x4.5. I also use smaller ones which are 8x4.5 for testing. As such, I'm having a hard time determining what value to start my kp and kd constants at. I've been trying to tune for a month now and I haven't had a successful flight yet.
excellent project and videos. i saw a TED video of this a while back really wanted to do this. <br> <br>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!!
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 &quot;return to horizontal&quot; 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.
I'm surprised you got it so small and it could still carry its own battery. Nice work. <br>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? <br>Thanks.
The weighted IMU sat on top of the foam loop. <br> <br>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.
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 ?
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.
I was about to ask if you were affiliated with MIT, then I noticed you were testing it in Building 7!
Congrats on the win! <br>You provide excellent specs on components. <br> <br>Bill
How did you choose your motors?
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. <br> <br>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.
Would this battery be a good choice for this quadrotor? <br> <br>http://www.hobbyking.com/hobbyking/store/__11895__Turnigy_nano_tech_370mah_3S_25_40C_Lipo_Pack.html
Yes, that's the exact one I used.
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?
I'm using the version 1, but I think the version 2 would also work fine.
Allow me to be the first to congratulate you on the grand prize win! Well deserved!
Thank you! I'm glad people like it and I hope there will be swarms of PCB quadrotors in the near future.
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$? <br />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 <br /> <br />most probably ill make this one and maybe make an instructable for u guys <br /> <br />by the way awesome instructable(this) well explained well done!!!
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. <br /> <br />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.
VERY NICE INSTRUCTABLE!! <br> <br>You can try KiCad Open Source solution instead of Eagle. <br> <br>Best regards from Uruguay! <br>Tabar&Atilde;&copy;
When two worlds collide, I read your excellent instructable then came across this <a href="http://www.dailymail.co.uk/news/article-2154283/Cats-away-Artist-turns-dead-pet-flying-helicopter-killed-car.html?ITO=1490" rel="nofollow">artist who turned his dead pet cat into a helicopter</a> (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.....
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. <br>Extremely detailed Instructable +10
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. ;) <br> <br>I'm not sure about putting the accelerometer and gyro on-board, though, because they wouldn't be isolated from mechanical vibrations.
Awesome instructable. <br>Have you tried using any Kalman filtering?
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. <br> <br>If I wanted to merge in more data, such as the magnetometer, or GPS, I might consider using a Kalman filter.
Really cool! I was watching the first video and I went, &quot;hey, that's Building 13!&quot;
unbeleivable great work <br>
&iexcl;Aye dios m&iacute;o!<br> <br> 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.&nbsp;
Hi <br>This is awesome work, well done! <br>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? <br>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? <br>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. <br>thanks!

About This Instructable




More by scolton:PCB Quadrotor (Brushless) Seg...stick. 
Add instructable to: