Arduino Rocket Ejection at Certain Altitude

Ok, I am using a arduino pro mini and a perfectflite ALT15K. I am trying to interface the altimeter to the arduino so i can get the arduino to turn a servo at 750 feet. the servo will trigger the rocket's spring parachute ejection.

I figured that I would need the altimeter to tell the arduino that when turned on, it is at 0 feet, and as it goes up, to send continous feedback on the altitude. Then at 750 feet, send the signal to turn the servo.

I am a newbie and im 16 years old, and I can use all the help i can get.

Thanks

That approach seems reasonable. Is there something specific you're having trouble with?

I dont know how to interface the alitmeter. Plus getting the arduino to do the math from the pressure from the altimeter to acutal altitiude in feet

My personal solution would be to use a BMP085 barometric pressure sensor. When you power up the Arduino it takes the current pressure as zero. Atmospheric pressure decreases by 6.0869 millibar for every 50 metres in altitude, so when the zero pressure reading subtract the current pressure reading > 28 millibar then actuate the servo.

1 Like

The specs for this thing are pretty dicey. Nothing about data formats that I can see. It says 8 data, no parity, 1 stop, binary, 9600. Well, that's a start. But when you look at the data transfer kit, it says,

This data transfer kit incorporates level shifting and USB conversion circuitry to make the logic level signals from the altimeter compatible with standard USB ports.

Well, that might be taken to mean either 5V or 3.3V level logic, maybe TTL serial? But 8bit, 1 stop, no parity and a baud rate implies RS-232, at least to me. I think you need to dig up some full specs on the signals produced at the SIP header on the board, i.e. where the USB interface plugs into it.

I found the user's manual, and it says,

The data are transferred in a proprietary binary format with block acknowledge, so a terminal emulator program can NOT be used. Suitable MacOS and Windows compatible software is available on the PerfectFlite web site for free download. The altimeter’s data connector provides and expects TTL level signals as described in the diagram below, and the mating data transfer adapter converts these to standard RS-232 serial levels.

Is there there some other way to get data from the board? Were you thinking of hacking the board to read pressure from the chip directly? Do you have this thing in hand? If so, what chips are on it?

If I were to use a BMP085 barometric pressure sensor, then what would be a example of the code to lets say read the pressure at startup, set that at zero and actuate the parachute at 50meters. If i can get that much info, believe i could pull it off

How about using an accelerometer because that will tell you when the rocket is in free fall so you can trigger your spring parachute ejection when it reaches it's maximum height. That way you don't trigger it on the way up and it is safer if the rocket does not reach it's expected height.

A microcontroller based solution doesn't strike me as the most obvious approach. Isn't there a simpler conventional solution for this? I'd have expected to find a sprung trigger that unlatches in free fall, or a fuse that is ignited by the last of the propellant, or something like that. Surely rocketeers aren't all resorting to complicated electronic solutions?

The thing is I want it to eject at 750 feet, not at freefall, even if the rocket is still shooting up i want it to blow at 750 feet without using pyrotechnic charges, so im using a servo to unlatch a spring based plunger

Oh, OK.

A pressure based altimeter would give you the resolution, I'd have thought, but in a vehicle moving at high speed you'll struggle to get a reading that is not affected by dynamic pressure. An accelerometer-based altimeter might be easier to get working in that situation. I suppose a 750' long piece of string is out of the question? :stuck_out_tongue:

I mean its going mach .31, not too fast and i dont think i will have a problem

If I were to use a BMP085 barometric pressure sensor, then what would be a example of the code to lets say read the pressure at startup, set that at zero and actuate the parachute at 50meters. If i can get that much info, believe i could pull it off

the perfectflite has a telemetry output. i dont have the datasheet right now of the model that you are using but i remember that the minialt has an output. ive never read the output format but i think it might be a serial comunication showning the height, based on that when you download the data you get the height and the time.

regards

LividKiwi:
I mean its going mach .31, not too fast and i dont think i will have a problem

If I were to use a BMP085 barometric pressure sensor, then what would be a example of the code to lets say read the pressure at startup, set that at zero and actuate the parachute at 50meters. If i can get that much info, believe i could pull it off

That depends on which library you decide to use. Basically, read the sensor in setup() to get your zero reading, then continually read it in loop(), compare / subtract one from the other and when altitude is reached actuate the servo.

There's a fair amount of processing done in an altimeter, not just reading an ADC and applying a conversion formula. I think your idea is pretty good, if it works.

The Alt15k doesn't document the interface. If it's like the MAWD, it must be put into telemetry mode before you can expect to see any data.

If it does give you data, it's most likely converted to altitude already.

The interface is 5V TTL RS232 that you should be able to connect directly to the arduino RX line. You can probably get by without connecting the arduino's TX line, and I'd recommend that as a flight configuration so you avoid any possibility of causing altimeter problems.

If at all possible, I'd also try to design the rocket so the motor's ejection charge can still deploy the chute, as a safety redundancy.

Good luck with TARC.

-j

kg4wsv:
The interface is 5V TTL RS232 that you should be able to connect directly to the arduino RX line. You can probably get by without connecting the arduino's TX line

Except for the part about the proprietary binary format with block acknowledge. Might be that could be hacked with a USB sniffer.

LividKiwi:
I mean its going mach .31, not too fast and i dont think i will have a problem

Where abouts on the vehicle do you propose to install it that will not be affected by dynamic pressure effects? The pressure changes you're going to be looking for will be tiny compared to the dynamic pressure at those speeds.

Except for the part about the proprietary binary format with block acknowledge.

Who said anything about USB? Re-read my post, then RTFM on the MAWD manual, which has a telemetry mode. I said "If it's like the MAWD", i.e. if it also has a telemetry mode.

The USB part of the Alt15k interface is a separate board with an FTDI chip. The actual interface on the altimeter is 5V TTL RS232. No USB sniffing required. If it comes down to reverse engineering the perfectflite protocol, rolling your own altimeter could be easier.

If the Alt15k doesn't have a telemetry mode (and there is no indication that it does), you may be better off getting a Pnut altimeter (the manual says it has a telemetry mode).

-j

Where abouts on the vehicle do you propose to install it that will not be affected by dynamic pressure effects? The pressure changes you're going to be looking for will be tiny compared to the dynamic pressure at those speeds.

Static ports are perpendicular to the direction of flight, i.e. on the side of the rocket.

-j

OK, I just dug out my Alt15k, and it does not respond to MAWD telemetry commands. Doesn't look like you will be able to tap the Alt15k for altitude data.

Even if you could access the binary data, that's done post-flight, not in flight, so you're still out of luck.

I'd say either check out the Pnut (I don't have one of those to look at) or think about rolling your own altimeter.

One problem with the Pnut is that it requires 3.3V signals, and a standard arduino is 5V. You'll have to take care of that problem (maybe by using a 3.3V arduino pro mini from sparkfun?)

If you decide to make your own altimeter, the older perfectflites (alt15k, MAWD) use the Freescale MPXH6115 pressure sensor. Freescale offers free samples (use your school .edu email if you have one, or ask your teacher/mentor to order samples if you don't).

I have some code here that may contain useful info (it also contains a bunch of irrelevant stuff). It reads pressure from an MPXH6115 and converts to altitude in feet. This is code that flies on the tracker in my 4" Patriot, and the altitude reported by this code is noisy and off by quite a bit as compared to the perfectflite and R-DAS units.

-j

kg4wsv:
Static ports are perpendicular to the direction of flight, i.e. on the side of the rocket.

There will be some suction there - will it be significant?

Does the rocket ever generate any angle of attack?