Measure Altitude

murtaza_hh

New Member
Hi,
i haven't done too much research on this but i knew i would need help. I am trying to create a mini altimeter to measure the altitude of some of my model rockets. The main reason is it would probably be cheaper than buying a ready made one.

I know one way is to get a pressure sensor that outputs a variable voltage, dependent on pressure, and somehow turn this voltage into an adc reading on picaxe, then make the picaxe chip turn the pressure into an altitude using the required equation.

This is currently my main thought on what i am trying to achieve, but i am uncertain on how to continue. I would log the altitude on a IC2 chip, like the 18x datalogger.

Also i wondered if it would be possible ,to output a 12v electrical pulse through the picaxe chip at a pre determined altitude in the program.

Much help would be appreciated.
Thanks
 
Already done, courtesy of my friends A-level project.

http://www.oswald.ndo.co.uk/electronics/index.htm

Pretty sweet, really.
 
I can't remember (it was 4 years ago), but I imagine (with near certainty) that he got an A.

I know it was used with success in several launches.
 
If you would rather not handle analog conditioning and calibration, then a good example of an I2C compatible alternative is the SCP1000 Barometric Pressure IC from VTI Technologies. Pressure and temperature output data is calibrated and compensated internally. This device operates from a 2.4 -3.3V supply and has the potential to provide a more accurate altitude profile than could be derived by integrating a rocket's vertical acceleration data.

www.sparkfun.com supply this sensor pre-mounted on a small pcb with all connections on 0.1 inch solder pads. Unfortunately, the only software examples provided by Spark Fun Electronics is in PIC assembler.

 
X-stamp - be careful of that pressure sensor on Sparkfun. It is SPI only, which means you've got some bit-banging to do usually. The same company makes a different model of that chip that IS i2c compatible, but it's not the one that Sparkfun is using.
 
I had a look at http://www.oswald.ndo.co.uk/electronics/index.htm
and just had a few questions. Where can i obtain a Motorola mpx5100a pressure sensor, and how much does it cost?

Also i didn't really get the part of the circuit that said signal conducting(partly because i couldn't read the part number)
I don't really need that sort of a user interface, and i supose i could do without the ignition 9v supply. I thought that i could use a simpler circuit containing just the 18x, the mpx5100a, a few memory chips. This means i will not really have a user interface, so this whole thing will be controlled through the program. I am assuming i am correct.

Thanks again
 
well, without knowing where you are it is difficult to recommend a vendor of the mpx5100.

also, i thought that most model rocket engines have a small explosive charge go off a few seconds after the propellant is exhausted, so why would you need another charge?
 
Brietech, thanks for spotting that Spark Fun only supply the SPI version of the SCP1000 pressure sensor. Bit banging SPI will probably be the easy bit, compared with producing the SCP100 interface code.
 
The smaller model rocket engines (usually A-F) have a built in ejection charge. Once you go to the larger (G thry P) classes, a separate ejection charge is used. Using an electronic timer, the recovery systame can be deployed at a specific point is the model rocket's flight.

The rules have been expanded in the US to allow for larger then 1 pound (0.5 kg) model rockets. For the latest info, google NAR (National Associaton of Rocketry).

When flying thesee large models, it helps to have a big wallet!

Myc


 
I am planning to use this altimeter on a rocket running 3 D motors simultaneously. I would have needed the 12v pulse to ignite a smoke capsule, to tell me where abouts the rocket would land. This helps me from losing the rocket. Also I am in UK, and i am not really very keen on trying the spark fun bit banging way. I have decided to only try to log the altitude very basically, which should be much easier, so i no longer require to send out a 12v pulse or do anything else, just a simple altitude meter.
Thanks
Thanks
 
As you would need to do some post-flight maths on the pressure and temperature data to yield altitude, it might be simpler to process the signal from a vertical accelerometer to determine altitude. Many commercial ‘flight computers’ even perform the integration onboard to derive altitude and fire ejection charges.

I have flown a 400-gram rocket powered by a cluster of three D engines and found that acceleration only exceeded 10 G for a very brief period during ignition and at chute deployment. Therefore, a 10-20 G accelerometer should provide you with usable data. I have also evaluated radio telemetry and on-board recording to obtain flight data and decided that they both have their advantages and disadvantages. Recording is operationally simpler (no receiving station) and can provide higher sampling rates than narrow band telemetry. However, the telemetry signal can be used for post flight DF location finding.


 
I searched on Google for 'vertical accelerometer' and all i could find were home build projects for measuring 'g' on roller coaster's. I wondered what you meant.

Also anyone know where i could try to purchase the mpx5100a in UK, I also need to know how to get this mpx5100a to work.
Thanks
 
Vertical acceleration is measured by mounting the sensor in the rocket to give a reading of +1 G on the launch pad. Assuming that the rocket travels pretty well straight up (by adding fin induced spin), then integrating acceleration against time can yield speed and altitude. The more often you sample acceleration the more accurate the results. A rate of about 150 Hz should be acceptable in practical, but remember to subtract the residual 1G from all readings. Unless you plan to use the results to fire an ejection charge etc, there is no advantage in trying to do the calculations in real-time. Just record onboard or transmit raw accelerometer data and process it later in Excel (you will not even be able to avoide the maths by using a barometric approach, because there is a non-linear relationship between pressure, temperature and altitude).

