This project implements a Rover Robot capable of traversing uneven terrain using:
- Dynamic suspension control with servo motors
- IMU (MPU6050) for pitch/roll stabilization
- ToF Sensors (VL53L5CX via TCA9548A I²C multiplexer) for terrain profiling
- ESP32 (Arduino IDE + FreeRTOS) as the controller
The system ensures stable movement over rocky or sloped surfaces by adapting suspension angles in real-time.
- Multi-mode terrain handling:
- Flat Mode → stiff control for smooth surfaces
- Rocky Mode → adaptive compliance for bumpy terrain
- Step Mode → aggressive leveling for obstacles
- PID control with limits & smooth transitions
- Automatic mode switching based on IMU + VL53L5CX sensors
- Fail-safe: stop or revert to safe posture if tipping or sensor failure is detected
- Modular FreeRTOS-based firmware for scalability
- ESP32-WROOM / ESP32-S3
- MPU6050 IMU
- VL53L5CX ToF sensor(s) (via TCA9548A I²C multiplexer)
- Servos (suspension adjustment)
- Rover chassis with 4-wheel suspension
/src
├── images/
| ├── block_diagram.svg
| └── Servo_Suspension_System.jpg
|
├── main.ino # FreeRTOS task creation & system entry
├── config.h # Pins & constants
├── imu.cpp/.h # IMU reading (pitch/roll)
├── control.cpp/.h # PID control & suspension servo outputs
├── modes.cpp/.h # Terrain mode manager
├── vl53_manager.cpp/.h # VL53L5CX ToF management via TCA9548A
└── actuators.cpp/.h # Actuators (Servo Motors) control
+-----------------------------+
| TCA9548A (I2C) |
| (I2C Mux @ 0x70) |
+----+----+----+----+----+----+
| | | | |
MPU6050 (CH0) <-----------+ | | | +----> VL53_RR (CH4)
| | +----> VL53_RL (CH3)
| +----> VL53_FR (CH2)
+----> VL53_FL (CH1)
+---------------------------------------------------------------+
| ESP32 (FreeRTOS) |
| |
| |
| IMU Task ---> reads MPU6050 |
| VL53 Task ---> cycles mux & reads VL53 devices |
| Control Task ---> PID (pitch & roll) & Mode Manager |
| Actuator Task ---> LEDC PWM outputs to servos (GPIO16..19) |
| Safety Task ---> tilt detection, actuator monitoring |
| Telemetry ---> Serial/Wi-Fi: pitch, roll, PID output, ToF |
| |
+---------------------------------------------------------------+
Power:
- Battery -> Servo rail (5-7.4V)
- Battery -> 3.3V regulator -> ESP32 + sensors
Telemetry/UI:
- UART0 (Serial) or Wi-Fi web UI / REST endpoint for live tuning
-
Clone repository:
git clone https://github.com/<your-username>/rover-robot-suspension.git
-
Open in Arduino IDE or PlatformIO.
-
Install required libraries:
-
ESP32 board package
-
Compile & upload to ESP32.
-
Test track: gravel, sand, small steps
-
Load test: measure max weight before suspension loses stability
-
Telemetry: observe PID outputs, IMU angles, ToF maps
-
Machine learning for adaptive terrain classification
-
LIDAR-based 3D mapping
-
Remote monitoring dashboard via Wi-Fi
This project is licensed under the MIT License. wasarwad.raj@gmail.com
