Welcome to Team Tejas's CanSat Competition project repository! We are developing a comprehensive satellite system for the American Society for Aerospace Engineers (ASAE) CanSat Competition.
Our CanSat mission involves deploying a satellite system that performs atmospheric data collection, GPS tracking, and controlled descent with dual-parachute deployment. The system features active stabilization using reaction wheels and real-time telemetry transmission to a ground station.
Flight Software (team-tejas-cansat)
- Platform: Teensy 4.1 microcontroller
- Real-time data acquisition from multiple sensors
- Autonomous flight state management with 9 distinct phases
- Active attitude stabilization using reaction wheels with PID control
- Dual-parachute deployment system (primary at apogee, secondary at 500m)
- XBee wireless telemetry at 1Hz minimum transmission rate
- SD card data logging for flight data recovery
- Real-time telemetry reception and visualization via XCTU
- Mission control interface with command capabilities
- XBee point-to-point communication with API mode
- Flight state monitoring and emergency controls
- Post-flight data analysis and reporting
| Component | Model | Purpose |
|---|---|---|
| Microcontroller | Teensy 4.1 | Main flight computer |
| Environmental Sensor | BME280 | Temperature, pressure, humidity |
| IMU | MPU6050 | Attitude determination |
| GPS | TinyGPS++ Compatible | Position tracking |
| Communication | XBee S2C Pro | 2.4GHz telemetry transmission |
| Power Monitor | INA226 | Voltage/current monitoring |
| Air Quality | MQ135 | Atmospheric gas detection |
| Storage | MicroSD | Flight data logging |
| Reaction Wheels | Servo-based | Active attitude control |
| Parachute Deploy | Servo actuator | Dual-stage deployment |
- ✅ 9 Flight States: Boot → Test → Launch Pad → Ascent → Rocket Deploy → Descent → Secondary Deploy → Final Descent → Impact
- ✅ Active Stabilization: Reaction wheel system with PID control and auto-tuning
- ✅ Dual Parachute System: Autonomous primary deployment, controlled secondary deployment
- ✅ Real-time Telemetry: 1Hz minimum data transmission with ground station commands
- ✅ Data Logging: SD card storage meeting competition requirements
- ✅ Safety Systems: Watchdog timers, emergency stops, fail-safe mechanisms
- ✅ Modular Architecture: Clean separation of sensor modules and flight controller
- Requirement 8: SD card data storage ✅
- Requirement 22: Primary descent rate 20 m/s ±5 m/s ✅
- Requirement 23: Secondary descent rate 1-3 m/s ✅
- Requirement 31: Ground station telemetry control ✅
- Requirement 34: Start/stop telemetry commands ✅
- Requirement 35: Remote sensor calibration ✅
- Requirement 41: Flight state identification ✅
- Requirement 42: 1Hz minimum telemetry rate ✅
- PlatformIO for embedded development
- Visual Studio Code with PlatformIO extension
- Teensy 4.1 board with required sensors
- XCTU for XBee configuration
git clone https://github.com/cansat-team-tejas/flight-software.git
cd team-tejas
# Open in VS Code with PlatformIO extension
# Build and upload to Teensy 4.1
platformio run --target uploadUse XCTU to configure XBee modules:
CanSat XBee (End Device):
ID (PAN ID): 1234
CE (Coordinator Enable): 0
JV (Channel Verification): 1
DH (Dest Address High): [GCS XBee SH]
DL (Dest Address Low): [GCS XBee SL]
AP (API Enable): 1 (API Mode)
BD (Baud Rate): 3 (9600)
Ground Station XBee (Coordinator):
ID (PAN ID): 1234
CE (Coordinator Enable): 1
JV (Channel Verification): 1
DH (Dest Address High): [CanSat XBee SH]
DL (Dest Address Low): [CanSat XBee SL]
AP (API Enable): 1 (API Mode)
BD (Baud Rate): 3 (9600)
TEAM_ID,MISSION_TIME,PACKET_COUNT,ALTITUDE,PRESSURE,TEMP,VOLTAGE,
GPS_TIME,GPS_LAT,GPS_LON,GPS_ALT,GPS_SATS,ACCEL_X,ACCEL_Y,ACCEL_Z,
GYRO_X,GYRO_Y,GYRO_Z,ROLL,PITCH,YAW,GYRO_SPIN_RATE,FLIGHT_STATE,
ROLL_WHEEL_OUTPUT,PITCH_WHEEL_OUTPUT,STAB_STATUS,CURRENT,POWER
48-byte binary packets converted to 96-character hex strings for efficient transmission.
BINARY_MODE_ON- Switch to binary telemetryBINARY_MODE_OFF- Switch to CSV telemetrySET_GYRO_BIAS- Calibrate gyroscopeARM_SYSTEM- Arm reaction wheel systemDISARM_SYSTEM- Disarm reaction wheel systemREQ_STATUS- Request current status
team-tejas-cansat/
├── lib/
│ ├── air_quality/ # MQ135 air quality sensor
│ ├── communication/ # XBee communication module
│ ├── constants/ # System-wide constants
│ ├── environment/ # BME280 environmental sensor
│ ├── flight_controller/ # Main flight state machine
│ ├── gps/ # GPS module interface
│ ├── imu/ # MPU6050 IMU integration
│ ├── log/ # Logging system
│ ├── parachute/ # Servo parachute deployment
│ ├── power_monitor/ # INA226 power monitoring
│ ├── reaction_wheels/ # Active stabilization system
│ ├── storage/ # SD card logging
│ └── telemetry/ # Telemetry data management
├── src/
│ └── main.cpp # Main application entry point
├── platformio.ini # PlatformIO configuration
├── WIRING_DIAGRAM.md # Hardware connections
├── IMPLEMENTATION_SUMMARY.md # Technical details
└── CLEANUP_SUMMARY.md # Code optimization notes
Team Lead: Sagar Gujarathi (@sagargujarathi)
- Flight Software Team: Embedded systems development and sensor integration
- Ground Station Team: Mission control and telemetry visualization
- Hardware Integration Team: PCB design and system integration
- Mission Operations Team: Flight planning and test execution
- Individual sensor modules completed
- Flight state machine implemented
- Reaction wheel stabilization system
- XBee communication protocol (API mode)
- Modular flight controller architecture
- SD card logging system
- Telemetry data formatting (CSV & Binary)
- Ground station communication
- Full system integration testing
- Flight qualification testing
- Competition readiness verification
- Modular Architecture: Created dedicated FlightController module
- Memory Optimization: Removed unused libraries and constants
- Clean Codebase: Eliminated redundant code and improved consistency
- XBee Integration: Point-to-point API mode communication
- Telemetry Enhancement: Dual-format data transmission
class FlightController {
bool validateStateTransition(uint8_t current, uint8_t next);
void updateFlightState();
void handleEmergencyConditions();
// Full state management with safety checks
};- CSV Format: Human-readable competition standard
- Binary Format: Efficient 48-byte packets with hex encoding
- Queue Management: Buffered transmission with overflow protection
- Dual Mode: Switchable between formats via ground commands
- Point-to-Point: Direct addressing, no broadcast
- API Mode: Frame-based communication with delivery confirmation
- Bidirectional: Command reception and telemetry transmission
- Error Handling: TX status monitoring and retry mechanisms
- Wiring Diagram - Complete hardware connections
- Implementation Summary - Technical details
- Cleanup Summary - Code optimization notes
- Hardware integration guides and test procedures
We welcome contributions from team members and collaborators:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow modular architecture patterns
- Include comprehensive error handling
- Add appropriate logging for debugging
- Test individual modules before integration
- Document hardware connections and configurations
Latest Build Status: ✅ SUCCESS
- Memory Usage: FLASH: 149KB, RAM1: 175KB, RAM2: 12KB
- Available Memory: FLASH: 7.9MB free, RAM1: 332KB free, RAM2: 511KB free
- Platform: Teensy 4.1 (600MHz ARM Cortex-M7)
- Framework: Arduino with PlatformIO
This project is licensed under the MIT License - see the LICENSE file for details.
For technical support or questions:
- Create an issue in this repository
- Contact: @sagargujarathi
- Check documentation for troubleshooting guides
- Deploy and operate a CanSat system meeting all competition requirements
- Demonstrate autonomous flight state management
- Achieve reliable telemetry transmission throughout flight
- Recover flight data for post-mission analysis
- Validate reaction wheel stabilization system
- Test dual-parachute deployment mechanism
- Demonstrate real-time ground station control
- Achieve competition-compliant descent rates
Team Tejas | CanSat Competition 2025 | Engineering Excellence in Aerospace 🚀
Repository: github.com/sagargujarathi/team-tejas | Branch: feature/optimizations