As mentioned in the post "Requirement Analysis and Conceptual Design", the rocket had to mount a pressure sensor in order to accurately measure the altitude at which the parachute had to be deployed. In fact the board provided by the electronic team of DARE alone had a timer only; using the timer only to deploy the parachute would have meant trusting completely the simulations done on Open Rocket. However those simulations do not take account of the actual density and pressure at the launch site, the wind speed and direction. For this reason a pressure sensor was used to deploy the parachute exactly at the altitude needed.
Hardware
An Arduino Nano and a BMP 180 pressure sensor were purchased; because the pressure sensor was an Adafruit product the library had to be imported in order to read the measurement from the pressure sensor. The wiring is very easy and it can be found in many Adafruit guides. The hardest part was to allocate some space for the wires in the stage structure; to do so, holes in each aluminium bulkhead were made so that the wires could follow the structure. It was essential to isolate the wires and protected them from the the friction arising when screwing and unscrewing the stage structure.
Software
Linearization
Before explaining how the logic of the programme, it is worth explaining that it was necessary to linearize the measurement of the pressure sensor. The accuracy of the pressure sensor was found and a python simulation was made in order to understand how the pressure measured by the sensor would have varied during flight. The noise of the signal had to be limited and the programme had to be able to linearize the measurements. For this reason every time the pressure was measured the value of the pressure used was a weighted average of the previously taken measurement and the following one.
The programme logic
We had to find a way for the Arduino Nano to understand when to trigger the pyro charge; as a matter of fact the algorithm had to have two conditions: the pressure measured had to increase consistently meaning that the rocket was descending; the pressure measured had to be greater than the one at which deployment had to occur.
The programme therefore checked multiple times if the pressure measured was greater than the one previously measured, eventually checking if the last pressure data point was greater than the pressure corresponding to the deployment altitude. This loop was repeated over an over. The height at which the parachute had to be deployed was determined using the OpenRocket simulations.
Role of accuracy and descending speed
The challenging side of writing the programme was determining the interval at which the measurement had to be taken and the the difference between that pressure measurements that would have established that the rocket was descending. Again the accuracy of the sensor had to be considered. The difference between the pressure measurements that would have allowed for the loop to go on had to be greater than the accuracy itself; at the same time we had to check that at the altitude and at the speed the rocket was traveling there was a change in pressure big enough. For this reason Python simulations were done to understand which was the right difference in pressure allowing the loop to go on.
Eventually the system was tested practically before flight using a vacuum pump producing a pressure difference.
Example Code
Hardware
An Arduino Nano and a BMP 180 pressure sensor were purchased; because the pressure sensor was an Adafruit product the library had to be imported in order to read the measurement from the pressure sensor. The wiring is very easy and it can be found in many Adafruit guides. The hardest part was to allocate some space for the wires in the stage structure; to do so, holes in each aluminium bulkhead were made so that the wires could follow the structure. It was essential to isolate the wires and protected them from the the friction arising when screwing and unscrewing the stage structure.
Software
Linearization
Before explaining how the logic of the programme, it is worth explaining that it was necessary to linearize the measurement of the pressure sensor. The accuracy of the pressure sensor was found and a python simulation was made in order to understand how the pressure measured by the sensor would have varied during flight. The noise of the signal had to be limited and the programme had to be able to linearize the measurements. For this reason every time the pressure was measured the value of the pressure used was a weighted average of the previously taken measurement and the following one.
The programme logic
We had to find a way for the Arduino Nano to understand when to trigger the pyro charge; as a matter of fact the algorithm had to have two conditions: the pressure measured had to increase consistently meaning that the rocket was descending; the pressure measured had to be greater than the one at which deployment had to occur.
The programme therefore checked multiple times if the pressure measured was greater than the one previously measured, eventually checking if the last pressure data point was greater than the pressure corresponding to the deployment altitude. This loop was repeated over an over. The height at which the parachute had to be deployed was determined using the OpenRocket simulations.
Role of accuracy and descending speed
The challenging side of writing the programme was determining the interval at which the measurement had to be taken and the the difference between that pressure measurements that would have established that the rocket was descending. Again the accuracy of the sensor had to be considered. The difference between the pressure measurements that would have allowed for the loop to go on had to be greater than the accuracy itself; at the same time we had to check that at the altitude and at the speed the rocket was traveling there was a change in pressure big enough. For this reason Python simulations were done to understand which was the right difference in pressure allowing the loop to go on.
Eventually the system was tested practically before flight using a vacuum pump producing a pressure difference.
Example Code
Commenti
Posta un commento