Close
0%
0%

Model rocket with active stabilization

By means of motor vectoring

Public Chat
Similar projects worth following
Model rocket with active stabilization by means of motor vectoring (no guiding).

General Features

  • Closed loop system with gyroscopes.
  • Complete system simulation in MATLAB for PID tunning.
  • Custom made PCB for control.
  • Remote emergency deployment of parachute.
  • Without fins.
  • Simple parachute deployment with commercial electronics.
  • Fiberglass body tube with wood reinforcements.
  • Two DOF motor vector system.
  • 3D printed gimbal with hobby servos.
  • Finite Element validated gimbal structure design

Active Stabilization

  • Closed loop control system.
  • Set point, zero angular velocity in rocket transverse axes (behaviour equivalent to fins).

Control PCB Features

  • Based on ATMEGA328P
  • uC running an 5V and 16 MHz
  • 3.3V for some components
  • 6.5V for servos by means of an external DC-DC buck
  • Reading servos actual position by means of two external MCP3201 12bit ADC's via SPI
  • Flight data storage in flash memory Winbond W25Q64
  • Inertial mesurement unit GY-91 with BMP280 and MU9050
  • PWM control of two servos.

Status

  • Feasibility study by means of simulation (COMPLETED)
  • Design of the gimbal (COMPLETED)
    • CAD (COMPLETED)
    • Finite Element Analysis (COMPLETED)
    • Static testing (COMPLETED)
  • Control PCB (IN PROGRESS)
    • Schematic (COMPLETED)
    • PCB design (COMPLETED)
    • Manufacturing (COMPLETED)
    • Programming the control PCB (ALMOST COMPLETED)
  • Design of the rocket (COMPLETED)
  • Fabrication (ALMOST COMPLETED)
    • Gimbal (COMPLETED)
    • Fiberglass body tubes and ogive (COMPLETED)
    • Assembly (ALMOST COMPLETED)

Gimbal_Equations.pdf

Equations for converting lateral thrust forces to servo rotation angles

Adobe Portable Document Format - 120.86 kB - 12/30/2018 at 09:01

Preview
Download

Project.pdf

Control PCB Schematics

Adobe Portable Document Format - 55.83 kB - 12/29/2018 at 12:07

Preview
Download

  • 1 × MPU9250 Inertial Measurement Unit
  • 1 × BMP280 Air pressure sensor / barometer
  • 1 × W25Q64 Memory ICs / FLASH Memoryf
  • 1 × ATMEGA328P-PU Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 2 × AMS-1117 Power Management ICs / Linear Voltage Regulators and LDOs

