loading

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>fantastic &lt;3 ^_^</p>
<p> 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>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>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>You know, I have been using the term &quot;Cocksicle&quot; for many years now, but this is the first time i have ever thought of it as an edible substance. Go figure!</p>
<p>I really enjoyed ;)</p>
<p>I really enjoyed. thankssssssss ;)</p>
<p>Hey there, your Quadcopter<strong> </strong>got me inspired and all and made we want to build a copter on my own for like $40. I will have some access to a 3D printer so that will add another $5-10 to the cost. Here is the plan and I need suggestions and comments.</p><p>First of all, I'm not going to print a pcb but I will be using a 3D printed plastic frame and the same motors I think you did.</p><p>- <a href="http://www.ebay.com/itm/221541787818?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">DC 3.7V 48000RPM Coreless Motor Propeller</a> <strong>- (about 10 grams)</strong></p><p>That leaves me to a question if the copter will even lift itself if I use the following electronics which add on some more weight.</p><p>- <a href="http://www.ebay.com/itm/251383404458?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">3.7V 200 mAh Li-polymer Rechargeable Battery Li-Po</a> <strong>- (about 10 grams)</strong></p><p>- <a href="http://www.ebay.com/itm/321361180496?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">NRF24L01+ 2.4GHz Antenna </a> - <strong>(about 10 grams) </strong></p><p>- <a href="http://www.ebay.com/itm/131231041891?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">MPU-6050 3 Axis Gyroscope and Accelerometer Sensor Module for Arduino</a> <strong>&ndash; (</strong><strong>about 5 grams)</strong></p><p>- <a href="http://www.ebay.com/itm/400362466832?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">HMC5883L Triple Axis Compass Magnetometer Sensor</a> <strong>&ndash; (about 5 grams)</strong></p><p>- <a href="https://www.sparkfun.com/products/retired/11780" rel="nofollow">Tennsy 3.0 32 bit ARM Cortex-M4 48 MHz CPU, 128K Flash Memory, 16K RAM</a>(about the same weight as the Arduino Pro Mini) <strong>&ndash; (about 15 grams)</strong></p><p><strong>Total so Far: 55 grams</strong></p><p>Wiring/other material: + 10 grams</p><p>Plastic casing: + 40 grams</p><p><strong>Grand Total: 105 grams</strong></p><p><strong><br></strong></p><p>Think that sound right? Please give suggestions, in particularly for the battery and the motor so that my project won't end up like the monocopter project from 1915. :) <a href="http://www.aviastar.org/helicopters_eng/papin.php" rel="nofollow">http://www.aviastar.org/helicopters_eng/papin.php</a></p><p>Thanks OP!</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>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>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>good</p>
<p>super</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>super</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.
great
Hope this finds you well , We are a PCB supplier, specialize in PCB manufacture. <br>Our Key advantages: <br> Quick-Turn Prototypes <br> High-Tech <br> High-Mix Low-middle Volume <br> Products range :up to 24 layers rigid PCB, up to 12 layers rigid-flex PCB, up to 6 layers flex board。 <br>Our PCB Scope: <br> FR4,Tg140-230,Rogers,Arlon,Isola <br> HDI, Blind and buried via board <br> Rigid-flex board <br> Metal substrates (Al / Cu based PCB) <br> Heavy Copper&amp;Gold <br> Gold fingers, <br> Impedence control <br> <br>Should you have any question ,please do not hesitate to contact me. <br> <br>Regards <br>Frank <br>Bestech Circuits (HK) Limited <br>Skype:frank-bestech <br>EMAIL:frank@bestechcircuits.com <br>Website:www.bestechcircuits.com <br>
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.....

About This Instructable

208,215 views

635 favorites

License:

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