Dean Goedde interview, part 3: All about IR sensing vs. gyros

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: What was the biggest challenge in designing AttoPilot?

Besides learning embedded programming over the last 12 months, besides coming up with the trigonometry routines that work anywhere on the globe, the biggest challenge in came from learnings with the Beta testers: making the Rx-interface code object TRULY universal to all R/C Rx out there. I had to crack down on myslef and learn assembly code, which I had avoided up until 2 months ago. Now that I know assembly, I am not only HOOKED on it, but re-writing other code objects.

Q: What advice do you have for others that are interested in building autopilots or related gear?

These things are difficult, like Masters or PhD thesis level work, so don't kid yourself that it is easy. Have passion for it. If you are so determined to make something happen that the thought of it not working out makes you very unhappy, then you WILL find a way to get around ANY barrier, including lack of knowledge. Just because you don't know how to do something is the WORST reason for not doing it! Read "Think and Grow Rich" by Napolean Hill - Passion for something is the #1 ingredient to success.

[Part 1 of this interview series is here. Part 2 is here.]

Views: 1854

Comment by paul hubner on February 4, 2008 at 9:13am
I've been following Dean's work through the RCGroup threads and have great respect for him and his work. Though I too would love to see an open source version because I like to tinker, I can't complain one bit with the incredible advancements that he has made.

I'll be buying one this summer.

Comment by Marcus Wolschon on February 4, 2008 at 11:02pm
I added a note about your findings on the 5V vs 3V on the FMA-sensor to the talk-page in the paparazzi-wiki
and made a comment for it on the mailing-list. Maybe
they switched parts or something.

BTW, that sensor is "out of stock" since eons on the
FMADirect-site. Can you name any other source where
we can get some of them? (Preferably in europe but anything
will be fine)

3D Robotics
Comment by Chris Anderson on February 5, 2008 at 2:09pm
The Paparazzi sensor is funtionally identical, a far as I can tell, and seems to have avoided patent issues. Is that a valid comparison?
Comment by Dean on February 5, 2008 at 2:32pm
But Paparazzi is essentially not-for-profit right? I doubt Paparazzi makers have impacted FMA's bottom line.

Me on the other hand.... I saw that the thermopiles are cheap from in large Qty (<$4), and the only other things the head has are a cheapo AD8552 Op-amp and a few passives. I do have a better controller and software design than FMA for assisted CoPilot type flight, because mine uses P and I terms, and handles overlapping input signals w/o need for servo buffer. I wonder if I put the design and code out for DIY if THAT would be infringement? I wonder what the royalty fees might be?

3D Robotics
Comment by Chris Anderson on February 5, 2008 at 2:38pm
My next interview here is with the Paparazzi team. I can ask them (privately) if they have any advice for you, and PM you the answer
Comment by Dean on February 10, 2008 at 2:43pm
I read the patent for FMA's CoPilot. It describes the invention as using pairs of opposing thermopiles with an OpAmp. That sounds 100% just like the Paparazzi version. On the other hand, it might be possible to avoid the patent issue by another design that does NOT use opposing pairs, such as a tetrahedral arrangement (think corners of triangular pyramid). This would be more computationally intensive (FMAs design is elegant and simple), but should work in my opinion.

3D Robotics
Comment by Chris Anderson on February 10, 2008 at 4:38pm

Worst comes to worse, couldn't you just buy the FMA sensor heads ($42 single, but they might give you a bulk discount) and package them in your AttoPilot, perhaps rebadged?
Comment by Marcus Wolschon on February 10, 2008 at 10:05pm
What countries does their patent cover?
Comment by Dean on February 11, 2008 at 9:17am
Chris - good point and YES. Actually, I would rather re-design the head, and just pay them a small royalty for the following reason: I think the sensor head should have the Analog-to-Digital converter within it, that way there is no possibility of stray RF or poor connection skewing the OpAmp voltage output. In my scheme, you would have 5 wires to sensor (GND, +5V, CLK, CS, and combined DI/DO), then within the head a Vreg drops voltage to precise 3.3V for thermopile/OpAmp, then in-head 12bit ADC samples that, and autopilot reads the digital output from 12bit ADC. I think FMA's design does NOT have ADC in the head because their PIC micro in the control box is doing it (8bit ADC?). I'm not a PIC guy, but looking at their control PCB, I see no ADC, and the Pitch and Roll signal lines go right to the PIC.

Marcus: I didn't read every line of the patent. You'd have to look it up (Google search for "Patent xxxxxxxx" with xxxxx being the exact patent #). The patent # is on the top of the sensor head. One note: Paparazzi site has a link to an excellent report regarding use of thermopiles for attitude measurement. Specifically, 1) there is a simple linear relationship between angle, and voltage output from the OpAmp. In contrast, the patent shows a non-linear relationship in a graph (sinusoidal), which I think is more of a cartoon schematic, not a literal description. 2) Paparazzi link describes how thermopiles saturate when more than about 50 degrees from level due to their view being 100 degrees. This is absolutely correct in my experiments. The patent does not show this saturation in their plot. The reason I bring all of this up is to not put too much stock in the technical details of the patent. For example, the patent also shows a sort of goofy flow chart of how you would control pitch or roll using OpAmp output from a pair of thermopiles, that is sort of archaic IMHO. Interesting and worth reading though...
Comment by bGatti on July 2, 2008 at 2:59pm
I like the idea of 3 IR sensors in a triad - as this would give you 2 degrees of detection with fewer expensive parts $12-18 a piece in DIY quantities. Feed all to ADC and do the math.


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service