Arduino rocket stabilization system [UD: 2/2/17]

Arduino powered rocket stabilization system for mid to high power rockets that gets rid of the pitch over and subsequent downrange flight

Similar projects worth following
Attempting to use an arduino to keep a rocket on a 90 degree vertical flight path and cancel windage that may build up on the ascent for smooth video capture and easier recovery

Realized to my dismay(and likely yours) that I will be unable to open source this rocket guidance project. Due to ITAR and this being classified as Defense-related I cannot export this code or hardware outside of the continental US. Link for those who wish to research more on these regulations. ITAR Regulations 121.1, Category 4, paragraph H:
(1) Flight control and guidance systems (including guidance sets) specially designed for articles enumerated in paragraph (a) of this category (MT for those articles enumerated in paragraphs (a)(1) and (a)(2) of this category);

Note to paragraph (h)(1): A guidance set integrates the process of measuring and computing a vehicle's position and velocity (i.e., navigation) with that of computing and sending commands to the vehicle's flight control systems to correct the trajectory.

As a reminder, this project MAY fall under ITAR restrictions and as I do not have the funds to file for verification, I am playing it safe by not sharing code or CAD. This system is not designed nor intended to be used as a weapon, rather just keeps a high-power sport rocket flying vertical. No I will not help you port my work to be used in mortars/missiles (yes people have seriously asked this). I am doing this project as a personal challenge to learn new skills, processes and to broaden my project scale horizons, I harbor no malicious intent.

Preliminary rough prototype completed!

