This project allows me to determine a rockets height. I made it because it was hard to find a cost effective or in stock rocket altimeter. 80% of the code was not created by me. I just edited it to suit my needs. I added code to display feet and meters based on the sensors min and max readings. I also added blinking LEDs and a buzzer that will sound after 3 minutes (this setting is adjustable).
My goal is to continue to reduce it's size and weight. It currently weights in at approx. 24g. This includes the 100mAh battery which will power the device for over 4 hours. You won't need this capacity as the device is meant to be reset each flight. This can be done by pressing the reset button located on the Arduino Nano.
The BMP280 continues to drift to the positive as time progresses. This should not affect the overall reading as the altitude is measured by subtracting the MIN reading from the MAX reading. Plus the BMP280 specs specify a +-3' deviation.
It would be nice to get some feedback on the code. Specifically the BMP280s code and settings. I would like to minimize the reading fluctuations. Right now it isn't stable enough and I am not sure if it is software/hardware or both.
The current cost is under $25 bucks!
🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
When launching Estes or custom model rockets, visual estimation is highly inaccurate. The Arduino Rocket Altimeter is a miniature payload that uses atmospheric pressure to calculate its exact peak altitude and saves it to a memory chip.
The Barometric Formula
The air gets thinner the higher you go. The BMP280 or BME280 sensor can detect pressure changes down to a few pascals (equivalent to moving the sensor up by just 10 centimeters!).
- Ground Zero: Before launch, the Arduino reads the ground pressure and sets it as
Altitude = 0. - The Climb: During launch, pressure drops. The Arduino uses the
Adafruit_BMP280library to convert the pressure drop into exactly how many meters the rocket has climbed. - The Apogee: The code constantly compares the current altitude against the
max_altitudevariable. Ifcurrent > max, it updates the value.
Storing the Data
Because space is tight in a rocket tube, adding an SD card shield might be too heavy. Instead, this project uses the Arduino's internal EEPROM memory. Once the rocket lands, a piezo buzzer "beeps" the maximum altitude (e.g., 2 beeps, pause, 5 beeps = 250 meters), or you plug it into a laptop via USB to read the EEPROM memory directly!
Hardware Requirements
- Arduino Pro Mini 3.3V / ATtiny85: Size and weight are critical.
- BMP280 Barometric Pressure Sensor.
- Small LiPo Battery (e.g., 150mAh).