Arduino altimeter & airspeed indicator

HomeBuiltAirplanes.com

Help Support HomeBuiltAirplanes.com:

kalazzerx

Member
Joined
Dec 4, 2018
Messages
5
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 :)
 

Saville

Well-Known Member
Joined
Apr 28, 2014
Messages
80
Location
Boston Ma
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 :)

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.
 

kalazzerx

Member
Joined
Dec 4, 2018
Messages
5
Location
TN
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.
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.
 

Hephaestus

Well-Known Member
Joined
Jun 25, 2014
Messages
1,457
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.
 

timmyjane

New Member
Joined
Jun 16, 2019
Messages
2
The Arduino code on the websites I found have errors and are incomplete. I got the Arduino, wrote the code for airspeed, and to display the speed up to 110 kts or 125 mph (limit for the 2 kpa sensor) on three 7-segment LEDs. It's actually pretty accurate! I can forward the code and pinouts if needed.
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:

282ex

Member
Joined
Jun 29, 2018
Messages
10
Location
Everett, WA / USA
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.
This is why you dont want GPS only supplied gauges:
https://www.aopa.org/news-and-media/all-news/2019/february/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.
 

Bill Welter

Member
Joined
Jun 10, 2019
Messages
20
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:

Bill Welter

Member
Joined
Jun 10, 2019
Messages
20
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
 

Bill Welter

Member
Joined
Jun 10, 2019
Messages
20
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.
 

rv7charlie

Well-Known Member
Joined
Nov 17, 2014
Messages
540
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
 

Saville

Well-Known Member
Joined
Apr 28, 2014
Messages
80
Location
Boston Ma

Saville

Well-Known Member
Joined
Apr 28, 2014
Messages
80
Location
Boston Ma
What storage are you using to run the rpi os?
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.
 

Bill Welter

Member
Joined
Jun 10, 2019
Messages
20
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
 

pictsidhe

Well-Known Member
Joined
Jul 15, 2014
Messages
7,368
Location
North Carolina
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
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.
 

Aerowerx

Well-Known Member
Joined
Dec 1, 2011
Messages
5,355
Location
Marion, Ohio
...Car instrument steppers look absolutely ideal....
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.
 

pictsidhe

Well-Known Member
Joined
Jul 15, 2014
Messages
7,368
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.
 

Hot Wings

Well-Known Member
HBA Supporter
Log Member
Joined
Nov 14, 2009
Messages
6,736
Location
Rocky Mountains
for my purposes and I know how to drive them, which is what matters.
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:
 

Aerowerx

Well-Known Member
Joined
Dec 1, 2011
Messages
5,355
Location
Marion, Ohio
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:
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)
 

pictsidhe

Well-Known Member
Joined
Jul 15, 2014
Messages
7,368
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.
 
2

Latest posts

Group Builder
Top