Spring 2025 Arapahoe Community College Robotics Club - rover project
This project implements a rover system designed for sand dune environments. The system consists of:
- An Arduino-controlled Rover with DC motors, servo steering, IMU sensors, and LIDAR
- A Raspberry Pi Controller that interfaces with sensors and communicates with the Arduino
The rover consists of:
- Arduino controller with SoftPWM for motor control
- 2 DC motor channels for differential drive
- 2 Servo channels for wheel steering
- I2C bus for sensor communication
The sensor system includes:
- MPU6050 IMU (Accelerometer/Gyroscope) connected via I2C
- LIDAR sensor connected via serial port for distance measurement
- UART connection between Raspberry Pi and Arduino for commands
- Movement Control: Forward, backward, left, right, stop, and active braking
- Precision Steering: Servo-controlled wheel direction with configurable angles
- IMU Data: Real-time acceleration and gyroscope data collection
- Motion Detection: Algorithms to detect significant movement changes
- LIDAR Scanning: Collects distance measurements across 360° rotation
- Data Processing: Converts LIDAR polar coordinates to Cartesian
- Data Logging: Records LIDAR measurements to timestamped files
-
DC Motor States:
- Forward: IN1=HIGH, IN2=LOW
- Reverse: IN1=LOW, IN2=HIGH
- Brake: IN1=HIGH, IN2=HIGH
- Coast: IN1=LOW, IN2=LOW
-
Servo Control:
- Straight position: 45 degrees (configurable)
- Turn margin: 45 degrees (configurable)
The rover accepts the following UART commands:
- f: Move forward
- b: Move backward
- l: Turn left
- r: Turn right
- s: Stop motors (coast)
- t: Brake motors (active stop)
- w: Start writing LIDAR data
- e: End writing LIDAR data
- q: Quit controller program
- Measures acceleration and angular velocity in 3 axes
- Detects movement with configurable thresholds
- Provides data in physical units (g for acceleration, degrees/s for rotation)
- Rotational scanner providing 360° distance measurements
- Data provided in polar format (angle, distance, intensity)
- Converts to Cartesian coordinates (x, y)
- Outputs timestamped data for analysis and mapping
Accel (g): X=0.00, Y=0.00, Z=0.00 | Gyro (deg/s): X=0.00, Y=0.00, Z=0.00
timestamp,angle,distance,intensity,x,y
1711212151.324,352.45,342,127,328.4,-95.2
- Arduino with SoftPWM, Servo, and SoftI2CMaster libraries
- Raspberry Pi with Python 3
- Required Python packages:
- serial
- smbus
- time
- struct
- math
- os
- datetime
- Connect Arduino to Raspberry Pi via UART (/dev/ttyACM0)
- Connect MPU6050 to I2C bus 1
- Connect LIDAR to serial port (/dev/ttyUSB0)
- Connect motors and servos as defined in the pin assignments
- Power on the rover hardware
- Run the Python controller script
- Enter commands via the terminal interface
- Check I2C bus connections
- Verify the IMU address (default: 0x68)
- Use scan_bus() function to detect connected I2C devices
- Verify serial port connection (/dev/ttyUSB0)
- Ensure baudrate is set to 230400
- Check data format with debug output
- Verify the Arduino is properly responding to commands
- Check motor driver connections
- Verify servo positions and calibration