View all 9 components

  • Final touches

    Domus Amoris08/31/2019 at 11:12 0 comments

    Only some details are pendig in order to be able to launch next week. In the las few days,

    • The rocket was painted
    • The old servo cables were replaced with a more robust 4 wire cable.
    • The old PCB connectors for the servos were replace twith more robust connectors.
    • The switch cover that ensures that the parachute chord does not entangle with the switch was glued.

    Still pending,

    • Install arming connection for igniter
    • Glue the bearing to the gimbal
    • Thoroughly test the complete system



  • Inertia Measurement + Image Processing with MATLAB

    Domus Amoris08/16/2019 at 19:28 0 comments

    At the moment, all the hardware is ready, only some software adjustments are necessary. One important remaining task is tuning the PID. For this purpose, I have to update the simulation parameters of the system with the latest values, and rerun the calibration process.

    Today I set up a test bench in order to measure the rocket inertia, using the bifilar method, which basically consists on hanging the rocket with two chords, both at the same known distance of the center of gravity, and measure the period of the rotatory oscillation. You can find details at :https://conservancy.umn.edu/bitstream/handle/11299/182514/Habeck_UROP%20Final%20Report.pdf?sequence=3

    You can see the set up below. In order to measure the period of the oscillation, after considering different alternatives, I choose to record the tip of the rocket with my mobile phone. I draw a black dot in a piece of masking tape and the video was processed afterwards with MATLAB in order to obtain the change of position over time. I can provide further details if anyone is interested. You can see the animation below also.

    I tested to configurations, with a length of 1.15m and 0.80 m, both gave the exact same inertia with a negligible error. However, the dimensions for the computation and the position of the CoG have a certain degree of uncertainty due to the poor tools I used to measure them. Nevertheless, I consider the results to be accurate enough for my purpose. There is also a low frequency mode which I do not clearly identify but should not affect the measurements.


    This method was proved to be very suitable, cheap, easy to set up, there are not any sensor cables affecting the measures (compared for example to using an accelerometer), and does not rely on human ability (compared to using a manual timer).

  • Electronics bay almost ready

    Domus Amoris08/07/2019 at 21:36 0 comments


    The electronics bay is almost ready. Still pending:
    - Replace the cables powering the servos DC-DC with a thinner cable.
    - Install the commercial altimeter for the parachute release.

    Pending for the rest of the project:

    - Design and install the support for the rail guides.
    - Install motor mounting tube in the gimbal.
    - Glue the bearing to the gimbal
    - Design and install parachute attachment to the upper section.
    - Design and install some kind of protection for the electronic bay switches to avoid any problem with the parachute chord.
    - Install cabling tubes from the electronics bay to the gimbal. - Paint the rocket.
    - Measure the inertia of the complete rocket with the bifiliar technique.
    - Compute the aerodynamic coefficients.
    - Introduce them in the MATLAB and calibrate the controller.


    Finally, I have date for the launch, 7/8 September 2019, in the Spain Rocketry Meeting.





  • Working again on the project!

    Domus Amoris07/13/2019 at 18:21 0 comments

    After a long break caused by may personal reasons, I have continued with the project.

    I assembled some parts of the motor section of the structure. The fixed support for the vector sytem was glued with epoxy, as well as the coupler for the separation. This required two iterations because of the misalignment of the cylinders. I have also wired the two servos to the PCB and tested to work as expected.

  • PCB is working!

    Domus Amoris01/13/2019 at 18:10 0 comments

    All components tested now including, ADC, MPU9250 gyros and accelerometer, voltage regulators, servo control, buttons and flash memory. I finally soldered the flash memory in the incorrect footprint by bending the legs, it took some time but it works.

    Now, it's coding time!

  • Testing the PCB...

    Domus Amoris01/09/2019 at 22:56 6 comments

    The board is working, voltages regulators work, led is ok, .. but unfortunately the footprint of the SPI Flash was incorrect ... I have to decide if I re-do the PCB or make some kind of workaround :(

  • PCB Received!

    Domus Amoris01/07/2019 at 20:25 0 comments

    I have just received the first iteration (and I hope the last one) of the control board for the rocket. Ordered at https://www.seeedstudio.io/.

  • Gimbal static load test

    Domus Amoris01/05/2019 at 21:22 0 comments

    As I commented with @Mike Szczys , today I performed the static tests in order to ensure the structural integrity of the gimbal. The test was a success with some observations to be considered.

    • The test bench was quite improvised and low cost but worked nicely for the purpose of the test.
    • The test reached 12.2 kg without any strange noise.
    • The servos worked smoothly after the test.
    • The plastic structure recovered totally the initial shape and there is no sign of permanent deformation.
    • The inner rings had no visible deformation.
    • However, the external structure deformed significantly, but the supporting is no representative of the real conditions. I will perform finite element simulation in order to study the deformation of the body tube and make sure that deformations are reasonable and there is no risk of local buckling. Local reinforcements will be introduced to the zone if shown to be necessary.
    • Also, the bearing of the outer ring slightly moved out of the hole. I will glue it with epoxi to make sure it stays where it should. Maybe this can be avoided with some geometry changes if I ever re-design the gimbal.

  • Working on body tubes and ogive

    Domus Amoris01/02/2019 at 23:32 0 comments

  • Motor gimbal motion test

    Domus Amoris01/02/2019 at 11:37 0 comments

    Here you can find the motion test for the assembled gimbal with the servos :D

View all 10 project logs

Enjoy this project?

Share

Discussions

Canine Defense Technologi wrote 01/27/2020 at 21:26 point

This is super awesome! I am curious how you got the Mass Moment of Inertia to PID value relation which is what I am struggling with due to my lack of knowledge 

  Are you sure? yes | no

Andrey V wrote 08/17/2019 at 05:11 point

Intresting project! But I cant understand some things:

Why you are using nearly dead Atmega? STM32 is much faster and better, has matlab support for PIL testing, and can help you reduce computation time for PID loop. 

For which reason you are using 4050 level shifters? You can power it all from 3v3 supply.

And very interesting, why you are using spi flash with mC which have EEPROM onboard.

  Are you sure? yes | no

Domus Amoris wrote 08/17/2019 at 06:50 point

Hey Thanks!
Given the risk of the project I try to use as much tested (by me) technologies as possible. I like Atmega 328 because it is simple, fast enough for my purpose. The PID loop does not take much time in each cycle, and does not need to run faster than, let's say, 100 Hz.

I use 5V in the Atmega 328 to run it at 18 MHz, and other components require 3.3V. But yes, it would not have been a bad idea to run everything at 3.3V, but I had already tested similar configurations so there was no risk.

I prefer W25Q64 over Atmega 328 EEPROM for several reasons:

- Capacity 1024 Bytes vs 8 MBytes

- Built in write protection for already written address. I cannot overwrite data if I do not erase it before.

- In case of catastrophic failure, even if the uC is damaged, I can always remove the FLASH and plug it in another board to recover the data.

  Are you sure? yes | no

Andrey V wrote 08/17/2019 at 13:32 point

This is a good reason to use components you know well.

Does 100hz is enough frequency to stabilize the rocket in flight?

  Are you sure? yes | no

Domus Amoris wrote 08/17/2019 at 20:36 point

Yes, it should be enough. I have a model of the complete system in MATLAB and I do not see any difference between 100 or 150 Hz for example. In any case, the mechanical system would not be able to respond faster.

  Are you sure? yes | no

Andrey V wrote 08/18/2019 at 05:17 point

You can use the potentiometer, installed in the servo and atmega ADC to see an actual mechanical response and plot it in Matlab. I think it's a good way for the ground test.

  Are you sure? yes | no

Domus Amoris wrote 08/18/2019 at 14:16 point

Yes it is! It is already implemented. Actually, I made a model of the servos with this information so that the response of the actuation is realistic. In the PCB, the ADCs are continuouly reading the actual position of the servos. At least, if the launch is not a succes, it is possible that I get enough information to understand what happened.

  Are you sure? yes | no

miniman064 wrote 01/04/2019 at 21:48 point

Highly recommend checking out this guy. He's doing something very similar and has had a lot of success. 

https://bps.space/

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Domus Amoris wrote 01/06/2019 at 11:11 point

I think is far more limiting the maximum frequency for the response of the actuation system rather than the electronics. Moving some nice motor plus casing, at a frequency of 100Hz with an amplitude of some degress is not an easy job in terms of power - torque - speed. 

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Domus Amoris wrote 01/04/2019 at 07:50 point

Any suggestion or specific doubt from your experience will be appreciated. Regarding the safety, there will be an emergency early parachute deployment and separation from a remote control. 

Thanks for your interest.

  Are you sure? yes | no

barry buelow wrote 01/02/2019 at 20:54 point

I'm a retired avionics engineer and know a little about autopilots and such. You will need to have LOTS of computing power and run the control loop very fast (>100Hz).  The amount of motion will be very small (under 1deg), so plan on a gear reduction, not just servo motor direct. Dead zone is a problem too. It will also depend on the moment arm from the top of the engine tube.  I strongly suggest some spin stabilization so corrections are minor. Hope you are really good with math.  (8-)

  Are you sure? yes | no

Domus Amoris wrote 01/02/2019 at 23:30 point

Hi Barry,

As I commented to Mike, everything can go wrong and it will be difficult to achieve success at first try. However, I am trying to reduce as much as possible failure probability.

The simulation that I have performed before any detail design includes control loop frequency, a real model of the servo that includes max speed, max torque and inertia of the motor. Dead zone has not been considered but it is an error much smaller than the set point minus actual position error, which is considered. Control loop frequencies of 100Hz (or even higher) are not a problem for common electronics. At least this items should not be a problem.

I take note of the suggestion for spin stabilization in order to reduce the actuation, this should be considered in case of failure due to an excessive spin rotational speed. However, since burn time is not very long, less than 3s, I do not expect this to be an important issue, but I cannot prove it beforehand.

And yes, maths an additional very beautiful part of the project. The simulation is far more complex than the controller software that will be on board.

I really appreciate your suggestions and interest,

  Are you sure? yes | no

Laurence wrote 01/04/2019 at 09:35 point

Looking forward to seeing the results from this!

However, as someone who has been at quite a few launches of rockets this size, there is a high chance your rocket will spin. Your fins won't be perfectly aligned, and with the speed you'll be travelling that's enough to spin the tube. It'll be slow (a few Hertz at most), but probably enough to annoy lateral control systems. I've seen a few iterations of a design with active stabilisation using tilting canards. They definitely work, but you need a well tuned PID with dynamic coefficients based on airspeed (or you only enable above a certain speed/height, but for short burns this would start after your thrust vectoring was useful - perhaps for a hybrid motor this would work).

If you want an event to launch/chat to experienced model rocketeers in Europe then International Rocket Week is popular with quite a few uni teams, as well as a lot of regulars. We have a ceiling of 16,000 ft AMSL near Glasgow in Scotland, UK.

http://www.irw.rocketry.org.uk

Good luck!

  Are you sure? yes | no

Domus Amoris wrote 01/04/2019 at 12:05 point

Hi @Laurence ! I greatly appreciate your interest,

As you indicate, one of the advantages of implementing thrust vectoring instead of active fins is that it is not necessary to estimate the aerodynamic coefficients except for those of the body tube itself. Therefore, the equations are much simpler and the control less uncertain. The obvious disadvantage is that there is no control when the motor has finished burning. The mechanical design is also more complex than active fins.

Because the rocket will be uncontrolled once the motor has stopped burning, I will have to make sure that the structural integrity is no compromised due to a parachute deployment at maximum speed. This is reasonably easy to predict and assess.

I think that according to your suggestions regarding spin, I will perform a sensitivity analysis of the control with respect to the spin in the simulations, which actually does not represent a big issue in being implemented. I should have a better insight regarding this before any flight. I will add this item to the task list. However, considering that the rocket will have no fins at all, it may reduce the chances of induced spin, but also of dissipation. 

A crazy idea would be introducing short fins through an important length of the body tube so that the rotation energy is dissipated without increasing significantly longitudinal stability. But I do not really like crazy ideas...

Also, thanks for your offer regarding meeting other rocket hobbyist in Scotland. It would be a beautiful opportunity in summer. As for the moment, I am part of Tripoli's Spain Rocketry and I'm in constant contact with experienced people in the association which are helping me with the project.

I will keep you updated,

  Are you sure? yes | no

Laurence wrote 01/04/2019 at 15:05 point

Ah, sorry Oriol, I missed that it was finless, which should have been obvious!

In which case you will presumably have very little spin unless your gimbals have some offset, or the thrust is not adequately symmetrical from the motor. It might be worth simulating some small spin rotations as you say and seeing how the gimbals handle it.

Glad to hear you have some support behind you from Tripoli. It's amazing how many brilliant ideas using larger rockets never get the chance to succeed because of a silly mistake in the standard part of the rocket which was overlooked.

  Are you sure? yes | no

Mike Szczys wrote 01/02/2019 at 19:38 point

A very interesting project.

Full disclosure: I have no experience building rockets. Are you planning to mount a solid rocket engine in the gimbal? If so, I would be concerned that the jolt of force at ignition would damage the mounts/servos. Have you designed with this in mind?

  Are you sure? yes | no

Domus Amoris wrote 01/02/2019 at 23:12 point

Hi Mike,

Yes, a solid rocket engine. Everything can go wrong and it will be difficult to achieve success at first try. Having said this, yes, I have in mind this considerations. The solid 3D printed parts should withstand the peak load, the design has been validated with finite elements analysis. The servos are not standard, but high torque with metal case aimed for more aggressive scenarios. In any case, considering that peak load is known, the system will be tested soon with an static load of this value before any launch.

Thanks for your interest,

  Are you sure? yes | no

Mike Szczys wrote 01/03/2019 at 16:07 point

I'm fascinated by this load testing. Looking forward to hearing more about how you perform those tests and how the design stands up to them!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates