Differential-Drive Rover
Category:
Robotics
Design Duration:
5 weeks
Differential-Drive Rover
A Bluetooth-controlled differential-drive robot that uses closed-loop control to maintain accurate wheel speeds.
Problem
Most remote-controlled robots simply apply motor commands without verifying the actual speed, making their behavior sensitive to battery voltage and surface conditions. This project aimed to regulate wheel speed using real-time sensor feedback instead of open-loop control.
Design
The robot is driven by a 13-state finite state machine, where Bluetooth commands control direction and three speed levels for each motion. Speed changes are gradual, allowing smoother acceleration, deceleration and direction reversal.
Technical Implementation
A closed-loop PI controller runs every 200 ms on an STM32L476RG. Using quadrature encoder feedback, it continuously computes the speed error and adjusts the PWM duty cycle applied to each motor. To improve responsiveness, the controller preloads its integral term during state transitions. An independent ADC analog watchdog monitors battery voltage and safely stops the robot if it falls below the operating range.
System Overview
STM32L476RG firmware with a 13-state finite state machine
Bluetooth control via HC-05 (USART3)
Closed-loop PI controller using quadrature encoders and PWM motor control
ADC analog watchdog for battery protection
UART debug interface for real-time testing
Results & Limitations
The robot responded smoothly to command changes and maintained stable trajectories during testing. However, controller performance was evaluated qualitatively rather than through logged measurements. Future work includes recording target and measured speeds to quantify steady-state error, overshoot and settling time.
Takeaways
This project introduced me to real-time control on embedded systems and showed how feedback, timing and hardware peripherals combine to produce reliable, predictable behavior.


