A robust Arduino-based control system for combat robots or RC vehicles. This project utilizes the iBUS protocol for low-latency digital communication and Cytron Motor Drivers for high-current motor control.
- iBUS Digital Input: High-precision control using the FlySky iBUS protocol (up to 6 channels).
- Differential Steering: Smooth mixed-drive logic for forward, backward, and turning maneuvers.
- Weapon System: Dedicated control for a weapon motor with speed mapping and direction inversion.
- Dual Speed Modes: Toggle between 100% (High) and 75% (Precision) speed via RC switch.
- Safety Kill Switch: Integrated software-level safety that kills all motors and ESCs if the signal is lost or a specific switch is toggled.
- Quick-Turn Macros: Dedicated 180-degree rotation functions for tactical maneuvering.
| Component | Description |
|---|---|
| Microcontroller | Arduino Mega / Uno (Serial1 capable board recommended) |
| RC Receiver | FlySky iA6B or similar (iBUS compatible) |
| Motor Drivers | 3x Cytron Motor Driver (PWM/DIR mode) |
| Drive Motors | 2x DC Brushed Motors (Left/Right) |
| Weapon Motor | 1x DC Brushed Motor |
| Driver | Arduino PWM Pin | Arduino DIR Pin | Function |
|---|---|---|---|
| Motor 1 | 3 | 4 | Left Drive |
| Motor 2 | 5 | 6 | Right Drive |
| Motor W | 11 | 12 | Weapon Motor |
- iBUS RX: Connected to Serial1 RX
- ESC 1: Pin 8 (Optional/Auxiliary)
- ESC 2: Pin 9 (Optional/Auxiliary)
The code is mapped to standard 6-channel RC transmitters:
- Channel 1: Forward/Reverse (Y-Axis)
- Channel 2: Steering Left/Right (X-Axis)
- Channel 3: Weapon Speed Control (Throttle)
- Channel 4: 180° Macro (Left/Right snap turns)
- Channel 5: Mode/Safety Switch
> 1725: Full Speed Mode1500: 75% Speed Mode< 1250: KILL SYSTEM (All motors stop)
- Channel 6: Weapon Direction Invert
- Library Installation: Open the Arduino Library Manager and install:
IBusBMCytronMotorDriverServo
- Wiring: Ensure the GND of your battery, Arduino, and Motor Drivers are all connected.
- Calibration: * Check the
motorabiasandmotorbbiasvariables in the code if your robot drifts to one side.- Ensure your Transmitter is set to output iBUS rather than PPM or PWM.
This code includes a KILL() function. Always test the robot on a stand (wheels off the ground) when first powering on. The weapon system is mapped to Channel 3; ensure your throttle is at the lowest position before turning on the robot.