Close

Does this project spark your interest?

Become a member to follow this project and don't miss any updates

Guided Rocket

I will be attempting to build a guided rocket using of the shelf parts

36 78 56
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 05/15/2014 and last updated a month ago.

Description
Using a microcontroller such as an Arduino, accouters, and gyroscopes I will be trying to make a rocket that can guide itself. Most guided rocket technology is restricted to the military, so I am going to try to make this open source and replicable by anyone. There are two basic ways to control rockets, the first being thrust vectoring, where the entire rocket engine is tilted in a direction to move the rocket in the opposite direction. The second way is by using control surfaces, this is done by moving the fins to redirect the airflow around the rocket and move it. I will be attempting both ways of control and finding out which one is the best for hackers like us! The openness of this project is based on the fact that rocket control technology is usually shrouded by mystery because the defense and space industries don't actively share much research on it.

Here is a quick video, sorry for the quality as I had low batteries: https://www.youtube.com/watch?v=O8cSIomNDA8
Details

This code will enable the gimbal to make sure the nose is always facing up, meaning that the rocket will always face up without the need for fins. When combining this code with a rocket with a gradual thrust curve, you will essentially get a hover and a landing:

#include "Wire.h" // allows communication to i2c devices connected to arduino

#include "I2Cdev.h" // I2Connection library (communication to serial port)

#include "MPU6050.h" // IMU library

#include "Servo.h" // servo control library

MPU6050 mpu; //defines the chip as a MPU so it can be called in the future

int16_t ax, ay, az; // x y z orientation values from accelerometer

int16_t gx, gy, gz; // x y z orientation values from gyrscope

///////////////////////////////////////////////////////////////////////////////////////

Servo outer;

Servo inner;

///////////////////////////////////////////////////////////////////////////////////////

int valo; // outer val

int prevValo; // outer prev val

///////////////////////////////////////////////////////////////////////////////////////

int vali; //inner val

int prevVali; //outer prev val

///////////////////////////////////////////////////////////////////////////////////////

//initializes the IMU

void setup()

{

Wire.begin();

Serial.begin(38400);

Serial.println("Initialize MPU");

mpu.initialize();

Serial.println(mpu.testConnection() ? "Connected" : "Connection failed");

outer.attach(9); //servo on pin 9 for large ring y

inner.attach(10);//servo on pin 10 for small ring x

}

///////////////////////////////////////////////////////////////////////////////////////

void loop()

{

mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

valo = map(ax, -17000, 17000, 179, 0);

if (valo != prevValo)

{

outer.write(valo);

prevValo = valo;

}

vali = map(ay, -17000, 17000, 179, 0);

if (vali != prevVali)

{

inner.write(vali);

prevVali = vali;

}

}

///////////////////////////////////////////////////////////////////////////////////////

Components
  • 1 × Arduino The brain of the rocket!
  • 4 × High Torque/High Speed Metal Geared Servos These need to be fast/strong in order to control the rocket
  • 1 × Internal Measurement Unit This will sense the rocket's orientation using its multitude of seners including gyroscopes, accelerometers, magnetometers, and barometers
  • 1 × Laser Cutter This will be used to quickly make prototype parts for the rocket
  • 1 × 2mm Thickness Carbon Fiber Sheet Most rocket parts such as control surfaces will be made from this lightweight composite
  • 1 × 2.5inch diameter carbon fiber tube The rocket body will be made from this in order to allow room for electronics and batteries
  • 1 × 5000ma LiPo Battery This battery will power the servos and all other electronics
  • 1 × Bottle of Etching Solution This will be used to etch custom circuits such as power distro boards

Project logs
  • Ready for Launch

    3 months ago • 2 comments

    Upon the completion of the thrust vectoring chassis, I made a body out of thin wall fiberglass. This rocket has no fins due because the test code pasted in the description will make the rocket self stabilize, if the rocket stays pointed up during the flight, we will know that our thrust vectoring system works.

  • All Components Attached

    3 months ago • 0 comments

    As each piece of the electronics were tested individually, it was finally time to mount everything in the electronics bay. The IMU was mounted in the front so that it picks up even the smallest changes in rocket orientation. The rocket electronics went from this:

    To This:

  • The Electronics

    3 months ago • 0 comments

    I finally got out of the prototyping stage and all the ordered electronics work how they are intended! Now comes the hard task of fitting everything on the electronics bay so that it wont come loose with vibration. To do this, a custom cable was made for the IMU, a sensor which will tell the arduino what orientation its facing.

    Along with this, a power control circuit was designed and made using PCB, it was planned to make an all in one rocket control board, but this turned out to be more simple for prototyping. The power control board takes 11 volts from a LiPo battery pack and distributes it to the IMU, the Arduino, and the two servos while keeping everything cool and safe from coming loose

    The servos connect to the screw terminals on the left hand side, while the batter goes on the bigger terminal, the 3 wires connect to arduino and are (ground, PWN9, and PWN10)

View all 5 project logs

