6 replies
by andrewk
So far, only the altimeter and thermometer portions have been tested. That prototype died when my then 4-year-old son decided to experiment with some wire and the pressure sensor. I'm not sure if it was the sharp tip or the 12V DC connected to the other end of the wire, but things were never the same afterwards.
That was about a year ago, and I have ony recently started working seriously on the project again. I'm using a Renesas R8C13 microcontroller, a Motorola MPXAZ4100A atmospheric pressure sensor, and an Analog Devices AD976 A/D Converter. Last night I got the microcontroller reading the voltage output by the pressure sensor through the A/D converter. Tonight I hope to get it converted to the corresponding atmospheric pressure and altitude.
by jhcox
Hmmm - well, the three axes of airplane movement are roll (rotation around the long axis of the plane body), pitch (rotation around an axis that passes through the plane body parallel to the wings) and yaw - rotation about an axis that passes through the body perpendicular to the wings.
Think of pitch as nodding your head (an up-and-down motion) and yaw as shaking your head (swiveling it left and right).
So if you want to use the Y in yaw, add a compass function to your device - which is related to left vs right movement.
Glad to have been of help! :)
JHCoxx
by andrewk
Thanks, JHCoxx.
I actually requested (and received) some samples from PNI Corp., thinking of adding a compass functionality, but have not yet had time to implement it. I hadn't associated it with yaw, although I used to want to be a pilot. Would that be a "yawmeter" or what?
by andrewk
It took me two evenings and a couple of hours this morning, but it wasn't the electronics, it was the algebra.
The MPXAZ4100A has a transfer function given by
V(OUT) = V(S)*(P*0.01059 - 0.1518)
where V(OUT) is the output voltage, V(S) is the supply voltage, and P is the atmospheric pressure in kilopascals (kPa). I read V(OUT) from the A/D converter, so the formula I need is
P = (V(OUT)/V(S) + 0.1518)/0.01059
It just took me three days to realize that. I was dividing by 0.01059 then adding 0.1518, and getting altitudes around 3200 meters. And I'm a college physics teacher in the evenings! I hope none of my students reads this, or I'll lose what little respect thay have for me.
More later on the pressure to altitude conversion - it's quite interesting, really.
by andrewk
Is it really that long since I wrote anything? I guess it must be, because there are the dates.
That is one important thing about my device: It has been known to hibernate for long periods, regardless of season. I guess it comes of having to share my attention with a wife, two young children, and two jobs.
However, I did promise to comment on the pressure to altitude conversion, so here goes.
My (rather limited) knowledge of the subject comes mainly from two excellent websites: www.intersema.ch and www.digitaldutch.com. As I understand it, in 1976 the National AeroSpace Administration published the result of a series of studies of the composition of the Earth's atmosphere in what is know as the 1976 Standard Atmosphere. As an extreme simplification, the higher you go, the less dense the air is (lower atmospheric pressure) and the colder it gets (lower temperature). There are equations relating the altitude above sea level, the standard air pressure, and the air temperature. The DigitalDutch site includes a Standard Atmosphere Calculator, which uses these equations to predict the pressure and air temperature for a given altitude, or the altitude corresponding to a given air pressure and temperature.
The folks at Intersema have gone one better. As they build pressure sensors designed to be used in portable electronic devices, they have taken the trouble to approximate the standard atmosphere equations (which are extremely non linear) and approximate them to a series of straight line segments. This reduces the calculations required for converting pressur to altitude to simple multiplications and additions, well within the powers of a small embedded microcontroller. The full details are in the Application Note AN501, "Using MS5534 for altimeters and barometers", which can be downloaded from the Intersema website.
The program in my embedded microcontrolled has the constants stored in a memory table. It selects which parameters to use, depending on the pressure read from the sensor, and carries out the necesarry calculations. As I mentioned in my previous post, it seems to be fairly accurate. Owing to project hibernation, extensive testing is yet to be carried out.
This discussion is closed to new replies.
Trending After Hours posts
Sort by Trending