Reprinting with fixed tolerances

  • 1 × Arduino Uno (soon to be replaced by an Atmega 328)
  • 4 × Hobby servos
  • 1 × MPU6050 6DOF IMU
  • 24 × Wires
  • 1 × 9v battery

  • Prograde burn; I quit my day job to work at NASA

    ArsenioDev02/02/2017 at 13:33 2 comments

    Yes you read that right, as of January 30th I am working at NASA Goddard as a student researcher in the earth sciences wing, specifically on the 4U Laser Hetrodyne Radiometer cubesat as a hardware/software engineering intern.

    As for how on earth I landed here the story is convoluted but to make a long story short; An internet friend who works at NASA thought I'd be a good fit for his intern army and after 6 months of limbo where it was uncertain if they'd be able to get me, I finally interviewed and was in. Some of the key points of consideration were that I had a multifaceted skill set of hardware and software, in-depth documentation of my work on the blog, familiar with GitHub and lastly, open to learning new roles and skills.

    Work will continue on the stabilizer, have no fear, as the motor control is coming along nicely with a basic bang-bang control plant done.

    Ad Astra
    Arsenio Dev

  • Late(r) 2016 update; on redesigns and disclaimers

    ArsenioDev11/02/2016 at 00:31 0 comments

    The old and the new

    Update time has rolled around again now that a good chunk of progress is completed on the Arduino based rocket stabilization system. This has taken a while since I've been busy with not only work but also getting the A+ certification in computer repair and completely reworking my current workstation. After much discussion with several other rocket tinkerers, the conclusion was reached that stresses on the servo spline itself would be quite considerable and may result in damage or inoperability. Based on force distribution I surmised that flanged bearings embedded in the system shroud tube would function as not only supports but also as smooth rotation points. With the challenge of a new fin drive train in mind, I set to brainstorming. My first thought was to use linkages connecting the servo to the actuation shaft, though it would increase the diameter of the system unless the servos were staggered which would also increase the overall height of the system. Stepper motors were considered, however as I was unable to find suitably sized units and the common 28byj-48 had too low precision and torque this too was eliminated from consideration. After those two ideas were discarded, it was relegated to the back burner while I had work. The breakthrough was about a week later, while browsing patents looking at missile fin drives I noticed an old Raytheon control segment used bevel gears to transfer the motion and that became the seed for the new design.

    As a reminder, this project MAY fall under ITAR restrictions and as I do not have the funds to file for verification, I am playing it safe by not sharing code or CAD. This system is not designed nor intended to be used as a weapon, rather just keeps a high-power sport rocket flying vertical. No I will not help you port my work to be used in mortars/missiles (yes people have seriously asked this). I am doing this project as a personal challenge to learn new skills, processes and to broaden my project scale horizons, I harbor no malicious intent.

    Original sketch for new design using pushrod linkages and servos, scrapped

    Initial sketch of DC motor and bevel gear based drive system

    With bevel gears as the motion transfer solution in mind, I thought back to motors and remembered that there are small diameter low voltage geared motors with micro encoders available on Pololu and the other usual sites. I did consider using high end Faulhalber motors with built in encoders but gave up when I saw the prices were $25 a piece, completely out of my price range. With that sorted I roughly sketched a layout for the system. Once the motors were sorted, then came the second biggest challenge; the bevel gears. I tried the usual distributors, McMaster, KHK, Robotshop, RS and eBay all to no avail. Motionco did sell acetal(plastic) gears but in this case metal is the way to go and they were UK based. I called several gear manufacturers but their quotes ranged from the low to mid hundreds which is WAY out of my price range. Slightly disheartened I turned to the last place I could think; Aliexpress. Thankfully, there are gears available though they are a bit expensive ($16/pair of which $4 is shipping that cannot be combined for some reason). The geartrain ratio between the motor and the fin output is 1:1 as is standard with most bevel gear configurations. Now that the basics for the power transfer system were locked in, I drew block diagrams and crunched the numbers for the encoder precision which came out to be .3deg/pulse on the output on the 1:100 geared 6V motor. Bearings were much easier since 3mm bores are a common dimension, a quick eBay search yielded a bag of ten 3x6x2.5 flanged bearings for well under $20.

    Basic system block diagram with in-progress notes [Blackbox project note censored for safety]Armed with the sketches and an idea of the final goal, I set to constructing CAD models for future 3D printing. In the first revision I decided to try making it air frame compatible with the current system for drop-in usability and interchangeability. However, once the model was complete I noticed that there was a LOT of room for miniaturization with all the space between the motors, output shaft and side walls. In total, I...

    Read more »

  • First 2016 update; now with proper fins and a mockup

    ArsenioDev02/24/2016 at 00:44 1 comment

    With 2016 well underway it's time for the first update on the state of the stabilization system!

    First off, apologies for the massive delays this post has had, was originally slated for mid-Jan launch but between job hunting and other stuff I've been hitting delays and trouble at every turn. Since last semester ended on Dec 18th, I'd been going to TechShop pretty much every day until Jan 18th making massive amounts of progress.

    The demonstration mockup was constructed to not only have a physical representation of the final assembly but also to familiarize myself with layout and wiring inside a confined space which is new territory to me. It is constructed out of 3 inch ID cardboard mailing tubes and has fins cut from standard cardboard bolted on, nothing special or lightweight due to this not being the final flight model. The overall mass of this version is 1.48Kg of which 452g is the stabilization system module. Testing and flight versions will be constructed out of "Blue tube" for it's superior durability and lighter weight though at much higher cost ($30/4 feet, whereas the tubes I'm using I salvaged from the scrap pile for free)

    Some of my longer term readers may remember how much difficulty I was having with figuring out a method for attaching a fin to the servo spline, trying everything from printing a horn to trying integration of a round arm to no avail. In the end, I decided to stop trying to reinvent the wheel and rework an older design to bolt onto a premade servo horn. These are designed in standard diamond hypersonic form with the axis point 3/4 up the mean aerodynamic chord. Due to the mounting method of fins bolting directly onto the horn, installing these after the servos are in the body tube is impossible, forcing me to have a slot-in module that is held in place with bolts. The slots perform an additional function of being mechanical endstops for the fins to prevent an overcontrol instance(in theory). Sadly, two of the scavenged servos finally kicked the bucket and a full new set is going to cost me $72 ($18/HS82MG) which is FAR out of my frayed kitestring budget which has dwindled to nearly zero as of late. If any of my readers know how to get in contact with Hitec for a sponsorship or how to get parts donated to a student project it would be greatly appreciated if you would drop me a line.

    The integration can for my system needed to be reworked due to being a bit too small to fit in the 3 inch inner diameter body tube. I retained the previous method of servo containment and mounting, just upscaled a bit and added bolt holes for attaching to the airframe, in addition to adding a forward riser to hold the control board in place and provide a nose cone mounting flange. Making sure this has a slightly snug fit is key, as internal movement can instigate a self-amplifying and destructive resonant wobble. Two slots with gentle slopes leading up were employed in this version.

    The breadboard and connection board of the previous version were not only too hard to set up quickly but also very fragile and annoying to work with. I'd had enough so finally I went and built a nice shield that integrates almost everything while still keeping the Arduino removable so it can be used in other projects. V1 was a first attempt, all wires were red (bad idea) and shoddily laid out which caused a lot of headaches when it simply failed to work when powered up. Debugging when powered up showed the 5V rail hanging around 1.2V and not budging at all even when everything was disconnected. After a few hours of frustration my father walked by and offhandedly remarked to check the ground, much to my chagrin I found that I'd forgotten to connect the ground net to the ground rail which promptly fixed the problems (check for floating grounds). On the second revision the power and ground wires were in standard red and black while signals are in white (I ran out of wire colors okay?) in addition to being MUCH cleaner and better laid out. On the final...

    Read more »

  • A long overdue bug fix and testing update.

    ArsenioDev10/20/2015 at 18:47 1 comment

    This system has been plagued with a pair of bugs that defied all logic; the Harlem Shake bug where the IMU spits random values out of nowhere even when perfectly still and the Iceman glitch where the whole system freezes up and shuts down. After mucking around with the code and a string of long nights trying to figure out what the heck was wrong with the system, I finally fixed the problem. The root cause is just inferrences at the moment, if anyone has a better theory I'd be glad to hear it. Simply changing the serial baudrate from 9600 to 115200 appears to have fixed the problems. Reading the serial logs led me to believe that the freezing glitch was caused by a FIFO (First In First Out) overflow due to the appearance of that message just before the system locked up. Initially, I had messed with the FIFO configuration to no avail before inferring that the data was coming in at a much higher rate than it was being output. My assumation is that the transcoding of the data was taking up too much processor power and causing it to get way out of whack. Googling around proved this to be the case and the fix was to increase the baudrate. After applying this fix, the system ran for 10 hours without any bugs or freezing at all, then I tested it 5 more times with resetting and the bugs did not reappear.

    A few months ago I wrote a request on the member board at TechShop DC asking if anyone had ideas on how to get permission to use a runway for kinetic testing of a system, much to my surprise I got a response. None other than the owner of the Washington Executive Airport offered to let me use his 3000 foot runway for the testing. I am planning on heading up there sometime in November to check out the airport and start doing test operation planning and figuring out where to put cameras for video capture. This also is going to be time for the test rig to be built and I'll be needing to start fuselage integration immediately, or at least very soon. More updates as it comes!

  • Hackaday feature, project status

    ArsenioDev09/15/2015 at 01:14 0 comments

    As many of you have seen, I went to the DC Hackaday event and brought along the system to demonstrate and give a talk about. After fighting FTDIGate for a while, I eventually got the debug working and was able to present it without it giving me issues or the annoying "Harlem shake" bug. A recording of my talk is going to be at the bottom of this post where those who were not in attendance can watch it. At the moment, I am working on getting new servos and designing it into a test airframe for kinetic testing on a runway and/or a wind tunnel (If UMD will loan me some time on it). Later this week I'll be calling the local airport and the auxillary runway to see if they will let me drive a car with a rocket hung off the side down their runway at high speed (sounds crazy, is insane but hopefully will work with the power of "i'm doing a student project") More posts will be going up later this week to show the development.

    Remember, past in-depth logs are on the blog.

  • General heads up

    ArsenioDev01/20/2015 at 16:06 0 comments

    Thought this page needed an update on the status of the project. It is NOT abandoned, just swamped in schoolwork. A more detailed update is coming later this week

  • Update 2

    ArsenioDev11/10/2014 at 23:20 0 comments

    //Back again with another update! Many apologies for the extended hiatus, school is quite hectic with it being my final year and the heavier workload of AP Physics and trying to maintain a relatively good GPA in addition to some other unrelated things going on that weighs rather heavily on my time, thanks for your understanding.

    Back in the beginning of September I had started work on taking a prototype shield (these) and soldering the circuits on the back using standard hook up wire and converting it into a guidance shield for easier demonstration purposes and to minimize the rats nest of loose wires hanging out all over the place. This increased the durability of the entire system but hit a major hardware snag when it did not work as it did on the breadboard. The issue was it started moving the servos a single tiny skip then shutting the whole system down. What was happening is that the servos were drawing far too much current for the 5V pin and the Arduino shut down to protect itself as it thought it was short circuiting, not an I2C bus issue as I first surmised. I figured it out at last earlier this week, when I used an additional power supply for the servos (lots of power required to move 4 of them simultaneously). This fixed the biggest hardware problems I was having with a minimal amount of changes required to my circuitry (will need only an additional regulator) and no major changes to the code (will be moving the servo pins to PWM next revision). When you encounter an issue, first thing to check is for shorts, then to see if something else has gone wrong such as a misplaced connection or a solderblob jumped terminal that should not be connected.

  • Update 1

    ArsenioDev11/10/2014 at 23:20 0 comments

    I will be delayed in the development of the system on the code side due to the loss of my MPU-6050. The magic blue smoke of failure made a surprise appearance yesterday. I connected it to the 5V pin of the Arduino and suddenly wisps of smoke wafted past my screen as the power LED dimmed and powered off. I tested the temperature of the components and found the voltage regulator to be at fault. I did not over voltage it as it was rated to 5V. Likely the component was either faulty or it might have been a low quality wafer. The replacement components will be arriving in a few weeks (they have to get here from the opposite side of the planet) so until then I will be working on the physical structure of the drop test module for the test before the end of the year. Currently my objective is to secure a location from which to drop the unit from as so it can get up to the proper airspeed for the fins to come into play and control the fall of the unit. Initially I had called the local university as they have tall buildings which the town I live in does not (aside from the precinct which will not let me drop things off their roof). The administrator I talked to was extremely helpful and asked around as to wether or not I would be able to use their facilities. I was unable to use the facilities due to their insurance policies and the fact that the roof membranes are rather fragile, however he did give me several other places to ask which will hopefully allow me to test this system. Until the next post, Arsenio Dev signing off

  • Preliminary fin prints

    ArsenioDev08/20/2014 at 16:44 0 comments

    Printed the first fin today, it got messed up really bad, warping and bad layer stacking galore! the support structure wouldnt cleanly break off!

    Printed vertically and the difference is night and day!

    Also reprinted the baseplates at the proper size and now the servos are a snug press-fit and don't collide in the support structure

  • Got the fin movement fixed

    ArsenioDev08/16/2014 at 22:30 0 comments

    Today I decided to fix the issue of opposite servo pairs actuating in opposite directions which would result in a uncontrolled spin and subsequent destruction of airframe. It only took a few modifications totaling in 10 additional lines of code. This site was extremely helpful in explaining the servo drive code for opposite servo pairs.

    Obfuscated = valNull;
    Obfuscated = valNull;

    What this does is take the opposite servo and drive it 180 degrees in the opposite direction of the reference servo.
 (video of it in action)  

View all 14 project logs

Enjoy this project?



samern wrote 04/05/2017 at 01:33 point

Wait....didn't I meet you at the NoVA Mini Maker Faire in March (I had the GoKart Tank)?  A system like this is one of my long term, pet projects (you know, the sort I have no time for).  I look forward to seeing more!

  Are you sure? yes | no

ArsenioDev wrote 04/05/2017 at 03:23 point

Haha yes! I am that rocket guy. 

  Are you sure? yes | no

samern wrote 04/05/2017 at 11:13 point

Have you considered using vectored thrust for control instead of just fins?  Anyway, I would love to help and perhaps replicate your work/contribute with design, build or whatever work.

  Are you sure? yes | no

ArsenioDev wrote 04/05/2017 at 15:53 point

Sent you a PM, talk on there

  Are you sure? yes | no

hassanarif87 wrote 03/26/2017 at 18:55 point

Hi there, our school is competing in the IREC rocket competition in New Mexico this summer. I am doing a controller for this project. I had a question about the choice of control surfaces. Canards or ailerons. From my understanding canard and fin coupling can reverse the roll. I don't know how to calculate this though.  Do you have any experience with this. I am modifying a small rocket to test next week. Canards are much easier to make but ailerons don't have the roll issue. Any advice on this? 

  Are you sure? yes | no