Build instructions
  • 1

    Using the custom made CAD file of the thrust vectoring chassis, laser cut the parts out of the aluminum billet.

  • 2

    Drill 3mm holes in the necessary spots

    Screws ready for mounting

    Outer ring will be attached to this pivot

  • 3

    Test the fitting for the outer ring to the main frame and sand if needed, it should be a solid fit. Do the same for the inner ring, it should look like the picture below. (1 ring should turn in the x axis and the other in the y)

See all instructions

Discussions

Jasmine wrote a month ago null point

Hello Sagar, please review your project documentation to ensure it has everything we require for it to be considered for the next round of The Hackaday Prize.

By August 20th you must have the following info on your project page:
- A video. It should be less than 2 minutes long describing your project. Put it on YouTube (or Youku), and add a link to it on your project page. This is done by editing your project (edit link is at the top of your project page) and adding it as an "External Link"
- At least 4 Project Logs
- A system design document. Please highlight it in the project details so we can find it easily.
- Links to code repositories, and remember to mention any licenses or permissions needed for your project. For example, if you are using software libraries you need to document that information in the details.

You should also try to highlight how your project is 'Connected' and 'Open' in the details and video.

Good luck!

Are you sure? [yes] / [no]

Sagar wrote a month ago null point

https://www.youtube.com/watch?v=O8cSIomNDA8
Here is a video

Are you sure? [yes] / [no]

Sagar wrote a month ago null point

I don't think I'm missing anything else

Are you sure? [yes] / [no]

zakqwy wrote 2 months ago null point

Hey Sagar--ArsenioDev brought up some good points on his project regarding ITAR regulations. You might want to review them, specifically 121.1, category IV, paragraph A, note 3.

Are you sure? [yes] / [no]

Sagar wrote 2 months ago null point

I mean sharing code isn't exactly arms trafficking

Are you sure? [yes] / [no]

zakqwy wrote 2 months ago null point

Agreed. Just figured it's worth keeping in the back of you head; I was surprised that the reg explicitly called out guided hobby rockets.

Are you sure? [yes] / [no]

zakqwy wrote 2 months ago null point

By the way--any luck with the first prototype launch??

Are you sure? [yes] / [no]

ArsenioDev wrote 2 months ago null point

Absolutely! Ive heard horror stories about getting on their bad side

Are you sure? [yes] / [no]

ArsenioDev wrote 2 months ago null point

Sagar, Im trying to rework your code into a fin-based stabilization system hwever im having some issues with the servo movement http://hackaday.io/project/1742-Arduino-rocket-stablilzation-system

Are you sure? [yes] / [no]

Sagar wrote 2 months ago null point

You want to make it so for every degree the rocket moves, the fins only correct 1/2 a degree. I'm currently not doing that but my theory is that it will overcorrect and get in a pendulum type motion by constantly overcorrecting. You want to start low and then work your way up for how sensitive the fins are. You would do this by writing the IMU output to variables and dividing them by 2

Are you sure? [yes] / [no]

ArsenioDev wrote 2 months ago null point

I'm still mostly a noob at the programming part, could you show an example of said code changes?

Are you sure? [yes] / [no]

ArsenioDev wrote 2 months ago null point

Thanks for the code, I'm basing my unit (using fins) around it for my high power rockets

Are you sure? [yes] / [no]

phreaknik wrote 2 months ago 1 point

PLEASE post videos! :D

Are you sure? [yes] / [no]

ArsenioDev wrote 2 months ago 1 point

Here's mine based around his code, I'm using fins whereas he is using nozzle vectoring https://www.youtube.com/watch?v=hN4Hhd7Hpr0

Are you sure? [yes] / [no]

zakqwy wrote 2 months ago null point

Hi Sagar--any luck on the launch? I'd love to see the thrust vectoring system in action!

Are you sure? [yes] / [no]

Saulo wrote 2 months ago null point

Sagar, nice work! can i suggest another way to vectoring the engine? http://img840.imageshack.us/img840/3532/2fa.png can be more structural stable and because the size of this rocket, i think you will not need a high control angles.. Even with control vectoring, you should considerate some stabilization fin..

Are you sure? [yes] / [no]

samern wrote 3 months ago 2 points

I have a suggestion in how you might test the operation of your nozzle without actually firing it. This would be a way to test the response of the electronics and their ability to maintain stable flight, vs. acceleration and overcoming gravity. I used to run a Wind Tunnel lab and when we wanted to test a planoform, we'd put it on a string or something with negligible aerodynamic interference and apply the control inputs (either by varying the airspeed or to come degree its angle of incidence. What I'm suggesting is that you make something out of ductwork and cut a small window in it with an acrylic pane to see through. Then put a pair of vanes on one end and blast air through them letting the air exhaust out the back. Park a camera in the window and while your rocket 'flies' either with or without the engine firing, record the response of the rocket both through telemetry and video. If you want to see the dynamics, put a high resistance wire near the vanes and slather it with oil and apply a voltage across it -- the smoke flowing over your rocket will give you a contract of what's happening as the rocket ploughs through the air. At least this way you can collect some empirical data before you shoot the thing and potentially lose it, and you can make some real refinements before the first flight test.

Are you sure? [yes] / [no]

zakqwy wrote 3 months ago null point

I don't know anything about the IMU you're using; does the library include some kind of filtering algorithm? Thanks for posting the code!

Are you sure? [yes] / [no]

Sagar wrote 3 months ago null point

im using mpu6050 with no filter

Are you sure? [yes] / [no]

zakqwy wrote 3 months ago null point

Are you getting good accelerometer and gyroscope data? I've found that raw signals can be a bit noisy. Any issues with that?

Are you sure? [yes] / [no]

Sagar wrote 3 months ago null point

I get a bit of noise due to it being a piezoelectric sensor, I dont think it will be a problem but I havn't launched yet so you never know

Are you sure? [yes] / [no]

phreaknik wrote 3 months ago 1 point

It looks like your servo is set up to push the rocket at about a 1:1 ratio, meaning if you only want to adjust the motor a few degrees (which I naively assume will be most of the time) then you will have VERY low resolution on the servo. Have you considered using a lever or gear system to give the servo higher resolution for small thrust changes?

Good luck!

Are you sure? [yes] / [no]

vcazan wrote 3 months ago null point

This may be of interest to you:
http://www.ukrocketman.com/rocketry/gimbal.shtml

Are you sure? [yes] / [no]

Sagar wrote 3 months ago null point

That's where I got some of my inspiration

Are you sure? [yes] / [no]

phreaknik wrote 3 months ago null point

I have actually been planning a project just like this. I will be following along as you post your results!

Are you sure? [yes] / [no]

vcazan wrote 3 months ago null point

Same! I love launching model rockets but which I could do a roll as it reaches Ap.

I was thinking of a wifi enabled module with a built in GYRO with a weight so steer the craft. Could put it in any model rocket.

Are you sure? [yes] / [no]

Adam Fabio wrote 3 months ago null point

Great project Sagar! Thanks for entering your guided rocket project to The Hackaday Prize! Make sure you've got some powerful servos to keep that rocket motor in check! The space shuttle used hydraulics for the task.

Are you sure? [yes] / [no]

Sagar wrote 3 months ago null point

Ya, I got 10kg torque metal geared servos, these should be enough (i hope)

Are you sure? [yes] / [no]

Jesse Ransom wrote 4 months ago null point

thrust vectoring = adjusting the thrust, not moving the motor! Think of a F16 it has thrust vectoring but uses the nozzle to adjust the thrust. Plus the cg would be thrown around moving the motor. http://youtu.be/ss96tsbG5KY

Are you sure? [yes] / [no]

zakqwy wrote 4 months ago null point

In rocketry, vectored thrust often does mean moving the entire engine, albeit the pivot point might be a bit lower. The SSME is a good example:

http://youtube.com/watch?v=7Wtg_3Y4lFc

I imagine in the case of liquid fueled engines, there isn't a practical way to gimbal the nozzle _without_ including the turbopumps in the movable assembly, since high pressure/high flow rate flexible cryogenic lines would be a challenge.

Are you sure? [yes] / [no]

Jesse Ransom wrote 4 months ago null point

that's a video of a cone on the bottom of the rocket that manipulates the trust in any one direction the motor itself isn't moving. here is some other videos. I'm not saying your project isn't cool its just by trying to move the rocket your servos and brackets have to hold on to a lot more pressure. http://youtu.be/59CRsSvaCgc?t=40s and this one is a good one http://youtu.be/MS5jkXnV-3w

Are you sure? [yes] / [no]

Overwatch wrote 4 months ago null point

Sorry but you are incorrect. Lets break it down

Thrust - verb: to push with force
Vector - verb :to change the direction of

Thrust vectoring is literally just changing the direction that that you are pushing.

Sometimes the entire engine is moved, like in the project picture.

Sometimes the engine is fixed, but the whole nozzle is moved, like many of the engine bells used for liquid fueled rockets.

Sometimes the engine and nozzle are fixed, but an additional plate/extension is put in the path of the thrust to change it's direction. This is the method that many current generation fighter aircraft use. It is also how most air boats work.
(technically anything that directs thrust is part of the nozzle, so this method is really just changing the shape of the nozzle. But it is easier to understand if they are described as additional plates.)

Additionally, there were no production F-16s that have thrust vectoring.

Are you sure? [yes] / [no]

Eric Evenchick wrote 4 months ago null point

Looking forward to seeing some discussion of thrust vectoring. Our university rocketry team looked into it but had a lot of issues with reliably moving the engine.

Are you sure? [yes] / [no]

Sagar wrote 4 months ago 1 point

I am currently trying to get it to fly straight up without fins by using the IMU to alter the engine's direction

Are you sure? [yes] / [no]

zakqwy wrote 4 months ago null point

Awesome man. I'm looking forward to taking a look at your firmware (and you should look at mine, when I get to that point), as we're trying to solve similar problems.

Are you sure? [yes] / [no]

zakqwy wrote 4 months ago null point

How much automation are you planning on building into the controls? Are you planning on using the IMU for stability only with some kind of R/C setup, or are you hoping to be able to program a flight route into the controller?

F engines are fun. Definitely excited to see where this goes!

Are you sure? [yes] / [no]