Luke's totally awesome, over engineered, completely silly, and ridiculous Arduino-based model rocket launch controller designed for maximum fun, safety, reliability, and pure rocket-launching joy! This project combines simple electronics with some safety features to create a launch system suitable for both educational and recreational rocketry.
To be clear - this is for an awesome 11-year-old that loves rockets and micro-electronics and a nerdy dad that wants to empower and support him in every way possible. Because nothing says "I love you" like helping your kid build something that can launch rockets into the sky! 🚀💕
Watch the controller in action! The simulation shows the complete launch sequence from startup to ignition.
- Multi-stage safety system with ARM/DISARM toggle switch (because we're not savages!)
- Hold-to-launch mechanism requiring sustained button press (5 seconds of pure anticipation!)
- Automatic cooldown period after launch (cool down time for the electronics AND the excitement)
- Fault detection with system lockout capabilities (the Arduino equivalent of "you had one job!")
- Emergency abort functionality (for when things get too exciting)
- 16x2 LCD display showing real-time status and countdown (because watching numbers count down is half the fun!)
- Three status LEDs: READY (green), ARMED (green), LAUNCH (green) - like a traffic light for rockets!
- Audible feedback with buzzer tones for different states (beep beep, we're going to space!)
- Tactile buttons for RESET and LAUNCH operations (satisfying button clicks included)
- ARM toggle switch for system activation (the big red switch that makes you feel like a NASA engineer)
- 18V Milwaukee drill battery power supply for extended operation (no more dead AAs ruining launch day!)
- Relay-based ignition system for reliable rocket motor ignition (the satisfying click of success)
- Robust debouncing on all input switches (because button bouncing is so 1990s)
- State machine architecture for predictable operation (like a well-behaved robot butler)
- Comprehensive error handling and recovery (because even rockets have bad days)
- Microcontroller: Arduino UNO (ATmega328P) - the classic that started it all!
- Operating Voltage: 18V (via power supply circuit), stepped down to 5V and 12V rails (voltage regulation magic!)
- Display: 16x2 LCD in 4-bit mode (because 8-bit is so mainstream)
- Relay Output: 12V relay with NPN driver circuit (transistor magic for the win!)
- Input Protection: Pull-up resistors and debouncing (keeping those inputs clean and happy)
- Audio Output: Passive buzzer with tone generation (beep beep, rocket noises!)
- STARTUP: System performs mostly fake and fun comprehensive self-checks (20 safety checks that make you feel like you're launching the Space Shuttle!)
- READY: System ready, disarmed state (the calm before the storm)
- ARMED: ARM switch engaged, system ready for launch (things just got real!)
- COUNTDOWN: LAUNCH button held, 5-second countdown begins (5... 4... 3... 2... 1... LIFTOFF!)
- LAUNCHING: Relay energized, ignition circuit active (5 seconds of pure rocket magic)
- COOLDOWN: Post-launch safety period (5 seconds to catch your breath and plan the next launch)
- FAULT: System returns to safe state requiring reset (because even rockets need a timeout sometimes)
- Interlock Protection: ARM switch must remain engaged during countdown (no accidental launches on our watch!)
- Button Hold Requirement: LAUNCH button must be held for full duration (commitment is key in rocketry)
- Automatic Relay Shutoff: Relay automatically deactivates after launch (the Arduino equivalent of "mission accomplished")
- Fault Recovery: Requires disarm + reset hold (2.5 seconds) to clear faults (timeout corner for misbehaving electronics)
- Arduino UNO R3
- 16x2 LCD Display (HD44780 compatible)
- 12V SPDT Relay
- NPN Transistor (2N2222 or similar)
- Passive Buzzer
- Status LEDs (3x Green)
- ARM Toggle Switch (SPDT)
- RESET Push Button (momentary)
- LAUNCH Push Button (momentary)
- 18V Power Supply Circuit
- Flyback Diode Protection
- Current Limiting Resistors
- Ground Isolation
The controller uses a state machine with the following states (think of it as the Arduino's personality):
STARTUP: System initialization and self-check (the morning routine)SPLASH: Welcome screen display (the friendly greeting)READY: Disarmed, ready state (waiting for action)ARMED: Armed, waiting for launch (locked and loaded!)LAUNCH_COUNTDOWN: Countdown timer active (the moment of truth)LAUNCHING: Ignition circuit active (we have liftoff!)COOLDOWN: Post-launch safety period (cooling down the excitement)ABORT: Launch aborted (better safe than sorry)FAULT: System fault detected (uh oh, time for a reset)
- Bounce2: Advanced button debouncing
- LiquidCrystal: LCD display control
- Arduino Core: Standard Arduino functionality
We've refactored the code for better maintainability and testing:
RocketController: Core state machine logic (the brains)ArduinoInterface: Hardware abstraction layer (the interface)RealArduinoInterface: Arduino-specific implementationMockArduinoInterface: Test environment implementation
The project now includes comprehensive unit testing:
- Unity Framework: Industry-standard C++ testing
- Mock Hardware: Test logic without physical hardware
- Automated Testing: Run tests with
make test - Test Coverage: Core functionality thoroughly tested
- Chirp: System startup and status changes (the friendly "hello" beep)
- Armed Tone: Continuous armed state indication (the "ready to rock" sound)
- Countdown Siren: Alternating tones during countdown (the "get ready for liftoff" alarm)
- Launch Sound: Single tone during ignition (the "we have liftoff!" celebration)
- Abort Sound: Low-frequency error indication (the "oops" sound)
- Fault Sound: Continuous fault indication (the "something's not right" alert)
- Arduino IDE or PlatformIO (your coding playground)
- SimulIDE (for simulation - test before you test!)
- Basic electronics knowledge (or a willingness to learn and make magic smoke)
- 3D printer (for case components - because custom cases are cool)
-
Clone this repository:
git clone https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher.git cd Lukes-Rocket-Launcher -
Open the project in PlatformIO:
code RocketLauncher/
-
Install dependencies:
pio lib install "arduino-libraries/LiquidCrystal" pio lib install "thomasfredericks/Bounce2"
This project now supports multiple Arduino boards, allowing you to choose your target hardware:
- Arduino UNO R3 (ATmega328P) - Classic Arduino compatibility
- Arduino UNO R4 Minima (Renesas RA4M1) - Modern 32-bit ARM architecture
- Simulation Environment - Safe testing without hardware
# Select your target board interactively
./scripts/build.sh configure
# Change board selection anytime
./scripts/build.sh board
# Quick board selection by name
./scripts/build.sh board uno_hw # Arduino UNO R3
./scripts/build.sh board uno_r4_minima # Arduino UNO R4 Minima
./scripts/build.sh board simulide # Simulation
# Show current board
./scripts/build.sh status# After selecting board with ./scripts/build.sh configure:
./scripts/build.sh firmware # Builds for selected board
./scripts/build.sh upload # Uploads to selected board
./scripts/build.sh monitor # Monitors selected board
# All commands automatically use your selected board✅ Easy Board Switching - Interactive selection during configuration
✅ Persistent Configuration - Board selection saved in config file
✅ Identical Functionality - Your rocket controller works the same on all boards
✅ Future-Proof - Support for both classic and modern Arduino hardware
✅ Safe Development - Test in simulation before using real hardware
✅ Professional Workflow - Industry-standard multi-platform development
./scripts/build.sh configure- Interactive board selection and project configuration./scripts/build.sh board- Change board selection anytimeMULTI_BOARD_TESTING.md- Comprehensive testing guide for both boardsMULTI_BOARD_QUICK_REFERENCE.md- Quick reference for daily development- Enhanced build script - Board-aware building, uploading, and monitoring
# 1. Start with simulation (safe testing)
./scripts/build.sh configure # Select simulide
./scripts/build.sh sim
# 2. Test on UNO R3 (classic hardware)
./scripts/build.sh board uno_hw
./scripts/build.sh firmware
./scripts/build.sh upload
./scripts/build.sh monitor
# 3. Test on UNO R4 Minima (modern hardware)
./scripts/build.sh board uno_r4_minima
./scripts/build.sh firmware
./scripts/build.sh upload
./scripts/build.sh monitor
# 4. Compare behavior across platforms
# All boards should provide identical functionalityThis approach ensures your rocket controller works reliably on both classic and modern Arduino hardware!
- Configure and select board:
./scripts/build.sh configure - Build and test:
./scripts/build.sh firmware - Verify functionality:
./scripts/build.sh uploadand./scripts/build.sh monitor - Change boards anytime:
./scripts/build.sh board uno_hwfor new selection
This multi-board support ensures your rocket controller works reliably whether you're using classic Arduino hardware or modern ARM architecture!
The project now includes a comprehensive build system with automated testing and simulation!
# 🚀 Build and launch simulator (recommended for development)
./scripts/build.sh sim
# 🧪 Run unit tests
./scripts/build.sh test
# 🔧 Build everything (tests + CMake + PlatformIO)
./scripts/build.sh
# 🎮 Build simulation firmware only
./scripts/build.sh firmware-sim
# ⚡ Build hardware firmware only
./scripts/build.sh firmware-hw
# 📤 Upload to Arduino (uses current board selection)
./scripts/build.sh upload
# 📡 Monitor serial output (uses current board selection)
./scripts/build.sh monitor
# 🎨 Format code
./scripts/build.sh format
# 🧹 Clean build files
./scripts/build.sh clean
# ❓ Show all available commands
./scripts/build.sh helpWhy the new build system? We've added comprehensive unit testing, automated builds, and multi-board support to ensure reliability and make development easier across different Arduino platforms!
- 🚀 One Command:
./scripts/build.sh simbuilds and launches simulator - 🧪 Quality Assurance: Tests run automatically before builds
- 🔧 Multiple Targets: Build for simulation, hardware, or both
- 🎮 Simulator Integration: Automatic SimulIDE launch with firmware loading
- 📱 Cross-Platform: Works on macOS, Linux, and Windows
- 🎨 Code Quality: Automatic formatting and style checking
- 📊 Status Monitoring: Easy to see what's working and what needs attention
- 🎯 Multi-Board Support: Easy switching between Arduino UNO R3, UNO R4 Minima, and simulation
- Start with simulation - Test safely without hardware
- Test on UNO R3 - Verify classic Arduino compatibility
- Test on UNO R4 Minima - Verify modern ARM compatibility
- Compare behavior - Ensure identical functionality across platforms
This approach ensures your rocket controller works reliably on both classic and modern Arduino hardware!
The project includes SimulIDE simulation files with automatic launch:
- One command:
./scripts/build.sh simbuilds and launches SimulIDE - Auto-loading: Firmware automatically loads from the build output
- Wiring files: Use
wiring/rocker_launcher_controls.sim1for testing - Fast iteration: Make changes, re-run script, test immediately
- Test all functionality before building hardware (because debugging with real rockets is expensive!)
The controller is designed to be housed in a waterproof travel case (Pelican-style) with:
- Waterproof enclosure for outdoor use (because rockets don't care about weather)
- Integrated mounting for all components (everything has its place)
- Cable management and strain relief (no spaghetti wiring here!)
- Ventilation for electronics cooling (keeping your Arduino cool under pressure)
- Print all case components
- Mount Arduino and LCD display
- Install switches and LEDs
- Wire relay and power circuits
- Test all connections
- Secure in waterproof case
- System self-check completed successfully
- ARM switch in DISARM position
- All personnel clear of launch area
- Rocket properly secured on launch pad
- Ignition leads properly connected
- Weather conditions suitable for launch
- ARM the system using the toggle switch
- Verify ARMED LED is illuminated
- Hold LAUNCH button for full 5-second countdown
- Maintain ARM switch engagement throughout launch
- Wait for system to complete cooldown period
- Immediate Abort: Release LAUNCH button
- System Fault: Disarm and hold RESET for 2.5 seconds
- Power Loss: Disconnect battery immediately
- Component Failure: Do not attempt launch
The project includes a comprehensive test suite:
- ✅ 3 out of 4 tests passing (75% success rate)
- ✅ Core functionality tested: State management, button handling, manual state transitions
- 🔍 1 test under investigation: Startup transition logic
- 🧪 Test framework: Unity-based unit testing with mock hardware
Run tests: ./scripts/build.sh test from the code/RocketLauncher/ directory
Lukes-Rocket-Launcher/
├── code/RocketLauncher/ # Main Arduino project
│ ├── src/ # Source files
│ │ ├── main.cpp # Arduino entry point
│ │ ├── RocketController.cpp # Core state machine logic
│ │ ├── RocketController.h # Controller interface
│ │ └── ArduinoInterface.h # Hardware abstraction layer
│ ├── test/ # Unit tests
│ │ └── test_rocket_controller.cpp
│ ├── platformio.ini # Build configuration
│ └── Makefile # Build automation
├── wiring/ # Circuit diagrams & simulation
│ ├── rocker_launcher_controls.sim1
│ └── rocker_launcher_controls_v0.1.sim1
├── docs/ # Documentation & media
│ ├── screen-1.png # Circuit screenshot
│ └── clip-1.mp4 # Simulation demo
├── prints/ # 3D printing files
└── README.md # This file
The complete circuit diagram is available in the docs/ folder, showing:
- Arduino pin connections
- Relay driver circuit
- LCD interface wiring
- LED and switch connections
- Power supply layout
The project now follows industry best practices:
- Automated Testing: Every build runs comprehensive tests
- Code Quality: Enforced with
.clang-formatand.clang-tidy - Build Automation: Professional Makefile with multiple targets
- Continuous Integration: GitHub Actions automatically build and test on every push
- Multi-Platform Support: Builds run on Ubuntu, Windows, and macOS
- Release Automation: GitHub releases automatically package firmware files
- Formatting: 3-space indentation, Allman braces, 100-char line limit
- Style: Left pointer alignment, aligned declarations
- Quality: Braces around all statements, comprehensive error checking
- Documentation: Clear interfaces and comprehensive testing
We welcome contributions to improve the rocket launch controller! Areas for enhancement include:
- Enhanced testing coverage (expand unit tests)
- Additional safety features (current sensing, motor detection)
- Enhanced user interface (better LCD layouts, more feedback)
- Power management improvements (battery monitoring, low-power modes)
- Case design optimizations (better ergonomics, more mounting options)
- Documentation improvements (tutorials, troubleshooting guides)
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
./scripts/build.sh test(must pass) - Test in simulator:
./scripts/build.sh sim(verify functionality) - Build everything:
./scripts/build.sh(tests + builds) - Format code:
./scripts/build.sh format(maintains style) - Test thoroughly (simulation + hardware)
- Submit a pull request
Testing Requirements: All new features must include unit tests. The test suite must pass before merging.
This project is designed for fun and recreational use with model rockets. Users are responsible for:
- Safe operation and following all safety guidelines
- Proper rocket motor selection and installation
- Launch site safety and clearance requirements
- Weather conditions and launch timing
- Local regulations and permits if required
The authors assume no liability for misuse or accidents related to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
- Luke - For the original concept and requirements
- Arduino Community - For the excellent development platform
- SimulIDE Team - For the simulation environment
- Open Source Contributors - For the libraries and tools used
🚀 Ready to launch? Build safely and enjoy the journey!
For questions, issues, or contributions, please open an issue or pull request on GitHub.
