My Cart

Arduino Rocket Launch ControllerApril 22, 2012

Here comes a nice hack to have a Rocket Launch Controller based in Arduino. You can build it with a lamp, a 7 segment display, a case, some switches, a button and the missile switch cover. Try it and share it!!

The schematic:

Here is the code:

This code was used in the simulator.

The final code use the NewSoftSerial library to avoid the “garbage” produced in the serial display during the sketch download.

Syntax Highlighter will be add in the future….

/*LauncherSim03

Arduining.com

3 JAN 2012

ROCKET LAUNCHER CONTROLLER.(version for Proteus Sim)

-A down-count TIMER is implemented.

-Using a potentiometer to set the TIMER.

-Two Push-Buttons, To “ARM” the launch and to “GO” the down-counter.

-Using the Sparkfun’s Serial 4 Digit 7-Segment Display. COM-09766 (RED)

-Connect the first leftmost pin to ground, the second pin to VCC (+5V)

and the rightmost pin to the TX pin of Arduino.

*/

#define FuseTIME      1500  //Fuse current duration in milliseconds.

#define Fuss     7          //Pin connected to the Fuse relay.

#define BuzzPin  12         //Connected to the Buzzer or speaker.

#define ArmButt  9          //Pin connected to the ARM button.

#define GoButt   8          //Pin connected to the GO button.

#define SetPot   0          //Analog Pin connected to the Pot.

void setup(){

pinMode(ArmButt, INPUT);        // set “ARM” button pin to input

pinMode(GoButt, INPUT);         // set “GO” button pin to input

digitalWrite(ArmButt, HIGH);    // turn on pullup resistor

digitalWrite(GoButt, HIGH);     // turn on pullup resistor

Serial.begin(9600);

delay(10);                      //Wait for Serial Display startup.

Serial.print(“v”);        //Reset the display.

//  Serial.print(“z”);        //Brightness Control.(not used in the Simulator)

//  Serial.print(0×40,BYTE);  //3/4 Intensity.(not used in the Simulator)

//  Serial.print(“w”);        //Decimal Point Control.(not used in the Simulator)

//  Serial.print(0×10,BYTE);  //turn on the colon “:”.(not used in the Simulator)

}

int  DownCntr;                    // down counter (1/10 Secs.)

int  Go=0;                        // 0=Stopped, 1=Running

//================================================================

void loop(){

if(!digitalRead(GoButt)||!digitalRead(ArmButt)){

Go=0;                         //ABORT!!!

tone(BuzzPin, 440, 1500);

delay(1500);

}

if(Go==0){

WaitARM();

WaitGO();

}

ShowTimer();

if (DownCntr > 50){

if (DownCntr % 10 ==0)tone(BuzzPin, 1000, 50);  //Tone every second.

}

else if (DownCntr % 2 ==0)tone(BuzzPin, 1000, 50);  //Tone every 1/5 second.

if (DownCntr ==0){

//—————— ROCKET LAUNCH! ——————–

tone(BuzzPin, 440, FuseTIME);  //Launch audible signal

digitalWrite(Fuss,HIGH);       //CLOSE the fuse circuit

delay(FuseTIME);

digitalWrite(Fuss,LOW);        //OPEN the fuse circuit.

//——————————————————

Go=0;

}

while (millis()% 100);        //Wait until the next 1/10 of second.

delay(50);

DownCntr–;

}

//—————————————-

void WaitGO(){

ShowTimer();

while(digitalRead(GoButt));

Go=1;

delay(20);

while(!digitalRead(GoButt));  //Debounce GO button.

}

//——————————————————

void ReadTimer(){

DownCntr = map(analogRead(SetPot), 0, 1023, 5, 60);

DownCntr*=10;

}

//——————————————————

void ShowTimer(){

String seconds = String (DownCntr, DEC);

while(seconds.length()<3)seconds= “0″ + seconds;     //format to 3 numbers.

Serial.print(seconds);                         //Write to Display.

Serial.print(” “);                             //Last digit off.

}

//——————————————————

void WaitARM(){

while(digitalRead(ArmButt)==1){

ReadTimer();

Serial.print(“    “);    //Turn Off Digits.

delay(50);

ReadTimer();

ShowTimer();                   //Show Digits.

delay(150);

}

Go=0;

ShowTimer();

tone(BuzzPin, 2000, 150);

delay(200);

tone(BuzzPin, 2000, 150);

delay(200);

tone(BuzzPin, 2000, 150);

delay(20);

while(!digitalRead(ArmButt));  //Debounce ARM button.

}

Having fun:

Before the yellow spray painting…


Some effort was needed to find the actual parts.( RadioShack, OfficeMax, Sparkfun, HomeDepot…)


Was difficult to organize all the parts, a bigger enclosure is recommended.

Via and Source: Arduining

2 thoughts on “Arduino Rocket Launch Controller”

  • Chris

    Is the LED shown lighting up when the unit is turned on the LED in the Schematic as the ignitor OK LED?

    It's my plan to build a couple of these for the Cub Scouts.

    Reply
Leave a Reply