For more details about measuring altitude, using either pressure or acceleration, you could do a search for model rocketry flight computers.


 
Yes, but how do you calibrate them beyond 1G? Better to use a standard device from Analog Devices or Freescale.
 
Thanks for your reply's,I was searching on the net and found this:
http://www.rocket-roar.com/rap/alt.html

It is (i'm assuming) what xstamp was recommending i do,apart from the fact that they are using a BSII, so i thought i would use a similar Schematic with external I2C chips to log the data, and an 18x. I wondered if i could get the altimeter that small, i could get it into one of my smaller rockets and run it on just one D? Might not lift though!
Thanks
 
You should have no problem making a smaller version of the BS2 design featured in your link. I have flown an 18X based flight recorder on single D powered model of a WW2 Wasserfall SAM. It fits in the nose cone with room to spare and only weighs about 40grams inclding battery and 3-axis accelerometer.
 
You can get the MPX5100A from Farnell, <A href='http://uk.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=2340124' Target=_Blank>External Web Link</a> for &#163;11 +VAT and post (which I think may be a bit steep as it's supplied by Newark, their US partners).
Derek
 
I really need some help now?
I think i might build the altimeter using an accelerometer(http://www.rocket-roar.com/rap/alt.html), but i just had one big question. I am assuming that once the digital data from a analogue to digital converter, do i just use the command readadc x,x. Also how do i turn this data into altitude.
Thanks
 
You can use READADC or even better, READADC10, which will give you better resolution.

To determine altituide for accelleration data, you need to integrate the accelleration data twice. There are various methods of doing this, although if you want to do it entirely on a PICAXE, you probably want quite a simple one.

As an example, let's assume you're taking a reading every 0.5s. Your first reading shows an upwards accelleration of 2g. Now you assume that accelleration was constant during that 0.5s sampling time (but it obviously wasn't). So you've accellerated for 0.5s at 2g, and using S = (at^2)/2, we get S=2.45m. Repeat for all your other readings.

This will become more accurate the shorter your time period is.

And this might not be the best way of going about it, just the one that sprang to mind...
 
Taking Fowkc's idea further, the sampling period might be 0.05s or even shorter as these flights don't last long! The time interval needs to be accurate so you might need to use interrupts and you will need to makes sure there is enough time to do the maths for each sample. Calibration might be an issue - if the sensor reads a value at rest for 1g, attaching a weight and dropping it and sampling the value will give the number for 0G. You will then have to subtract a constant and multiply by a constant (y=mx+c).

The hardest bit may be the maths as there are lots of floating point values. You might need to multiply numbers by 10 or 100, do the maths in 16 bit words, then divide at the end. There will be a bit of tweaking to make sure values don't overflow. It may be easier to store and export later into Excel.

In some ways an altimeter may be easier to calibrate simply by taking it up a hill of known height.
 
The interesting part of a model rocket flight lasts less than 30 seconds, during which time you are a passive spectator. Even if you transmit data over a telemetry link there is not much you can do in response. Therefore there is no advantage in trying to process the data in real-time. It is much easer to calculate altitude, from an accelerometer or pressure sensor, later using a PC.
 
Yes, just to qualify/clarify my points, you'll need a much shorter sampling time than 0.5s, and all your altitude calculations (whether they're done on the PICAXE or on a computer) should be done after the acelleration data has been collected.

If you can get one of those modules that can write byte/word data to an SD card, that would be ideal. You wouldn't have to spend time sending data to the PC from the PICAXE, you can do it all through an SD card reader, and use Excel to work out the altitude.
 
The SD card solution could be relatively expensive and unnecessarily complex. I use a single Ramtron International FM24C64-P (Farnell part # 344-5215) FRAM chip. This 8-pin device has an I2C interface and stores 8kbytes of data. Running the 18X at 8Mhz and the I2C bus at 800Khz allows data to be written continuously to memory at over 1K bytes per second. I have found that an 8-bit sample rate of 75Hz per channel provides a good compromise between accuracy and recording duration (data from a D-powered flight can be recorded from launch to touchdown). Also, when you consider the cost and preparation time for each launch, the few minutes that it takes to download the data to a PC serial RS-232 port is not really a big problem.
 
Fair enough, I wasn't sure how much the SD card modules were, or how exactly they were used.

xstamp, where do you launch from? Are you in the UK?
 
I am based in the UK and was a member of www.ears.org.uk. However, they only meet once a month and the weather can often prohibit activity. I therefore decided not to sign up again this year, even though they are a really helpful bunch.

 
Wow, I used to go to EARS as well. Small world.

Hopefully I'm getting back into the hobby soon, with Midland Rocketry.

Might even build myself an altimeter...
 
Fowkc, Do you have a link to Midland Rocketry? How often do they meet and where? I'm in the Milton Keynes area and may be able to pay them a visit some time.
 
http://www.midlandrocketry.org.uk/

Meet every month (as far as I'm aware), near Tamworth.

For some reason they don't operate as a &quot;public&quot; club as such. Their website has details about how you join. I'm going for the first time on Sunday.

I'm living in Nottingham, but come from Bedford, so hopefully I can do both EARS and Midland stuff depending on where I am (and my financial status).
 
Back
Top