Digital Altimeter/Barometer/Voltmeter

Altimeter , barometer and voltmeter using a Picaxe 14M2

This  instrument uses the same hardware. All applications could not be coded in the limited memory of the 14M. but it was later upgraded to use the 14M2 which could do al three.

It is designed to operate from a car battery, and to measure that voltage. It can alternatevly use a plugin 12V power supply.

In our RV, the refrigerator runs off the “house” batteries, which last about two days with no recharge, hence this latter facility. In both applications means are provided to set the offset, either sea-level barometric pressure or current altitude, respectively. 

The design uses the Freescale MPX4115A sensor. A biassed amplifier restricts the range to –700 to 13000 feet, adequate for an RV on paved roads in the Western USA. A two-range approximation is used to convert pressure to altitude, being the most that would fit in the code space. Up to 5500’ the output of  READADC10 is accumulated 13 times, and deducted  from 12250 to give the altitude in feet. Above that the multiplier is 16 and the offset 13500. There is a + or – 200’ hysteresis to prevent jitter errors. Provision is made for properly displaying altitude below sea level. The approximation error is between –160 and +129 feet.

The barometer code is simpler. The count is acumulated 32 times, divided by 25 and 1774 added to give the pressure in 0.01” of Hg. In this case there was enough code space to store and adjust the offset in EEPROM. This approximation error is –.0022 to + .0012” from 25 to 30.5”.

The voltmeter also has a biassed amplifier to cover only the range 5 to 15V, displaying in 10 mv steps. The measured error is less than 0.3% from 7 to 15V. 

The display uses a MC14489 serial LCD controller. However, a military-surplus six-digit 7-segment incandescent display was used, which is clearly readable in full sun. This required isolating diodes in each segment and boosters for both the segment and digit drives. 

To program, remove the cover and plug in the programming adapter which has a metal plate with a DA9-S and a pigtail which terminates in a plug which plugs into a 3-pin header on the processor board. The marked side goes towards the center of the board.

The barometer code is PicaxeBarometer.bas, the altitude code is PicaxeAltimeter.bas

Operation:

The input is from a 12-volt car battery or equivalent, + in center. The case is negative.

The left button on the back is UP, the right is DOWN.

Press UP for Altitude in feet or Barometric pressure in 1/100 of inches of mercury.  

For altitudes below sea level a L appears on the left.

Press DOWN for measuring input volts in 10’s of millivolts.

In barometer mode it is necessary to compensate for altitude.

In altimeter mode it is necessary to compensate for barometric pressure.

If you know what the reading should be, press both buttons together until a C appears on the left.

This holds the value of the sensor until the C disappears. 

Press UP to increase the reading until it is right, or DOWN as necessary to get to the known value.

Wait until the C disappears to resume readings.

Altitude

Millibars

Volts