PDA

View Full Version : Altimeter construction: C or Assembly code


MtnGoat
Sep 23, 2003, 02:41 AM
Anybody know of any online resources discussing altimeter construction using a pressure sensor and a/d conversion? I'm looking for code source (C or assembly) and discussion of construction, sensitivity, theory, etc.

No, I don't want to buy one, I want to *build* one. I want to tinker, learn, adjust and create. (just to weed out helpful responses for who sells what finished product). ;)

ybanrab
Sep 23, 2003, 07:24 AM
I wanted to do this a while ago and built up quite a collection of useful links. I'll have to fire up an old pc to see if I can get the links back.

As I remember, the main problem seemed to me to be getting an accurate (14 or 16 bit) A/D converter to get the accuracy.

Barny

Gary Warner
Sep 23, 2003, 06:09 PM
I made one using the MPX5100A (buffered 0-5 volt absolute full scale) and PIC16C17 with an on-board 8 bit A/D port. I was able to pad the output to reflect a 5' change (about 1200' full scale) in altitude, It never made it onto an r/c plane. The code was written in Microchip's assembler language. It was not that intense in calculations and was just a data logger to an I2C EEPROM. If I was to use this where a lot of math was needed, I would have used PicBasic Pro or PicC compilers. I don't have any code for this one anymore as the computer it was writen on decided to commit suicide.

MtnGoat
Sep 25, 2003, 02:29 PM
Thanks for the comments, folks.

I'm using a Cygnal C8051F000 with 12 bit A/D's, built in programmable amps, and also 12 bit D/As, so I should be able to pull some scaling tricks on the pressure sensor input using the D/A's as adjustable references (taking into account the LSB fluctuations and stuff, of course). It's a pretty sweet part, a bit spendy as cheap micros go ($20-30), but it's chock full of cool stuff.

I plan on using another one to run/measure/buffer two PC style joysticks mounted on a lawn chair as a pilot seat, and then simulating a buddy box output.... using the micros built in PWM routines and a buddy cable to hijack the JR master box into thinking the chair with joysticks is another JR in buddy setup mode. But first things first, I'm doing the altimeter now.