Passa ai contenuti principali

Pressure Sensor and Python Simulations

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






Commenti

Post popolari in questo blog

Final Product: A full Carbon Rocket

The Full Carbon Rocket This post aims at showing the final configuration of the rocket giving insight in the details of many subsystems previously not explained. Lower section Arm switch, on off switch, break-wire and LED The electronics part was contained in the upper section. However it had to be linked to the parachute bay in order to trigger the pyro charge.   Another important detail was the placement of the switches so that they could be turned on and off from the outside of the rocket. A bulkhead was placed on top of the parachute bay; this had a hole to allow the connection with the pyro charge and it had a bolt on which the stage structure could be screwed on. In addition a metal ring was glued on top of the bulkhead to allow for the switches to be placed on; in this manner a small chamber between the middle and the upper section was created to host the cabling and the switches. Stage Structure, Electronics and wiring   One of the most challengin...

Requirement Analysis and Conceptual Design

The first stage of the design phase was analysing the requirements and understanding how they would have affected the rocket subsystems. The team had to come up with a preliminary design at the end of the first three weeks and present it to the senior members of the society. In this way the design could be reviewed and a check of the progress of the subsystems could be carried out. The first step was sketching and coming up with ideas for the rocket systems; as a matter of fact the WBPP started dividing the rocket in three sections:  Upper section: this section would have contained the payload, and the electronics Middle section: this section was dedicated to the parachute; from the beginning the team opted for an axial recovery system that would split the rocket in two parts.  Lower section: the engine which was already provided and it was not object of the design nor investigation.  Exploration An exploration design process started; considerations and design...

Requirements Generation

Following the system engineering design, the first step to start with the preliminary design of the rocket was understanding the requirements that the mission involved. Generating a requirement list was essential in order to give a more accurate shape to the product we had to obtain. An analysis of the subsystems of the rocket was also made and requirement concerning different subsystems were generated. Requirements List: The maximum flight-time has to be 90 s. This is established by NAVRO which is the association in the Netherlands for amatory rockets. In fact the rocket had to land inside the military area at 't Hard; considering the worse case scenario in terms of wind speed and direction, a maximum time flight was determined considering that the rocket could not go out of the military area in it surely didn't have to fly towards the observatory area. The air space was closed over the military area for the period of duration of the launches. However the maximum ...