workshop on Model Rocketry and GPS

advertisement
GPS and Telemetry
F O R HIG H PO WE R R O CK E T R Y
BY
PA UL B INIO N – P B @ NE O. RR . CO M
GPS Basics
• What is GPS
• Receivers
• ArduPilot Mega
• Arduino Uno/Mega
GPS Basics
• GPS is very complicated and pretty precise, however to make use of it requires just some
basic understanding.
• This first item is very important for our hobby. – ”The U.S. government controls the export
of some civilian receivers. All GPS receivers capable of functioning above 18 km (60,000 feet)
altitude and 515 m/s (1152 mph) or designed, modified for use with unmanned air vehicles
like e.g. ballistic or cruise missile systems are classified as munitions (weapons) for which
State Department export licenses are required.” http://en.wikipedia.org/wiki/Global_Positioning_System
• GPS relies on a receiver locking in on several satellites and the calculation of the time it takes
for the signal to make the trip from the satellite. If the receiver can lock onto four satellites
you can get a 3D position. (Altitude as well as location.) The signals (from the satellites) are
very weak, so the receiver needs as clear a view of the sky as possible. The sensitivity can be
improved by using an external antenna. Paper and plastic rockets are not much of a problem,
but metal or carbon fiber might be.
GPS Basics continued
• The antenna will work best if it is facing up to the sky. It should not be mounted sideways in
the rocket.
• Some receivers are better than others, and only testing will reveal which is best.
• If you buy GPS units from foreign countries, you might possibly run afoul of the first item I
mentioned. If you fly below 60000 feet, and 1000 knots, you are probably ok.
• GPS is slow in rocket terms. I can grab 20 or so altitude readings per second, with GPS 5
readings per second would be considered fast. You may be lucky to get one reading per
second. GPS however is great for finding that rocket in tall grass. It will not help you get your
rocket out of a tree, but you will know exactly which tree it is in…
• GPS data can be plotted on Google earth (with a KMZ file) giving you a very nice graphical
representation of your flight.
GPS Basics continued
• GPS readings can be displayed in several different ways, and using them improperly can lead
to a location that is slightly off, to really far off.
• This website gives a good explanation - http://www.naacs.org/documents/GPSCoordinates.pdf
• Here is some data from the field in Republic. This is raw data from the APM log file.
•
(399361012 -799241231) 399361012 is latitude, and because we are north of the equator it is a
positive number. -799241231 is longitude, and because we are east of the prime meridian it is a negative
number. If we place a decimal 2 places to the right we get a reading that can be plugged into Google
maps. i.e. 39.9361012, -79.9241231 This format is referred to as WGS84. In minutes and seconds the
same coordinates would be N39 56 09 W79 55 26. Where confusion comes in and the likely means of
getting a miss is the GPS format which is N 39 56.166 W 79 55.447.
• If you enter 39 56.166 , 79 55.447 into google maps, you end up on the edge of a desert in China! If you
do not specify either (N or W) or use the minus symbol for longitude you will get a miss.
Impact of improper GPS coordinates
A. Minute second
B. GPS with error
39 56 09, -79 55 26
39 56.166 , 79 55.447
C. WGPS84 with decimals
39.9361012 , -79.9241231
The biggest source of trouble is if you enter the minute second format in Google Maps.
You are in the right area, but not close enough to find your rocket. This was a problem I
encountered on my Level 2 flight. Format C was entered into an iPhone, and it placed
my rocket in the trees. When I got home and plugged the data into google maps it placed
my rocket exactly where we found it.
By understanding the format your equipment uses finding your rocket should be a cinch.
GPS Basics continued
• Having a GPS receiver is only one part of the system. Without a device to collect and present that
data it is useless.
• Three groups have developed very good methods of collecting GPS data.
•
Unmanned Autonomous vehicles – Copters, ground vehicles and Planes
•
Near Space balloons – Most of these use ham radio APRS systems which are too slow for rocket use (imho)
•
Arduino developers
• These groups have adopted open source philosophies which I advocate for the advancement of
our sport.
• I am going to focus on the UAV’s. In particular I advocate the use of the APM 2.6 module
commonly found in Quad-Copters.*
• *Important note: I am not advocating using this as any kind of guidance system. That would very
likely put you in a bad situation with the government. I only use this as a data gathering unit.
APM 2.5/2.6 module
• If you order an APM from 3DR (http://3drobotics.com/)with telemetry and GPS it will run you 280.00 for a 2.5 or 340.00
for a 2.6 version. If you are willing to order from China (http://www.ebay.com/itm/APM-2-6-Flight-Controller-w-6M-GPS-3DR-915Mhz-TelemetryOSD-Power-Module-/161437114734?pt=Radio_Control_Parts_Accessories&hash=item259666e16e )**
• You can get the same gear (or more) for about 100.00. I am not pushing the China route, but I have had
reasonable luck ordering electronics from China. I bought my APM from 3DR, but use a telemetry unit from
China.
•
Here are some links to help with the APM.
• The first link is a good ( and critical) series of videos detailing how to set up and configure the APM.
• https://www.youtube.com/playlist?list=PLYsWjANuAm4oswLMu9OU8yOm-9J6y30XW
• The second link is the is the main site for the Ardupilot Module (APM) Lots of good info and instructions.
• http://ardupilot.com/
• ** This is just a representative link, not an endorsement. Just search ebay for what you want, and there will be
many offerings to choose from.
APM 2.5/2.6 module continued
• Why choose the APM?
• It is small
• Requires no electronics skills
• Off the shelf solution
• Solid telemetry link
• Built in KMZ export function (Google earth flight track)
How to make the APM work for a rocket
• It is not a perfect solution. You are taking a device used in a quad-copter and putting it in a rocket. The
forward arrow on the device will be pointing out the side of your rocket. However, we are not trying to
guide the rocket, we are just measuring things.
• The GPS will be properly oriented, so no problem there.
• The magnetometer will work to measure roll.
• Pitch and yaw should be ok.
• You should mount the GPS and APM as close to the center axis of the rocket as possible.
• The GPS antenna should have a clear view of the sky. Under an aluminum bulkhead is probably not
ideal.
• Magnetometers are very sensitive to ferrous metals.
• Dead center (CG) would be a great place for the APM, but probably is not practical.
• For the on board barometer, static ports will be necessary.
• Carbon fiber or metal can block radio signals
Telemetry units
3 DR ST YL E
https://store.3drobotics.com/products/3dr-radio
RFD 900
http://rfdesign.com.au/index.php/rfd900
Telemetry continued
• To make the system work, we also need a telemetry link to get the data back to the ground.
• Both radios are based on hopeRF transparent serial radios. They work like a very long serial cable.
• The 3dr radios are 915 mhz 100 mw, and requires no license (In the US and Australia).
• The RDF900 radios are 4 watt, 915 mhz radios and may require a ham license.
• 433 Mhz radios are very common, but can only be used with a ham license. They do not require a license
in Europe.
• Unless you only plan to use the 3DR radios, I highly recommend getting a Technician class ham radio
license. Take practice exams at - http://aa9pw.com/radio/ When you pass every time, go take the test.
You can find a testing location at - http://www.arrl.org/find-an-amateur-radio-license-exam-session
• The radios are Ideally suited to microcontrollers. There are only four wires, +5v, Ground, Transmit, and
Receive.
• The cost for 3DR (like) radios range from $25.00 per set to about $100.00 for a set of genuine 3DR radios.
• The RDF900 radios are about $220.00 for the set.
Google earth plot of flight from APM
Google Earth plot of flight from APM
Altimeters
• Back in the 80’s I was making ejection timers for my rockets to work in place of motor
ejections because I was doing two stage rockets. This led to staging timers which led to an
altimeter.
• Back then things were large, difficult, and did not have much logic.
• Today microprocessors have come a long way, and make it pretty easy to add electronics to
your rockets.
• I wanted to build an altimeter, so I began looking around to see what was available.
• I found a sensor (BMP180) and the Arduino line of microprocessors. The BMP180 has a library
that makes programming the Arduino pretty easy, and the radios mentioned earlier are a
simple plug in. On the ground side any terminal program will work to capture the data.
• The data can then be imported into excel to create an altitude graph of your flight. The next
slide contains one such graph.
Level Two flight altimeter recording
Altimeters continued
• I have incorporated this altimeter in my dual deployment devices. Here is an evolution of
that process.
Altimeters continued
• I will happily show you how to make an altimeter, but I will decline t0o show how to turn that into a dual
deployment timer. There are many fine dual deployment devices on the market, and mine offers
nothing new to the mix. For liability reasons I will not share how mine are constructed.
• It is nothing secret, or complex, it however does have some potential for nefarious use, and could also
result in a failed deployment which could pose a hazard.
• Sorry, it is just that kind of a world.
• Altimeter – parts list
• 1 bmp180 sensor – www.ebay.com $1.50
• 1 Arduino micro – www.adafruit.com $24.95
• Adafruit_BMP085.h library - https://github.com/adafruit/Adafruit-BMP085-Library
• Breadboard – Radio Shack – $2.69 (Might want to hurry and buy extras.)
• 3dr 915mhz radio pair – $25.00 to $100.00
• Lipo battery – www.HobbyKIng.com - Turnigy 1300mAh 2S 20C Lipo Pack hobby king $6.50
• You will need to learn how to program the Arduino, which is not very hard. You will also need some basic wire, solder,
soldering gun, etc.
Altimeters continued
• Wiring for pressure sensor
•
3.3 volt pin on bmp180 goes to 3.3v pin on micro
•
Ground pin on bmp180 goes to ground pin on micro (There are two)
•
SDA pin on bmp180 goes to pin 2 on micro
•
SCLA pin on bmp180 goes to pin 3 on micro
• Wiring for radio – You may need to buy an additional cable for this (and this depends on type of radio.)
•
5v from air radio to 5v pin on micro
•
Ground from air radio to ground pin on micro
•
Transmit from air radio to 0/rx pin on micro
•
Receive from air radio to 1/tx pin on micro
• Power for altimeter
•
Positive lead from battery to vin pin on micro
•
Ground lead to ground pin on micro
Altimeters continued – Code
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
#include <Wire.h>
#include <Adafruit_BMP085.h>
Adafruit_BMP085 bmp;
int average = 0;
// the average
unsigned long time;
float temp;
float alt;
char* mystring;
// Standard pressure of 1 atmosphere
float kpa = 101325;
//You can also plug in the current value
//float kpa = 102780;
//float kpaConv = 3386.3887;
float convToFeet = 3.2808399;
//float localPressure = 29.92;
void setup() {
Serial.begin(115200);
Serial1.begin(57600);
if (!bmp.begin()) {
printf("Could not find a valid BMP085 sensor, check wiring!\n");
while (1) {}
}
}
void loop(){
time = millis();
temp = (bmp.readTemperature());
alt = (bmp.readAltitude(kpa)* convToFeet);
Serial.print(alt);
Serial.print(" , ");
Serial.print(temp);
Serial.println();
Serial1.print(alt);
Serial1.print(" , ");
Serial1.print(temp);
Serial1.println();
}
Useful links
• Altitude Measurement
• http://en.wikipedia.org/wiki/Altimeter
• http://en.wikipedia.org/wiki/International_Standard_Atmosphere
•
•
•
•
•
•
Arduino
http://arduino.cc/en/Tutorial/HomePage
http://arduino.cc/en/Guide/HomePage
http://www.adafruit.com/
www.sparkfun.com
http://www.ladyada.net/learn/arduino/
• My level 3 blog which is a bit behind, but will be caught up soon.
• www.nopizza.com/wp
•
•
•
•
GPS
http://www.trimble.com/gps_tutorial/
http://www.edu-observatory.org/gps/tutorials.html
http://playground.arduino.cc/Tutorials/GPS
Download