Matt wrote 01/25/2017 at 20:53 point

One question:  Have you considered having your fins mount at one point, and activating their movement at another point?  I made a horrible graphic depicting what I mean, with permanent mount at the top, and swing arm mount at the bottom:

This would prevent strain on the motor (from having the fin directly mounted), and also allow you to use a step-down gear from the motor for finer control.  I'm not sure how fine-tuned the servos you're using will be, but having a step down could dramatically increase precision (and prevent over-correction).  You'd need to implement a worm gear or some other method of transferring torque, and this would require a slot along the body of the tube, but perhaps the advantages would be worth it.

  Are you sure? yes | no

Matt wrote 01/25/2017 at 15:30 point

This is awesome.  I've been dreaming of making a high elevation, self-guided rocket for a long time.  I'd love to take GoPro video similar to what the weather balloon folks have been using, but on a much shorter time scale.  Guidance (on the way up) has been one of my biggest challenges in design, so I am very excited to see what you continue to develop here!

  Are you sure? yes | no

markus.mikschi wrote 09/19/2016 at 22:11 point

I have got a question: How do you compensate for the gyro's drift? Normally a IMU would use a accelerometer but in case of a rocket the majority of the acceleration doesn't come from gravity which would tell wit where "down" is. I would really like to know how you do that

  Are you sure? yes | no

