Arduino altimeter & airspeed indicator

Discussion in 'Instruments / Avionics / Electrical System' started by cluttonfred, Apr 8, 2015.

Help Support HomeBuiltAirplanes Forum by donating:

  1. Jun 16, 2019 #101

    kalazzerx

    kalazzerx

    kalazzerx

    Member

    Joined:
    Dec 4, 2018
    Messages:
    5
    Likes Received:
    3
    Location:
    TN
    Curious, why not just use what is out there and build a stratux which provides you with everything I think you are looking for which is provided by GPS, AHRS, and normal ADS-B antennas. You then use your old cell phone or a cheap table and have a cool setup. This is what I am planning to use when I get my LE XL completed :)
     
  2. Jun 16, 2019 #102

    Saville

    Saville

    Saville

    Well-Known Member

    Joined:
    Apr 28, 2014
    Messages:
    60
    Likes Received:
    11
    Location:
    Boston Ma

    That is most definitely the second easiest way to go. The easiest (and most expensive) way is to by a Stratus III (not stratux). But I do understand the fun of building your own system.

    As I mentioned in this thread or a similar one, if I were going to homebrew this myself I'd do it with a Raspberry Pi. That system is much more attuned to this sort of app than an Arduino. All the ancillary hardware exists to give you everything (not just airspeed) and you can store the data on a micro chip.
     
    Groundhog Gravy likes this.
  3. Jun 16, 2019 #103

    kalazzerx

    kalazzerx

    kalazzerx

    Member

    Joined:
    Dec 4, 2018
    Messages:
    5
    Likes Received:
    3
    Location:
    TN
    Agree. I like doing it myself on the cheap and built mine for just over a hundred dollars. Got most of the individual parts on amazon, 3D printer housing, and burned software image.
     
  4. Jun 16, 2019 #104

    Hephaestus

    Hephaestus

    Hephaestus

    Well-Known Member

    Joined:
    Jun 25, 2014
    Messages:
    1,141
    Likes Received:
    246
    Location:
    YMM
    Actually Arduino superceeds raspberry pi for this type of work.

    A microcontroller will always be safer than a full computer. A pi with WiFi /Bluetooth etc can stall / hang / delay waiting on random connections or have issues with the other subroutines running. The dedicated nature of an Arduino and not having the computing cycles to allow for the extraneous crap that makes it safer.

    Yes you can push an Arduino past the point of reason by adding in other gadgetry but generally you won't have the memory to load enough to make it unstable in that sense. As soon as you get multiple processes running bad things can happen.
     
  5. Jun 16, 2019 #105

    timmyjane

    timmyjane

    timmyjane

    New Member

    Joined:
    Jun 16, 2019
    Messages:
    2
    Likes Received:
    1
    Looks like this sensor has a 10kpa limit but a 0 lower limit vs -2. Any reason to need -2? This sensor should allow for use on higher speed aircraft.

    https://www.mouser.com/datasheet/2/302/MPX5010-1127094.pdf
     
    Last edited: Jun 17, 2019
  6. Jun 17, 2019 #106

    282ex

    282ex

    282ex

    Member

    Joined:
    Jun 30, 2018
    Messages:
    9
    Likes Received:
    1
    Location:
    Everett, WA / USA
    This is why you dont want GPS only supplied gauges:
    https://www.aopa.org/news-and-media...ry/27/more-gps-interference-exercises-planned

    Also, unless you use different media than an sd card, that rpi will hang on you, sd cards are not designed to be os drives. Go browsed the stratux boards to see the complaints of lockups.
     
  7. Jun 17, 2019 #107

    Bill Welter

    Bill Welter

    Bill Welter

    Member

    Joined:
    Jun 11, 2019
    Messages:
    11
    Likes Received:
    9
    Thanks Tim Crumley for the suggestion of using the MPXV5010DP sensor. I just used the common MPXV7002DP sensor since that's what others were using, just to get started, but you can only use 0-2 kpa, with 2.5-5.0 v.. The 5010 sensor will sense 0-10kpa (550 kts?) but we may lose some granularity at low speeds with that one. But I did find the MPXV5004DP sensor which is 0-3.92 kpa (220kts?), which should be about right. And that will sense ~0-4 kpa @ 0-5.0 v, so the code will be very close with a few tweaks. It doesn't come mounted to a circuit board that I could find, but it looks like it would work on the board I already have for the 7002 sensor. Gonna get one and try it
     
    Last edited: Jun 17, 2019
    timmyjane likes this.
  8. Jun 17, 2019 #108

    Bill Welter

    Bill Welter

    Bill Welter

    Member

    Joined:
    Jun 11, 2019
    Messages:
    11
    Likes Received:
    9
    I forgot that the pressure/speed formula is non-linear. 4 kpa will only be good for 185 kts or so. So, the 5010 sensor will be needed above that speed. Or two sensors, one for low speed and one for high speed, switchover about 110 kts
     
  9. Jun 20, 2019 #109

    Bill Welter

    Bill Welter

    Bill Welter

    Member

    Joined:
    Jun 11, 2019
    Messages:
    11
    Likes Received:
    9
    I got the MPXV5004DP sensor, soldered it to the extra board I had for the original sensor, and it reads up to 154 kts with no code changes except for raising the max speed for the display. Code worked correctly with the new sensor with no tweaks. Since the low range of the sensor (ambient pressure) reading is 1.5 volts, we don't get the full range I was looking for, but 154 kts is pretty good. Will need to get a 5010 sensor sometime and see how that works.
     
  10. Jun 20, 2019 #110

    rv7charlie

    rv7charlie

    rv7charlie

    Well-Known Member

    Joined:
    Nov 17, 2014
    Messages:
    410
    Likes Received:
    155
    Location:
    Jackson
    Might not affect you personally, but most people still interpret an analog display faster than a digital readout. I discovered this back in the previous century (early 1980s) when I switched from a match-needle SLR to a Canon 'digital' (readout) SLR. Peripheral vision in the vewfinder can easily interpret a match-needle, but you must focus on a digital display and actually read it. '1050' looks a lot like '105', until you pause, focus on it, and actually read it. But 'needle position', even if it's digitally generated, would be very obvious even in peripheral vision. More current evidence of this effect is found in modern engine monitors. Most of the displays use bar graphs or varying arcs to display data, because it's easier to interpret on the fly (pardon the pun).

    I, too, like the idea of expanding a Stratux to include airspeed/baro altitude, but I do get wanting a separate instrument.

    Charlie
     
  11. Jun 22, 2019 #111

    Saville

    Saville

    Saville

    Well-Known Member

    Joined:
    Apr 28, 2014
    Messages:
    60
    Likes Received:
    11
    Location:
    Boston Ma
    Except that I'm not using the SD card for the OS or programs - just data storage.
     
  12. Jun 22, 2019 #112

    282ex

    282ex

    282ex

    Member

    Joined:
    Jun 30, 2018
    Messages:
    9
    Likes Received:
    1
    Location:
    Everett, WA / USA
    What storage are you using to run the rpi os?
     
  13. Jun 23, 2019 #113

    Saville

    Saville

    Saville

    Well-Known Member

    Joined:
    Apr 28, 2014
    Messages:
    60
    Likes Received:
    11
    Location:
    Boston Ma
    That which comes with the card. The data storage is an add-on SD.

    Please: Use what you like best. I find that the R Pi is better from a programming, peripheral and capability standpoint than the Arduino for this application. Especially the peripheral point of view. Before you ascribe any Stratux hang up to the SD card you'd have to also look at the program.

    If you prefer the Arduino go for it - more power to you. I'm not interested in a drawn out debate.
     
    CharlieN likes this.
  14. Oct 7, 2019 #114

    Bill Welter

    Bill Welter

    Bill Welter

    Member

    Joined:
    Jun 11, 2019
    Messages:
    11
    Likes Received:
    9
    Originally I used the 3461BS LED chip, since I knew nothing about it. But I got a TM1637 board, which is serial interface and uses the 3462BS LED chip and only 4 wires. Much easier to hook up, and the display commands are just two lines, instead of 167 lines! If anyone is interested I can post that info
     
  15. Oct 8, 2019 #115

    pictsidhe

    pictsidhe

    pictsidhe

    Well-Known Member

    Joined:
    Jul 15, 2014
    Messages:
    6,702
    Likes Received:
    1,765
    Location:
    North Carolina
    I'm slowly collecting bits to build some digital steam gauges. They can be lighter and cheaper and shorter than real steam gauges. They also suit my WWII replica a whole lot better. Car instrument steppers look absolutely ideal. I have GM one here, it sucks 20ma per phase and weighs 7g. They can be had for few bucks each. They can run at up to 100rpm, plenty enough for an altimeter while going straight down at Vne in a 103. I'd like 100s and 1000s needles, which is a gearing hassle. The case is the hard part. I will probably get some cheap 52mm and 85mm car gauges and gut them. Luminous paint and UV LEDs backlighting (blacklighting?) will look exactly like period radium paint.
    For the altimeter, a double system with either GPS or a pressure backup seems a good idea. Pressure is easier to implement.
    I have way too many Pis, this will be my first Arduino project. My Pi router has been running 24/7 on the same SD card for 3 years now. There are ways to make them work.
     
  16. Oct 8, 2019 #116

    Aerowerx

    Aerowerx

    Aerowerx

    Well-Known Member

    Joined:
    Dec 1, 2011
    Messages:
    4,899
    Likes Received:
    1,315
    Location:
    Marion, Ohio
    I looked into this several years ago. They are not really steppers., but air-core motors with 2 windings. The windings are such that the motor is driven with two signals in quadrature (sine/cosine). This makes them self indexing, unlike a stepper motor (when you first turn it on you don't know where it is pointing).

    There have been numerous threads on this in the past 10 years or so. You might try searching for "diy instruments".

    Also, I remember a website where a guy was building his own cockpit flight simulator, with homemade instruments. Google "DIY flight instruments" and it should come up.
     
  17. Oct 8, 2019 #117

    pictsidhe

    pictsidhe

    pictsidhe

    Well-Known Member

    Joined:
    Jul 15, 2014
    Messages:
    6,702
    Likes Received:
    1,765
    Location:
    North Carolina
    The SWATCH one in front of me has a PM armature. 180:1 gearing and is described as a 'lavet' stepper. On full steps, it stays where it was de-energised. I don't really care if they are 'real' steppers or not, they will work just fine for my purposes and I know how to drive them, which is what matters.
     
  18. Oct 8, 2019 #118

    Hot Wings

    Hot Wings

    Hot Wings

    Well-Known Member HBA Supporter

    Joined:
    Nov 14, 2009
    Messages:
    6,308
    Likes Received:
    2,266
    Location:
    Rocky Mountains
    So, how are you finding and setting to zero at startup? With normal stepper gauges we just bang them against a stop with excessive steps and the phase modulated (quadrature) are easy to zero.

    I can see the power advantages of the Lavet type, but how to set or finding the zero point without a separate sensor eludes me - at least this early in the day.:confused:
     
  19. Oct 8, 2019 #119

    Aerowerx

    Aerowerx

    Aerowerx

    Well-Known Member

    Joined:
    Dec 1, 2011
    Messages:
    4,899
    Likes Received:
    1,315
    Location:
    Marion, Ohio
    The coreless (actually called "air core") motors I was thinking of have a permanent magnet rotor with a single pair of N-S poles.

    There are two sets of stator windings at right angles to each other. Call one winding "cosine" and the other "sine". When the cosine winding is at maximum positive current and the sine winding is at 0.0, that is the zero point. No mechanical stop. No pointer banging. No "zero point sensor".

    If you want the pointer at a certain angle, then the currents to the two windings are at the cosine-sine ratio of the angle. For example 0.707 and 0.707 of maximum current would be 45 degrees.

    It is feasible to build your own such motors, particularly if you can do small-size metal machining (which i only have hand tools for). When I was looking into this several years ago I even came up with a scheme for putting 2 such motors on concentric shafts, for use as a two-pointer altimeter.

    What is needed for DIY motors are cylindrical magnets with the N-S magnetic poles across the diameter instead of the usual length wise. (check out supermagnetman.com)
     
  20. Oct 8, 2019 #120

    pictsidhe

    pictsidhe

    pictsidhe

    Well-Known Member

    Joined:
    Jul 15, 2014
    Messages:
    6,702
    Likes Received:
    1,765
    Location:
    North Carolina
    The one I have has stops. 315 degrees of movement. I could either zero at startup, or do as my truck does and remember the position for things like fuel and altitude. If I build a 2 pointer altimeter, I'll probably make a cycloidal reduction drive and remove the internal stop. Buttons could be used to adjust ground altitude, as it used to be done...
    At 7grams, 30mm OD and under $2 each for Swiss engineering, I have no inclination to build my own.
     

Share This Page

arrow_white