Go Down

Topic: rocket guidance by arduino (Read 3575 times) previous topic - next topic


Feb 28, 2015, 06:29 pm Last Edit: Mar 01, 2015, 02:54 pm by leo72
Hi to all of you.
I'm from Italy.
I'm trying to build a little guidance device for my rocket model.
The idea is take analog data output from a 7361L accelerometer, convert millivolt to degrees and write them to one or more servo.
For example: if my rocket goes 20 degrees on the left, the servo will rotate fins 20 degrees in the opposite direction.

Here it is my sketch draft. Many Thanks in advance to all who help me in this project:
Code: [Select]

#include <Servo.h>
Servo myservo;
//Ingressi analogici di Arduino
const int xPin = A0;
const int yPin = A1;
const int zPin = A2;

//Valori massimo e minimo dell'accelerometro
//utilizzato e quindi da modificare se necessario
int minVal = 850;
int maxVal = 2450;

//Variabili che contengono il valore attuale
double x;
double y;
double z;

void setup() {
Serial.begin(9600); //VISUALIZZAZIONE VALORI
  Serial.println("Setup MMA7361L");

  myservo.attach(7); //pin di controllo
void loop() {
//Lettura valori di tensione forniti dal sensore
  int xRead = analogRead(xPin);
  int yRead = analogRead(yPin);
  int zRead = analogRead(zPin);
  //Conversione dei valori letti in gradi
  int xAng = map(xRead, minVal, maxVal, -90, 90);
  int yAng = map(yRead, minVal, maxVal, -90, 90);
  int zAng = map(zRead, minVal, maxVal, -90, 90);
  //Visualizzo i valori
  Serial.print("x: ");
   Serial.print(" | y: ");
   Serial.print(" | z: ");


EDIT BY MOD: added code tags


Be very, very careful.
Many jurisdictions forbid guidance of rockets.

Please use code tags when posting code.


Many thanks, I knew this...altough I'm a lawyer..
Anyway, this is not a guidance system, but a stabilization system.
I won't be able to guide the rocket, but only to make it rise vertically.

What are "code tags"? Many thanks in advance for your help.



Mar 01, 2015, 01:52 pm Last Edit: Mar 01, 2015, 02:39 pm by AWOL
As a lawyer, you should know to always read the small-print


It's an interesting idea, but I think that you will need a fast control loop to get useful stabilisation. A typical model rocket reaches a peak speed of about 120 m/s, or 260 mph. Put another way, that is 1 meter in about 8 ms.

If you are new to control theory, I would find something to practice with that is less demanding than a model rocket.
Please ask questions in the forum so everyone can benefit. PM me for paid work.


Thanks...we lawyers write the small print clauses, never read them  :P

Anyway...I've found differents projects online to stabilize the rocket fly, but I prefer a new one made by myself.

Responding to bobcousins, I understend what are you talking about, but I'd like to try this.
So, if someone has notes or suggestions, I'll be very gratefull.....



Then there's the issue of "plausible deniability".
Calling the thread "rocket guidance by arduino" is not going to go well with the judge.


Italian laws about penal courts are a little different....Italian criminal laws are different too.
Talking about a thing IS NOT making the thing.  :smiley-wink:
I'm not going to build a guidance system, but only a rudimental stabilization system. For a flying model.
I've been looking for a while and I've not found anything about this kind of project. However, it's hard to define this: "war ammo" or think this could carry a warhead.
I think, for example, is more dangerous talking about sugar self made propellants. They are explosives, for italian laws.

Anyway...some suggestion about the project?



Anyway...some suggestion about the project?
I'd start by getting some flight surface actuators, and measuring the latency.
I don't think an R/C sevro is going to be reponsive enough.

On the Web, it used to be possible to find papers and manuals about control rules for stuff like TOW missiles.
Although these are man-in-the-loop guidance, I think the description of the gas-powered control surfaces is informative.
(One paper describes the launch sequence - I just love the use of squibs for everything from melting the electrolyte in the flight battery, to blowing off the valve of the nitrogen bottle to spin up the gyro)


Small rockets probably won't be able to support the weight of a guidance system. Just put a stabalizing stick on the rocket, like a skyrocket.

What are "code tags"? Many thanks in advance for your help.
#7 below:

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Thanks to all. I'll try to post a different topic in the appropriate section to work on servo movement driven by accelerometer. One step before...


Remember that standard R/C servos have an update rate of only 50Hz.
You'll probably want to be looking at more responsive digital servos.

Go Up