3D Robotics

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.]

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • 3D Robotics
    That hasn't been our experience. We fly at the beach all the time and don't see stability issues.
  • If One were to operate their UAV over a land/ water interface ore shoreline area, in your opinion, would IR thermopile sensors produce false readings due to the difference in temp between land and water?
  • After extensive testing, I have concluded that the only sensible solution with clean math is a full 3-axis XYZ thermopile system (yes, that is 6 sensors) which is still only around $18 TOTAL cost (yes, $3 per sensor) in the volume I am buying for production, which is the 5000 piece quantity. A triad is just a version of 2-axis XY, but with a lot harder math, because now you don't have nice simple opposing pairs creating nice well-behaved differential inputs to an OpAmp. You have to measure each sensor indivudually, then amplify via OpAmp in a less clean manner, then do the trig. I am sure it is possible and I had the idea, but not nearly as elegant as simple opposing pairs in 3 orthogonal axes.
    So you can do a 2-axis thermopile system with pre-flight range calibration (nose down step), then during flight calculate pitch and roll via ArcSine(current ADC/Scale ADC value), but problems arise for at least two reasons: 1) as ground temp changes the angles are being meausred the same and plane can start to bank either too wimply or too hard, 2) the whole ArcSine is only an approximation... not perfect in reality because the sensor's internal sensor geometry is not perfect in the sense that the cold junction thermopiles are not a point but rather spread as an array, and the internal attenuating window creates sort of a shadow at various view angles. So if instead you have X, Y, and Z thermopile pairs, then angles are calculated all the time with only current live data, not a pre-flight cal: ArcTan(X/Z) and ArcTan(Y/Z) to get pitch and roll, respectively.
  • 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.
  • 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...
  • What countries does their patent cover?
  • 3D Robotics
    Dean,

    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?
  • 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
    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
  • 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 Digikey.com 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?
This reply was deleted.