Safety first
Model rocket launches run under a club's safety code: in the US, the NAR and Tripoli codes. A range safety officer says when the range is clear, and the launch control officer fires. This course is a simulator lesson. The igniter here is a 6 V lamp, and the fire circuit is low voltage. A real launch box is built and used under your club's code and its range safety officer, and a real igniter is never wired or tested indoors.
The finished box
Every lesson opens on the same wiring:
- The safety key: a slide switch. Its middle pin feeds the relay module's power and A3. Key out, the relay cannot pull in whatever the sketch does: a hardware interlock.
- The arm code: a 4x4 keypad. The code (1969) and # arm the box, A launches, * aborts, C checks continuity and D prints the log.
- The countdown: a TM1637 four digit display that also spells SAFE, ArNd, FIrE, Abrt and GonE.
- The fire relay: a relay module on pin 12. It is not on pin 13 because the bootloader blinks pin 13 at every reset.
- Lamps and sound: a red ARMED lamp, a green CONTINUITY lamp and a buzzer that chirps every two seconds while armed.
- The pad: a 6 V lamp as the igniter, a second slide switch as its clips, and a 6 V battery pack to fire it.
How it works
The igniter hangs off the relay's COM contact. At rest COM sits on NC, which goes to a 4.7k resistor up to 5 V and to A2. So a sense current of 5 V / 4.7k, about 1 mA, flows through the igniter. An igniter is a fraction of an ohm to a few ohms, so A2 reads close to 0 with one in the clips and 1023 without. The line is drawn at 512. One milliamp is hundreds of times less than it takes to heat a bridgewire, so the check can never fire what it checks.
When the relay pulls in, COM leaves NC for NO. The sense circuit drops out completely and the 6 V pack drives the igniter for exactly one second. Sense and fire never share a contact.
The firmware is a state machine: SAFE, KEYED, ARMED, COUNTING, FIRING, WATCHING, LOCKOUT and DONE. Any abort (the abort key, the safety key, or a lost igniter during the count) opens the relay and lands in DONE, and only taking the key out and back in leaves it. After the pulse the box watches continuity for three seconds: open means the igniter is gone (a liftoff), still there means a misfire, and a misfire starts a 60 second lockout, the wait the safety codes ask for before anyone approaches the rocket.
The course
Build a rocket launch controller gets there in six lessons, each a sketch on the same wiring:
- Arming keys: a key and a code, and a key that cuts the relay in hardware.
- Continuity check: 1 mA, a 4.7k resistor and A2.
- Countdown: five seconds on the display, then a one second fire pulse.
- Abort: three ways to stop, each named, and a key cycle to start again.
- Range safety: a self-test, no power-up with the key in, liftoff and misfire, and the 60 second rule.
- Project: a club launch box: run a launch day, fly two rockets, read the log, and make the box your own.
Every step but the last is checked against the running circuit.