If you've been following the exploits of IceBear and a few others, you know that recently they've been beta testing a hot new autopilot that promises to be better and cheaper than anything else in the under $1,000 category. It's called the AttoPilot and I'm delighted that our third interview is Dean Goedde, its creator, who is here to tell us more.
Before we start, a little overview: To date, if you wanted to build an under-$1,000 UAV you only had two choices for the autopilot--make it yourself or pay $500-$800 for a UNAV PicoPilot (and the version of that with the features you want--the NAT--will push the total cost of the UAV to about $1,500).
I'm flying with PicoPilots and generally like them, but the relatively high cost and low feature set of that hardware (plus its total lack of customizability) is why Dean decided to make something cheaper and better. The picture above is him after one of his first successful test flights, which he says shows what he looks like "after 30+hours being awake hammering out new code, followed by generation of 6MB of log data from 20 minute flight!"
AttoPilot could revolutionize our hobby. Dean hasn't announced exact pricing yet, but he's targeting roughly half the price of the PicoPilot and the feature set matches those of autopilots costing thousands of dollars more. The early reports from the beta testers have been very positive.
This is still pre-release, so Dean doesn't have the website up yet (it will eventually be at attopilot.com) and there is still much be done on manufacturing, documentation and fulfillment. But I'm thrilled by what we've seen so far, and I'm hoping that AttoPilot will be powerful, customizeable and affordable--which is really what DIY Drones is all about. And, as you'll see at the end of this post, two years ago he started just like us, learning basic embedded programming with Parallax kits.
The interview will be in three parts:
Q: Can you tell us a little about yourself, day job, background, family, education, hobbies, etc?
I'm 36 years old, born in 1971 in the middle of the Apollo moon rocket days. At age 4 and 5, I would take construction paper, color it red with a crayon, chop it up (to increase surface area) and pack it in a tube with fins and a nosecone. I was suprised when it didn't "go", but can't remember if I tried to apply fire or not (I hope not!).
My mom's older brother is my godfather, and he is like a 2nd dad. He grew up in the 1940's building free flight planes, then did some of the earliest RC in the 50's and 60's (1 channel, "escapement" if you have ever heard of this it uses a rubber motor for torque that applies a bang-bang left/right/neutral choice) and a single pushbutton on the RC Tx. He was a maintenance guy in the US airforce in the early 1960's (heady times indeed) and is an electronics guru, that worked on missile silo maintenance.
In the 1970's he got into multi-channel Heathkit RC gear, and flies on that same equipment to this day. I have memory back to age 1 or so - so I clearly remember a warm summer afternoon in 1975 or so where I was playing in the front yard (rural area) and a 2m sailplane lands on the front yard but I was totally alone, then about 30 seconds later here comes my Uncle sitting on the open window jam of a car driven by his sister in law, coming down the dusty rock road at 50mph, he is hanging out of the car with Tx in hand. He had just flown the plane from his house about 2 miles away.
He was also the type of uncle that is very generous, bringing a plane to family get togethers, letting all of us kids flying it, being helpful, and showing us how to do stunts even. He is just such a super guy and a BIG reason I love this stuff, that I HAD to dedicate a paragraph to him. He is currently waiting for serial # 00001 of the production version of AttoPilot. I talk to him about 3 times a week.
I started building free-flight balsa planes of my own design at age 8. Age 9 I was fascinated with the Wright Brothers, reading a book about them in the 4th grade classroom literally 100 times in that year. This book was not dumbed down for kids, it described all of the background, trial and error, wind tunnel testing, extensive testing in the Carolinas over the sand dunes, about their homemade gasoline engine, etc.... I was enthralled. For 11th birthday my uncle and aunt bought me a 2m sailplane balsa kit from hobby-lobby called the Wanderer. It costs $14 as a kit back in 1982. My parents told me that if I finished it, they would buy the RC equipment.
I built it 100% myself, the covering job looked crappy, but it flew well. I added an 0.049 engine pod, then next year an astro 05 electric motor direct drive on a 7x4 prop. Electric fascinated me from the beginning. From age 12-15 I built many more RC planes, all of them self-designs. The first 5 or 6 just did not fly, but it just made me try harder. I then built a Goldberg Eaglet-50 (0.25 engine, full house control), and was even more hooked.
I studied music performance (trumpet) the first 3 years of undergraduate, but then switched to chemistry. After my bachelor chem degree, I got a PhD in chemistry at the University of Illinois at Urbana-Champaign. In 2001 I moved to Phoenix Arizona to work for Intel Corp (the chipmaker) at a high-volume fab as an engineer, and have worked for them until present.
At my day job, I do a lot of data mining, and looking for correlations between effects and their possible causes. I have 7 years experience sifting through literally terabytes of real-world data from $3 Billion chip making fabs. Looking at data is in my blood, as well as iterative methods of every sort. I am an Excel and SAS JMP guru, though up until recently had no programming experience.
Hobbies include flying RC, AutoCAD design of airplanes and laminate rifle stocks, gunsmithing and target shooting, aircraft construction, and now (the last 2 years) electronics and programming. I like to expose/develop/etch my own PCBs at home for rapid prototypes, and am able to do solder pasting of the smallest SMD components (0402, QFN, etc...).
I have almost no background in electronics or programming except self-taught starting in January 2006. I must recommend the Parallax company for EXCELLENT tutorials/kits/discussion forums to help utter beginners. That is where I was 24 months ago.
Q: In a nutshell, what's the AttoPilot project about?
Q: What's the origin of the name "AttoPilot"?
Well, you have micro and pico pilots, and they refer to the SI notation for millionth and trillionth (1x10e-6 and 1x10e-12), respectively. I have talked to Curt Olson off and on, so I know that guys like him don't need the tiniest autopilot, but for people that do, I'll offer something smaller than the "pico" pilot. "Atto" is SI notation for 1x10e-18, or a millionth of a trillionth. Also, Atto is like Auto, so instead of an auto-pilot, you get the name Atto-Pilot!
BTW, the Beta Attopilot uses pretty big DIP processor and breakout boards from sparkfun.com, but even
then with GPS the unit comes in at 1.6 ounces, which is already HALF of the Pico
Pilot's assembly of PCBs to make their complete system. By going to a NEWER GPS
besides the ETek unit and having Atto be a 100% SMD [surface mount device], the mass drops down to the
figures I quoted, in the < 1 ounce range.
In addition, I have a 6 gram "shrink" version with integrated Kalman IMU on the same PCB with integrated GPS and antenna and
other sensors. This version is suitable to fit INSIDE the wing of a tiny
MAV (like a 6" span plane). This is a work in progress, but I suppose
my point is that my autopilots will TRULY be Atto in sized over this coming
year.
Q: You decided to go with an IR sensor (aka "thermopile", shown) rather than a gyro and accelerometer in an IMU for the first version. Can you explain how you came to that decision?
I have found that even without fancy code, the thermopile is a surprisingly robust solution; a LOT of bang for the buck. This keeps my AttoPilot in the spirit of "simplest low cost 3 axis autopilot.
My first flights were with very stable aircraft (the Miss2 old-timer). Even with this plane, over-steering was a problem at times. I realized some method of attitude sensing was a strict requirement for any serious autopilot.
I started out flying the FMA CoPilot [which is based on the IR sensor show above] only as the typical RC usage on a small unstable homemade plane with no dihedral and just aileron/elevator flight control. After experimentation, I realized that AttoPilot could skew the inputs to the CoPilot control box, and all of a sudden I had AttoPilot flying that same small unstable plane (at 70+km/h) even better than the raw AttoPilot used to fly the polyhedral winged Miss2.
Later, I reverse-engineered the CoPilot sensor head, and figured out how to interface to it directly to AttoPilot via 2 channel ADC (BTW, there is mis-information on the Paparazzi website regarding the FMA sensor head; it say CoPilot head is designed for 5V, but in fact it is actually a 3.3V device, so you don't need to replace resistors to make the gains correct), so now AttoPilot has direct use of the thermopile data, and therefore has direct idea of pitch and roll angle for a robust flight control solution that will never over or under-control.
I am integrating GPS and barometer data with the thermopile, so the solution is very robust, and self tuning. Additionally, although I have a working Kalman IMU, accelerometers have the limitation of being affected by motor vibration, whereas the thermopiles are immune to vibration.
So, in the end, to keep in spirit of a low-cost full function autopilot, I am starting out offering the thermopile version. As I wrote above, my use of thermopiles is more sophisticated than FMA's, so people should not be fearful about how well it will control their plane. I do have a working Kalman IMU, but just not ready to a level that fits my vision of a plug-and-play autopilot. Building all of the fancy control routines for my usage of CoPilot thermopiles is a nice stepping stone to a Kalman IMU later.
Q : Is there a way to use FlightGear to plot a course (waypoints) and have it output GPS to an autopilot as the simulated plane in FlightGear flies that course? Or even output GPS while you fly the plane in FlightGear manually?
For any flightgear flight (manually flown, flown on autopilot, etc.) you can continually output GPS sentences over a serial port. There is a command option that let's you choose exactly what you want to do:
It looks something like:
<protocol>=<channel>,<direction>,<hertz>,<channel_specific_options>
So if you wanted to output standard NMEA strings on COM1 at 1hz using 4800
baud, you would do this:
nmea=serial,out,1,COM1,4800
With this option activated, you can connect a variety of moving map applications, or a PDA, or just about anything else that is capable of connecting up with a gps and doing something. For instance, there is a palm pilot moving map application designed for flying and this can be slaved to a running
copy of FlightGear. Here's a video of that:
So you could plug a real gps into flightgear and have flightgear draw a 3d view based on the gps data.
Or you could slave one (or more) copies of flightgear to a single master copy (sending and receiving the data at 60hz over a network connection) and create a
multi-monitor distributed simulator system with a wrap around visuals.
That's what we've done here:
File input/output is also an option for this command so for another example you could fly some route, log the nmea/gps strings as you fly to a file (instead of sending them out a serial port), and then have that file to feed that back into your autopilot system later for testing and development.
This all might sound a bit crazy, but one of the design goals of FlightGear is
(as much as possible) to be open, flexible, and adaptable to new
situations. Exposing a variety of ways to send and receive data allows
FlightGear to be adapted to a huge variety of uses.
So just to summarize ...
OUTPUT:
FlightGear can be used to drive external moving maps, external gps's, even
other copies of FlightGear to create a multi-monitor wrap-around visual
configuration.
INPUT:
FlightGear can take input from a variety of sources so it can be slaved to an
external GPS or IMU outputting data in real time, it can be used to replay a
saved flight. I talked to an engineer that had ride in the back of a 767
with no windows and wanted to interface FlightGear to the live 767 systems so
he could see what was going on while he flew.
MULTIPLAYER:
Don't forget the FlightGear multiplayer system. If you are slaving
FlightGear to some external data source, but have the same copy of FlightGear
connected to the FG MP system, now suddenly you have the possibility of
injecting a real, live flight into the virtual FlightGear world and anyone else
logged onto the multiplayer system, can watch your real UAV fly in the virtual
world. They can come up and fly with you, etc. If you have multiple
uav's registered in the system they can all see each other in their respective
synthetic views, they can be highlighted/circled on the hud overlay, etc.
It's almost a little mind bending to think about, but it's all there and has
been succesfully demoed. Oh, and we have a google maps based multiplayer
map system, so if you do have your live UAV flight registered in the MP system
via a local running slaved copy of FlightGear, anyone with a web browser,
anywhere in the world can track your UAV live.
I don't know if all of these things are immediately useful to everyone (or may
never actually be useful for anyone) but sometimes you do things just because
they are cool and fun and because you can, and somewhere, someplace you hope
you've scored a couple geek points. :-)
[In our next installment of this series, we're going to drill down on connecting FlightGear to an IMU...]
A few reasons:
We chose magnetometers because the earth's magnetic field is well modeled and provides a very good inertial reference to the aircraft.
We believed that the world magnetic model would provide sufficient coverage and accuracy for us to use for the inertial references. So far we've found it acceptable.
The magnetometers available are capable of detecting rotations to hundredths of a degree. We're not that accurate but we only need a few degrees accuracy for the current airframe.
We didn't believe it would be possible to calculate the attitude using a kalman filter with gyros and accelerometers because of the clock cycles this would consume and without floating point maths the solution could become to inaccurate.
We were concerned with the possible noise issues, however we found that most of the noise was high frequency and easily filtered out.
Since we're concerned with the frequencies below 50Hz the main problem is calibration for soft iron effects in the aircraft. These are calibrated by rotating the aircraft (easy while its this small) and recording the results then applying the appropriate bias' and offsets.
The magnetometers provide highly repeatable results with a long lifetime, they're very small, consume little power and perhaps could allow us to fabricate a 'system on a chip' solution.
They're also successfully proven on LEO (low earth orbiting) satellites.
Q: Why couldn't you use the magnetometer for roll, too? Indeed,with enough processing power could you imagine a full-featured autopilot with magnetometers alone?Unfortunately, a single measurement of a vector can only provide two axis of information. There are papers out there which describe using Kalman filters to include dynamics and capture multiple measurements to resolve the third axis without requiring another sensor however as far as I'm aware these algorithms are only used on LEO satellites and require the collection of data from a complete orbit to provide a solution. We also don't have a gravity gradient stabilized airframe which they rely on, so we choose a roll stabilized airframe and assumed that the roll would be zero (of course that's not true but it helps to make it possible).
A good place to read more about the many different attitude determination algorithms is some of the papers available through Google scholar.
To explain it for those of us who are more visual the image shown here [at the top of the page] shows a single vector measurement viewed in the inertial frame. You can imagine the x,y and z field measurements which the plane would make in the body frame.
For the second interview in our series, we'll go to Australia, where aerospace engineer Matt Chave has been developing a very interesting open source UAV that uses magnetometers in an interesting way (and he's using FlightGear for simulation!). Called CUAV (formerly Apeliotes), it's pretty much state of the art for amateur UAVs and is full of good ideas that we can all use.
Q: Can you tell us a little about yourself, day job, background, family, education, hobbies, etc?
I've always had a fascination with aircraft, physics, maths, programming and electronics among other things and couldn't think of a more perfect way to combine them all than an aircraft flight control system. While I was an undergrad I managed to convince my supervisor at uni that we could make an R/C autopilot for my honors year...(actually it didn't take much convincing he's a bit of a modeler himself). So I did plenty of reading over the summer holidays while I worked for a navigation company in New Zealand called Navman, and was ready to hit the ground running the following year implementing it. The original design was called the Apeliotes project and included the hardware and software to fly a small polystyrene plane. The controller used an arm7 micro on a custom board:
The only sensor was a three axis magnetometer to determine the error in pitch and heading from the desired attitude assuming the roll angle was zero. Apeliotes flew fairly well and managed several successful test flights switching between Remotely piloted and autopilot while in flight and recovering from any attitude our test pilot could put it in back to straight and level flight towards geographic north. you can see the video here.I haven't given up yet on the magnetometer-only design yet, but it was difficult to make it fly anything other than north and level. Not that there's anything special about geographic north for the magnetometer especially in Dunedin where we were testing (inclination 70+degrees, declination about 20degrees). But I was taking too much time and we needed to detect roll anyway to fly more sophisticated models. So when I continued the project as a masters with the uni we added in a three axis accelerometer and toyed with a few computationally inexpensive attitude detection algorithms including; downhill simplex minimisation of Wahba's loss function, Triad, QUEST, etc...
A new controller board was created (below) with the lessons learned from the first along with many other developments and the project changed its name to the CUAV (custom unmanned air vehicle). Yeah, I was sick of the Apeliotes name :)
I've now moved to Australia with the project landing me a great full time aerospace job and am continuing the open source development of the CUAV in my spare time.Q: What's unique about CUAV?
I'll try to summarise some of the major differences:
Q: Can you tell us a bit about yourself? We know you're the creator of FlightGear, but would love to hear a bit more about your day job and UAV projects. Also family, hobbies, odd things that nobody knows about you ;-)
Currently I'm employed in the Mechanical Engineering Department of the University of Minnesota, however that is only 50% time right now and I've been told that as of June, the department will be unable to renew my contract. <insert plug for Curt looking for possible employment or uav consulting projects> :-)
My primary focus at the university has been engineering support for a very
advanced driving simulator:
I am also involved in a UAV project with ATI, sponsored by NOAA. This has been a lot of fun because it involves designing a new airframe from the ground up, quite a few unique operational challenges (launch from a small boat, recovery in the ocean) and [twist my arm] a couple trips to HI.
Hobbies: RC model airplanes since high school, small plastic and balsa models before then. I also play a little soccer in an old guys league in the winter and still try to chase around the young guys on my summer team.
Odd things? I was a big Duke's of Hazzard (tv show) fan in high
school. My latest FlightGear invention is a tribute to simpler times ...think my sense of humor is optimized to entertain myself
and probably not many others. :-)
Q: What are the range of options in UAV simulation/testing? We know about basic GPS NEMA sentence generation, but what else is possible, from course drawing to IMU simulation?
I think if you are careful and clever, you can test just about every element of your system on the ground. That's actually not a bad idea because it's often hard to trouble shoot something that's a couple hundred yards away that you don't have physical access to and have no way to look inside and poke around.
Q: What can FlightGear offer as a simulation engine? Advantages over other options, such as dedicated GPS sims or MSFT Flight Simulator plug-ins? Special suitability to amateur UAVs, etc.
FlightGear can be useful in a number of ways throughout the lifespan of a UAS project. Such as: