Guided Rocket

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

Similar projects worth following
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:

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()




Serial.println("Initialize MPU");


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)



prevValo = valo;


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

if (vali != prevVali)



prevVali = vali;




  • 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

  • Ready for Launch

    Sagar06/23/2014 at 23:10 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

    Sagar06/20/2014 at 20:50 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

    Sagar06/20/2014 at 20:46 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)

  • Lasercut Aluminum Frame!

    Sagar06/20/2014 at 20:40 0 comments

    After the failure of the wood frame, a local machine shop made me a .25 inch thick aluminum frame! This frame was later tapped and threaded by me so that the gimbal can fit in it. After the parts were fitted, red permanent locktite was used to make sure they never come off during flight. Along with this, a plywood electronics bay was also laser cut.

  • Thrust Vectoring Frame

    Sagar05/18/2014 at 15:33 1 comment

    After doing a static test on the laser cut plywood frame, it was discovered the the wood grain greatly weakens the wood and results in catastrophic failure. In order to fix this, I will be moving on to a better material such as aircraft grade aluminum, which is more heat resistant and stronger. The aluminum will be .25 inches thick and will be laser cut by a local machine shop. In order to conponsate for the heavier frame, a higher impluse motor will have to be used.

View all 5 project logs

  • 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)

View all 5 instructions

Enjoy this project?



michael_fort wrote 10/26/2016 at 23:22 point

Looks like an old project, but what the heck...  The arduino has no where close to enough bandwidth to self stabilize during the burn phase of the flight.  You should use rocksim to verify that after burnout the thrust vectoring chassis can still influence stability...  I doubt it.

  Are you sure? yes | no

Simon wrote 07/19/2016 at 07:53 point


seriously though,they might not like this, but as long as you don't do nothing TO bad, they might not take to much interest

  Are you sure? yes | no

silvio biasiol wrote 04/14/2016 at 21:06 point

Hello! Can I ask you what  are your considerations for choosing the IMU? I'm constructing an autonomous boat but I'm struggling to choose the right IMU and I really need some suggestions! Everithing is really appreciated :D

  Are you sure? yes | no

Arsalan Asif wrote 02/20/2016 at 19:17 point

Careful, big brother is watching.

  Are you sure? yes | no

Biebuyckleo97 wrote 01/13/2016 at 12:54 point

Wow! I'm realy impressed! I was thinking about such a project too and you already got the guidance figured out and the assemblies set up! Few, man. If there's anything I can do to support your project(either cooperating or financial support) just let me know (!

Oh and please do not listen to these people trying to pull you down. Innovation is a modern economy/society's motor, and these people are trying to kill every last bit of it. Let your inventing spirit flourish and one day you'll end up next to Elon Musk! :)

  Are you sure? yes | no

Brett wrote 08/09/2015 at 04:10 point

Lets overlook the fact that a "guided rocket" is illegal.....

  Are you sure? yes | no

michael_fort wrote 10/26/2016 at 23:25 point

Please cite a reference.  As I understand it, it can be legal if the guidance corrects the flight to 'straight up', or on decent, helps aid in recovery, but that is also heresay.

  Are you sure? yes | no

FuVinatro wrote 07/24/2015 at 22:17 point

Is there any chance you might get FBI knocking on your door anytime soon?

  Are you sure? yes | no

Charles Lakins wrote 05/11/2015 at 13:45 point

u might try using a mini camera gimbal controller using brushless motors for control, the stabilization and pid routines are already figured out too , would still take some work but might be interesting to see work

  Are you sure? yes | no

mohsenabbasiarbeit wrote 01/20/2015 at 23:10 point

DId you test it? Do you know about the high speed of the rocket and that this electronic slow for it?

Think about that

  Are you sure? yes | no

Howie wrote 11/14/2014 at 03:27 point
I have built a rocket like this. My rocket needs some major improvements though. My guidance system was heavy and consisted of wires, a pendulum, and four jet vanes. I am planning on making directions on how I built mine.

  Are you sure? yes | no

Darron wrote 08/01/2015 at 16:24 point

Please don't. Building this MAY be legal (I've got no clue, don't listen to me there), but freely sharing plans or software almost certainly isn't (in the US).

  Are you sure? yes | no

Jasmine Brackett wrote 08/16/2014 at 00:04 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 08/21/2014 at 02:31 point

  Are you sure? yes | no

medo sonson wrote 02/08/2017 at 20:37 point

thanks sager but you tested it


  Are you sure? yes | no

Sagar wrote 08/21/2014 at 02:33 point
I don't think I'm missing anything else

  Are you sure? yes | no

zakqwy wrote 07/30/2014 at 20:27 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 07/31/2014 at 15:25 point
I mean sharing code isn't exactly arms trafficking

  Are you sure? yes | no

Darron wrote 08/01/2015 at 15:49 point

Okay, that's actually dead wrong. Remember the whole 128 bit encryption thing? No, maybe too young. Code depending on what it does can be classified as a dual-use item... and freely sharing that is illegal in the US. If you're in the US, there's virtually no way this particular project (software, other plans, etc) doesn't violate the crap out of 121. You're probably in for a visit, if you're here. If you demand you have some right to share info on this.... expect a very nasty time of it.

  Are you sure? yes | no

zakqwy wrote 07/31/2014 at 15:28 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 07/31/2014 at 15:29 point
By the way--any luck with the first prototype launch??

  Are you sure? yes | no

ArsenioDev wrote 07/31/2014 at 15:38 point
Absolutely! Ive heard horror stories about getting on their bad side

  Are you sure? yes | no

ArsenioDev wrote 07/28/2014 at 15:54 point
Sagar, Im trying to rework your code into a fin-based stabilization system hwever im having some issues with the servo movement

  Are you sure? yes | no

Sagar wrote 07/31/2014 at 15:27 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 07/31/2014 at 15:29 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 07/23/2014 at 02:51 point
Thanks for the code, I'm basing my unit (using fins) around it for my high power rockets

  Are you sure? yes | no

John Boyd wrote 07/14/2014 at 21:57 point
PLEASE post videos! :D

  Are you sure? yes | no

ArsenioDev wrote 07/23/2014 at 02:52 point
Here's mine based around his code, I'm using fins whereas he is using nozzle vectoring

  Are you sure? yes | no

zakqwy wrote 07/14/2014 at 19:57 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 07/05/2014 at 18:45 point
Sagar, nice work! can i suggest another way to vectoring the engine? 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 06/25/2014 at 01:43 point
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 06/22/2014 at 17:07 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 06/22/2014 at 17:41 point
im using mpu6050 with no filter

  Are you sure? yes | no

zakqwy wrote 06/22/2014 at 17:55 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 06/22/2014 at 18:29 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

Daniel Resemini wrote 03/25/2015 at 15:57 point

MPU6050 library includes kalman filter

  Are you sure? yes | no

zakqwy wrote 03/25/2015 at 16:07 point

That's great to know. I did find this project too, which might help:

  Are you sure? yes | no

John Boyd wrote 06/20/2014 at 23:27 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

Similar Projects

Does this project spark your interest?

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