Two Stage Electronic Model Rocket
by Tom Projects in Circuits > Electronics
5005 Views, 37 Favorites, 0 Comments
Two Stage Electronic Model Rocket
Having recently finished my GCSE's, and with a passion for engineering, design and electronics, I set about thinking up a project that could keep me busy over the empty months ahead. I settled on trying to make a rocket, as I felt this would stretch my manufacturing and design abilities to their limits, in a balance of weight and strength. However, this has been done my many people and in many formats, so I decided to spice things up a bit, and design a rocket that was electronically controlled. In order to provide a suitable need for this system, I also decided that it would have to do something practical that a non-electronic rocket couldn't do better. For this reason, I chose to make the rocket two-stage, and to have my system ignite the second motor at a programmable point in the air.
Supplies
For my prototype electronic system, I used:
- Bread Boards
- Newly-released Raspberry Pi Pico with headers
- An Adafruit Lis3DH Accelerometer
- Jumper wires
- Two N-channel logic mosfets
- Two 10k ohm resistors
For my final system design, I added:
- A 5v Step-Up/Step-Down Voltage Regulator
- Perfboard
- Four Diodes (1w, Zener)
- A D-battery
For the rest of the construction:
- 2020 aluminium extrusion
- 2020 aluminium inserts
- M3 bolts, nuts, and washers
- 2m squared of ripstop nylon
- Nylon cord
- 40 mm outside diameter carboard tube (I liberated mine from a wrapping paper roll!)
- Two D-12-3 engines, with plugs and igniters
- 6 spare igniters for testing
- A 3d-printer, with 500g of pla filament
The Electronics
I started with the bit I felt most confident on; the electronics. First of all, I had to work out the requirements my design had to fulfil.
It had to:
- Take an input from an external switch, and read this to determine launch.
- Be able to independently ignite two rocket motors
- Deploy a parachute at apoapsis
I also wanted it to, but didn't need it to, know how fast it accelerated, and over what duration, so I could calculate it's top speed.
I used a prototyping board called a bread board to begin testing my components and learning how they worked before making a final design.
In order to facilitate control of my rocket, I realised I needed a microcontroller. These are essentially small, fixed purpose computers which can be programmed by a larger one, and run a fixed set of instructions when power is applied. Since this was around the times of the launch of a new microcontroller; the Raspberry Pi Pico, I settled on this, as it was high powered, speedy and dirt-cheap. I got mine for only 4 pounds.
I soldered headers to it and placed it on a breadboard, along with my other components that I had settled o to fulfil the other tasks. I chose a Lis3DH accelerometer from Adafruit to record acceleration in 3 axes, and two N-channel mosfets which would act as switches for my higher-voltage source, used for igniting the motors.
Programming My Microcontroller!
This was written in circuit python, as all Adafruit libraries, including the one for my accelerometer, only work in circuit python.
Since formatting errors occur if I copy and paste this code, I have linked it here;
https://github.com/Toms-Project/Two-stage-electron...
For those who are uninterested, the Code essentially turns on the rocket's led and begins flashing it, to let the user know the rocket is 'armed'
It then senses for a completed circuit over a pin, which is connected to a 3.3v load once the launch switch is flipped
Once it is flipped, it fires the first stage motor, and begins logging acceleration data from the accelerometer.
After 4.5 seconds; the amount of time for the first stage motor to burn out; the second stage motor is ignited.
If an acceleration input if measured to be 0 (the rocket is no longer accelerating), then the servo motor will be rotated, freeing the parachute.
However, after 8 seconds, a redundancy will kick in, firing the servo anyway, since the rocket should have reached apogee (top of flight) at this point anyway!
Downloads
The Launch Rail!
As my rocket's only means of stabilisation is the large fins at it's base, It requires some initial airflow over the wings before it becomes stable. For this reason, It will need a launch rail that it is attached to for the first few moments of launch, in order that it can get that initial airflow in a controlled manner, rather than veering off to the side before it stabilises. My design of launch rail has a piece of 1m long aluminium extrusion, which has slotted channels in it, allowing for launch nuts on the rocket to fit into these channels and slide smoothly along. This extrusion is held in place with a wooden launch tower, cut out using a jigsaw and coping saw. The base has three holes in it, allowing for this base plate to be securely fastened to the ground with pegs.
Rocket Design
I needed a motor class that was both cheap enough to make my new hobby practical, easy enough to obtain, to prevent annoying customs charges if it had to be imported from abroad, and had enough power to lift my slightly heavier than average rocket off the pad, so I chose a d12-3 motor. This can breifly lift masses of 400g, but is designed for loads of 200g. I decided this was enough strength. They were also top of the list on amazon. I then programmed the dimensions of my flight computer, the motor, and my available tubing into a free tool called open-rocket. Here, I was able to create a virtual model of my rocket to work from, and see in real time how alterations to the weight and proportions of my rocket would influence it's flight. If you want to download this program and open the file 'model rocketv2' from the attached project link, you can see an early sketch. This rocket would have broken in two below the payload bay to release the parachute, whereas the real one will break at the nose cone, actuated by a servo.
Application to see an early rocket iteration:
Link to 'model rocket v2' download, to then open in app:
Using This Model to Make Some Basic Components
I then used this model to make the fuselage and fins for my rocket, along with an unadvanced stage connector (a smaller cylinder that fits between fuselage sections)
I started with some 2.4mm wide balsa wood to make the fins, which was light and strong, but also floppy and prone to splitting along it's grain. For this reason, I made sure that the grain followed the direction of the leading edge of the fin, to ensure that it did not snap when subjected to the high airflow. However, I was still unconvinced about their re-usability, so for this reason, I used regular cartridge paper and PVA to coat these fins with a 'skin'. This creates a composite fin that is water-resistant and far stronger. An article better describing this is linked below:
https://www.apogeerockets.com/education/downloads/...
Next, I measured out the length of tube I would use as an airframe, and wrapped paper in a cylinder around the cut-line. This ensured that the cuts would be perfectly horizontal. I then used a sharp craft knife to cut this line.
Finally, I made up some far shorter length of tube as connectors. These I cut a slit into vertically and removed material, reconnecting the two side edges of the cut, so a cylinder with a smaller diameter was produced. I removed a little more material each time until the connector fitted snugly between stages, holding them just tightly enough together. However, In practise, I found this method hard to repeat, and my two connectors were fiddly to get right. The end result was often either too tight or bulged in places, which would have resulted in unpredictable staging. This issue was not a big problem for ground tests, but I would need to find a better solution for staging in flight. I then assembled all of these components into the shell of my rocket.
Design My Final Circuit Board.
I now needed to bring my circuit from the prototyping board onto something light weight and integrate it into the rocket. For this, rather than simply having all of my components connected by wires and loosely soldered together, I chose to solder them to a perforated board, which held the components strongly together, and made a permanent electrical connection. This worked really well, and I was able to make a compact and relatively light flight computer. I had a few major problems which needed resolving before I could continue however. Firstly, I needed to add some quick connect pins so that the wiring loom inside the rocket could be disconnected when I wanted to remove the main module. I did this using the quick connect jumper wires I had used during prototyping, and I stripped and soldered the heads of one end of the connection to the board and the other end remained a wire. Secondly, I had been using the power from my Pico's USB port to run through my high-voltage circuitry, as a test voltage, and this was not enough power to ignite the motors. For this reason, I bought a d-cell battery and wired it up to my circuit board. Because I now had two grounds, the one on the battery and the one on my Pico, I had to connect them together to make a common ground. This made keeping track of current flow quite tricky, so being paranoid, I replaced many of the wires with diodes, to ensure current was flowing the right way. Next, I had been powering my Pico externally with a battery bank. This would obviously be too heavy for my final design, so I used the d-cell battery as the power supply, and regulated it down to the 5 volts by Pico could accept with voltage regulator. this meant that both the high voltage circuitry and the Pico could run off the same power supply, saving weight, and space in the avionics bay.
Perform a Full Ignition Test
Using the spare igniters I had bought online, (these are essentially just thin pieces of wire that glow red-hot when a current is passed through them), I ran a full ignition test, including detection of me pressing the launch button and the movement of the servo used to deploy the parachute. This went fairly well, and I gathered a lot of usable data. Firstly, I was able to see that there is a 1.5 second lag between me pressing the launch button, and the igniters reaching the correct temperature. Secondly, I found out that the back plates of the two mosfets were touching. It turns out that these are connected to the gate pin, which controls the activation of the mosfet, and it explains why both of the igniters went off simultaneously. The attached video shows the ignition, but all there really is to see is the wisp of smoke when the igniters burn out.
Design + Fabricate Other Components
Next, I used a piece of software called fusion 360 to design 3d files for my other rocket components, such as the nose cone, an improved separator of constant diameter, that sticks just enough, and a new motor mount. I then realised that I was unable to produce these lovely new parts accurately enough with the kit in my possession, so I invested in an ender 3 3d printer. My other reason for doing this, was because I had no clear way of making a nose cone that perfectly fitted the optimised design on my open rocket simulation. My fusion 360 schematics and animations are available through the same GitHub link, repeated below, along with the directly 3d-printable g-code files.
https://github.com/Toms-Project/Two-stage-electron...
Once I have 3d-printed these parts, and begun assembly of the rocket further, I will update this Instructable!
We should be only a few weeks from launch now!
Parachute
I had time to spare until the filament and 3d printer arrived, so I used this to make a few other parts.
First, I wanted to make a paarchute for the upper stage - (the lower stage will only have a small one). Having guessed the weight of my completed rocket to be around 300g, I then used an online formula to calculate the rough recommended size of my parachute. The calculator even gives you options for the descent rate! Having very limited weight and space available for the parachute, and since it would only be used for the upper stage - around 200g, I decided to go with the option for a descent rate of 6m per second. This was as fast as I could go safely downwards. This resulted in a circular parachute of 47cm diameter. I turned the surface area of this into the surface area of an equivalent hexagonal parachute, because I thought that would be a cooler shape, and made the parachute you see above. I even used a sewing machine to hem the edges to make it more durable! The parachute is anchored to both the upper stage and avionics ‘module.’ When the ejection charge of the motor fires (a small amount of gunpowder) the two stages are forced apart “, and the parachute in between them is released, bringing both back safely!
Determining Tolerances
3d printers, while very accurate, do struggle in a few areas. One of these is creating precise hole diameters. Therefore, I made a few test prints to see what size I needed to specify each of my components in CAD, so that when they were printed, the parts would fit well into and around my three pieces of existing hardware; the body tubes, the motors, and the m3 bolts that will hold it all together. After a few test prints, and some trial and error, I found that an external diameter of 39mm would fit well into the body tubes, an internal diameter of 3.4mm would fit snugly around the bolts, and an internal diameter of 25mm fits well around the motors
Avionics Bay
In order to make my cad Design more accurate, I needed to finish up all of my electronics. Firstly, I made a bracket at the top of the bay to securely hold the servo and 9v battery in place. This was up made of some spare balsa from the fins. Next, I used a hot glue gun to mount the servo to it. This leaves a gap so that the servo's arm is still accessible. When the nose cone is on, a rubber band will hold it in place, and this will be wrapped around the arm, so that when it moves, the nose cone will fall off, exposing the parachute!
The Motor Mount
In order to gauge how heavy the final rocket would be, and therefore how heavy I could make everything else, I decided to make the heaviest part first - the rocket's motor mounts. I started with a vastly over-engineered version. I was (and still am) a novice at 3d printing, and had no idea how strong these parts can be. My first design was just a solid (65% infill) cylinder, with a hole in the middle for the motor. This was far too heavy. I therefore re-designed. Realising I only needed two strong sections to mount the holder, I designed the new mount with two rings, top and bottom, and a tube between them. This holds the motor as sturdily, while removing a lot of weight. I also turned the infill (the percentage of volume filled with plastic) from 65% down to 30%.
I incorporated a connection to the bolts which attach the rockets to the launch rail. Previously these were wobbly, as the relied on the strength of the fuselage. They are now much stronger as they are anchored to something so integral to the structure.
I used m3 bolts to attach the mounts to the rocket. This way if they are damaged or need modification, they can be removed.
Wiring
Next, I needed to make a wiring loom that could supply power to each stage's igniters and also detach when the stages separate. For this, I repurposed some prototyping jumper cables with quick connect endings. This way, the igniters can be inserted into the female end, and each stage can be joined with male and female prototyping jumper-cable connectors that will detach when the next stage fires.
Final Assembly
Finally, I put all of the pieces together, and saw what the finished rocket looked like for the first time! I then weighed my rocket for the first time, and found it was 330 grams fully laden - 85 of that was the motors! While the recommended max lift-off weight was 396 grams, I still felt this was a tad overweight, so I re-designed a few components. I re-designed the battery holder- now the 9v battery was inside the nosecone, rather than having it's own holder. The avionics bay was shortened, alongside the lower stage connector, and lower stage airframe. This lost 25g, and I felt more confident about the rocket's take-off weight.
Here is the datasheet for my motors:
Downloads
Launch Lug
After assembling my rocket, and testing how it fit on the stand, I found my round 'launch buttons,' which fit fairly well, allowed a fair amount of 'wiggle' up and down. Since my rocket did have a small amount of flex to it, I was worried that the buttons would wiggle into opposing orientations, and jam inside the rail, causing it to stick, and not take off. I needed rail mounts which wouldn't wobble vertically, and so I designed some flat, long, thin ones.
Since I didn't know what the exact dimensions were of the inside of my 2020 extrusion, I did have to go through a bit of trial and error.
The Launch - and a Few *little* Niggles
I waited for a dry, clear day, and took my rocket to a nearby large field. In the above video you can essentially see what occurred, but I will break it down here too.
The first stage did nothing. After inspection, I found that this was due to a wiring error. No current got to the igniter, and therefore the first stage did not fire.
The second stage ignited on time - 4.5 seconds after the launch switch was pressed, despite having not left the pad. Because of my updated launch lug design, this stage could take off on it's own, despite only having one lug. It separated perfectly from the lower stage, showing that my separator had the right dimensions and tightness.
Annoyingly however, there was a manufacturing error with my motor; the ejection charge simply didn't fire! I examined the upper stage motor after the flight, and found that the clay plug was still in the motor - this should have been forced out by the ejection charge firing.
Because the parachute was therefore not ejected, the free-flying upper stage, started free-falling, and hit the ground with such intensity that the carboard body tube disintegrated, and the nose cone was a full 5 centimetres underground!
Luckily, despite all of the other electronics on my flight computer breaking, The microcontroller itself survived meaning I could see the flight-data! Unfortunately, this was not my lucky day, and the data only ran to 4.4 seconds - 0.1 seconds before It was due to ignite the second stage. My only theory is that the ignition of the second stage must have somehow broken the accelerometer, causing no-more data to be recorded. I also couldn't make the accelerometer work even after recovering it, but this is hardly surprising, given that it did pile into the ground.
Since the first stage did not fire, and is still essentially functional, I will probably make another, smaller rocket, using this first stage. I will post the video of this smaller rocket launching.
Downloads
Lessons Learnt!
I have decided that if I were to design another rocket in the future I should embrace these lessons:
1 - Make the wiring easier to assemble when on the field. I imagine that the hurry to essentially wire up the whole rocket while sitting next to the launch pad means I inevitably made an error and in this case, I didn't hook up the lower stage correctly. A potential solution would be to incorporate an on-off switch. The reason for my needing to assemble the rocket from scratch was because the connection to the 9v battery was buried in the nose-cone, necessitating the removal of the circuit board in order to hook it up. By having an on-off switch, I could wire up the rocket at home, and the simply turn it on as the right time.
2 - Design a better parachute ejection system. Some more advanced model rockets use small black powder charges in the nose-cone. These can be activated by the on-board computer, and therefore you can have more control over the deployment of the parachute
3 - I am considering simply adding more engines (known as a cluster rocket) and just making a far more powerful single stage. This would dramatically reduce complexity, and remove the need for having high-voltage circuitry to ignite the second stage, reducing weight and making the electronics less costly. (my little rocket piling into the ground cost me almost 40 pounds in electronics alone.) This would also reduce the inherent risk of having higher voltages near the lower-voltage logic of the microcontroller (as shown by the microcontroller turning off when trying to ignite the second stage)