Documentation for Rover Prototype
Documentation for Rover Prototype
1. Overview
This rover prototype is a Bluetooth-controlled vehicle designed to traverse rough terrains. Built using
an Arduino R3 microcontroller, it is equipped with four BO-DC motors and a motor driver shield for
precise control of its movement. The rover is operated via a mobile phone using a Bluetooth
connection (HC-05 module). Its power supply is provided by a portable power bank, making it a fully
mobile system capable of being used in a variety of remote and challenging environments.
2. Modules Used
Arduino R3
Power Bank
BO-DC Motors
Arduino R3: The Arduino R3 is the core controller of the rover. It is an open-source
microcontroller board based on the ATmega328P. This board has 14 digital input/output pins,
6 analog inputs, and a 16 MHz quartz crystal, making it ideal for this project. The Arduino
processes inputs from the HC-05 Bluetooth module and sends signals to the motor driver
shield to control the BO-DC motors.
Motor Driver Shield: This shield is mounted directly onto the Arduino and allows for easy
control of the motors. It manages the direction and speed of the four BO-DC motors by
delivering the appropriate voltage and current. The shield simplifies connections to the
motors and enables the Arduino to issue commands without the need for complex wiring.
Each motor is controlled independently, allowing the rover to move in multiple directions.
HC-05 Bluetooth Module: The HC-05 module is responsible for establishing a wireless
connection between the rover and the controlling mobile device. It uses standard serial
communication (UART) to send and receive data. When commands (such as moving forward,
backward, left, or right) are sent from the mobile device, the module transmits this data to
the Arduino, which then acts accordingly by adjusting the motors.
Power Bank: A portable power bank is used to supply power to the rover. This allows the
rover to function wirelessly, without being tethered to a fixed power source. The power bank
provides sufficient power for the Arduino, Bluetooth module, and motors, making the system
completely mobile.
BO-DC Motors: The BO-DC motors are small, inexpensive DC motors commonly used in
hobby robotics projects. In this rover, four such motors are used, one for each wheel. The
motors provide enough torque to navigate rough terrain while maintaining a compact size
that keeps the rover lightweight and maneuverable.
The following code controls the movement of the rover based on the commands sent from a mobile
device. Here is a breakdown of the key sections:
#include <AFMotor.h>
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);
Explanation: The AFMotor.h library is used to interface with the Adafruit motor driver shield.
The code declares four motor objects (motor1, motor2, motor3, motor4) corresponding to
the four BO-DC motors connected to the motor driver shield on channels 1 through 4.
char value;
void setup() {
Serial.begin(9600);
Explanation: The setup() function initializes the serial communication at a baud rate of 9600.
This allows the Arduino to communicate with the Bluetooth module (HC-05). The value
variable will store the command received via Bluetooth.
void loop() {
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
} else {
Stop();
}
Explanation: The loop() function continuously checks for incoming data from the Bluetooth
module using Serial.available(). If data is received, it reads the command into the value
variable and prints it to the serial monitor for debugging purposes. If no command is
received, the rover stops by calling the Stop() function.
Movement Control
if (value == 'F') {
forward();
delay(400);
backward();
delay(400);
left1();
delay(400);
right1();
delay(400);
left2();
delay(400);
right2();
delay(400);
Stop();
o 'S' for a sharp left turn using opposite directions on the motors (left2())
Each movement lasts for 400 milliseconds (delay(400)), allowing for brief, controlled actions.
Motor Functions
void forward() {
motor1.setSpeed(255);
motor1.run(FORWARD);
motor2.setSpeed(255);
motor2.run(FORWARD);
motor3.setSpeed(255);
motor3.run(FORWARD);
motor4.setSpeed(255);
motor4.run(FORWARD);
void backward() {
motor1.setSpeed(255);
motor1.run(BACKWARD);
motor2.setSpeed(255);
motor2.run(BACKWARD);
motor3.setSpeed(255);
motor3.run(BACKWARD);
motor4.setSpeed(255);
motor4.run(BACKWARD);
Explanation: The forward() and backward() functions set all four motors to maximum speed
(255) and rotate them either forward or backward. The run(FORWARD) or run(BACKWARD)
functions are called to set the direction of each motor.
Turning Functions
void left1() {
motor1.setSpeed(0);
motor1.run(RELEASE);
motor2.setSpeed(0);
motor2.run(RELEASE);
motor3.setSpeed(255);
motor3.run(FORWARD);
motor4.setSpeed(255);
motor4.run(FORWARD);
void right1() {
motor1.setSpeed(255);
motor1.run(FORWARD);
motor2.setSpeed(255);
motor2.run(FORWARD);
motor3.setSpeed(0);
motor3.run(RELEASE);
motor4.setSpeed(0);
motor4.run(RELEASE);
Explanation: In left1() and right1(), the motors on one side of the rover are stopped by
setting their speed to 0, while the motors on the other side run at full speed, allowing the
rover to pivot left or right.
void left2() {
motor1.setSpeed(255);
motor1.run(BACKWARD);
motor2.setSpeed(255);
motor2.run(BACKWARD);
motor3.setSpeed(255);
motor3.run(FORWARD);
motor4.setSpeed(255);
motor4.run(FORWARD);
void right2() {
motor1.setSpeed(255);
motor1.run(FORWARD);
motor2.setSpeed(255);
motor2.run(FORWARD);
motor3.setSpeed(255);
motor3.run(BACKWARD);
motor4.setSpeed(255);
motor4.run(BACKWARD);
Explanation: In left2() and right2(), the motors on opposite sides are run in opposite
directions, causing the rover to perform sharp turns on the spot.
void Stop() {
motor1.setSpeed(0);
motor1.run(RELEASE);
motor2.setSpeed(0);
motor2.run(RELEASE);
motor3.setSpeed(0);
motor3.run(RELEASE);
motor4.setSpeed(0);
motor4.run(RELEASE);
Explanation: The Stop() function stops all four motors by setting their speed to 0 and
releasing them, which halts the rover.
5. Features
6. Limitations
7. Applications
Exploration: This rover can be used for off-road exploration in rough terrains like rocky
surfaces or deserts.
Education: It's an excellent educational tool for learning about robotics, electronics, and
programming.
Agriculture: Can be adapted to monitor agricultural fields or other areas with rough terrain.
Enhanced Power Efficiency: More efficient power sources, such as solar panels or advanced
batteries, could be used to extend operational time in the field.
Improved Performance: Stronger motors or an upgraded motor driver could enhance the
speed, torque, and overall performance of the rover, making it suitable for more challenging
applications like carrying heavier payloads or operating in harsher environments.