ArsenioDev wrote 09/19/2016 at 23:38 point

I will be switching to the MPU9150 to use the magnetometer as drift cancellation reference

  Are you sure? yes | no

markus.mikschi wrote 09/20/2016 at 07:41 point

Damn you answered quick - thanks (=

Is that accurate enough though? And how do you combine the readings from the gyro with the compensation from the magnetometer? Kalman filter?

  Are you sure? yes | no

ArsenioDev wrote 09/20/2016 at 13:20 point

From datasheets and crappy math, it should be enough to prevent drift for a <5min controllable flight segment. Yes, kalman filter is the aim

  Are you sure? yes | no

markus.mikschi wrote 09/20/2016 at 14:09 point

thank you (= I will watch your project very closely as it progresses. Best of luck!

  Are you sure? yes | no

ArsenioDev wrote 09/20/2016 at 13:20 point

From datasheets and crappy math, it should be enough to prevent drift for a <5min controllable flight segment. Yes, kalman filter is the aim

  Are you sure? yes | no

alghoooth66 wrote 07/13/2016 at 00:51 point

could u send me a code and its algorithm ,please?

this is my email

  Are you sure? yes | no

ArsenioDev wrote 07/13/2016 at 02:47 point

Again, as stated in my project logs; this is ITAR regulated, cannot share it. Go code it yourself, not too hard since it's taped together from examples and common sense

  Are you sure? yes | no

Aravind wrote 04/28/2016 at 05:53 point

I've a suggestion.Use some solid fuel as it is easier to handle. Liquid fuel spillages can go horribly wrong. here's the link i found useful

  Are you sure? yes | no

ArsenioDev wrote 04/29/2016 at 19:05 point

Not doing liquid fuel for this rocket, solid fuel is the way to go

  Are you sure? yes | no

Aravind wrote 04/28/2016 at 05:48 point

wen will it fly?

Waiting for the moment :D

  Are you sure? yes | no

ArsenioDev wrote 04/29/2016 at 19:04 point

No idea, still need to do preflight certification and testing

  Are you sure? yes | no

zakqwy wrote 07/28/2014 at 16:23 point
I saw your post on Sagar's project ('Guided Rocket'); what issues are you having with servo movement?

  Are you sure? yes | no

ArsenioDev wrote 07/28/2014 at 16:32 point
Well when im using his code the fins initialize a roll vector when i need them to initalize a pitch and yaw vector

  Are you sure? yes | no

zakqwy wrote 07/28/2014 at 17:03 point
During pitch and yaw, I'd imagine you want opposing pairs of servos to move in concert with each other, while a roll vector has all servos turning in the same direction (so fins 180 degrees apart turn opposite directions). Can you try reversing two of your servo outputs?

Post code!

  Are you sure? yes | no

ArsenioDev wrote 07/30/2014 at 17:25 point
I cant post the code as it is ITAR regulated, please verify you are in the Continental US

  Are you sure? yes | no

zakqwy wrote 07/30/2014 at 17:36 point
I am in the continental US (Minneapolis, MN). Can you link to the ITAR regs that prevent sharing this outside the country? I'd like to read through 'em to make sure my project doesn't have any issues.

  Are you sure? yes | no

ArsenioDev wrote 07/30/2014 at 17:37 point
will send them via hangouts

  Are you sure? yes | no

REH wrote 09/21/2015 at 21:37 point

Can I also get in on this? In Seattle myself. Have a link for the hangout?

  Are you sure? yes | no

ArsenioDev wrote 09/22/2015 at 00:32 point

REH,  you can reach me at on hangouts

  Are you sure? yes | no

zakqwy wrote 07/22/2014 at 18:21 point
Excited to see this! I've got tons of questions (as we're facing a lot of the same challenges) but I'll hold off until you have a chance to flesh out the description a bit.

  Are you sure? yes | no

ArsenioDev wrote 07/22/2014 at 21:32 point
do you have a hangouts account?

  Are you sure? yes | no

zakqwy wrote 07/24/2014 at 19:01 point

  Are you sure? yes | no

ArsenioDev wrote 07/30/2014 at 17:25 point
Yeah, google run messaging service. Alternatively skype

  Are you sure? yes | no

zakqwy wrote 07/30/2014 at 17:34 point
Yup, I'm on Google. zachary.fredin is my username.

  Are you sure? yes | no

ArsenioDev wrote 07/30/2014 at 17:36 point

  Are you sure? yes | no

WΛLLTΞCH wrote 07/22/2014 at 01:21 point
Can't wait to see it flying! Keep it up!

  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