Hello everyone!
My goal in this project is to make an autonomous rover that is capable of doing many activities around your house.
The idea came from me learning about Mars rovers like Curiosity and how they operate. And I decided that it would be fun and helpful to make a little rover of my own. I started this project to make a robot that could not crash into obstacles while I was away. It started back in 2017 and now our goal has shifted to more of making an autonomous rover.
Visit my Youtube channel!!!!!!
UniverseRobotics
Algorithmic Searching: The Probability Rover
A standard obstacle-avoiding robot acts like a bouncing ball: it drives till it sees a wall, turns 90 degrees, and drives straight again. The Probability Autonomous Rover utilizes advanced software routines to simulate organic "searching" behavior, similar to an animal hunting for food or a Roomba mapping a home.
Randomness and Weighting
Instead of hard-coding exact angles to turn, the robot uses weighted probabilities.
- The Array: If the robot senses a blockage 30cm ahead, it stops.
- It generates a random number from
1 to 100. - The Weighting:
If (num < 10): Reverse for 2 seconds (10% chance).If (num > 10 && num < 40): Turn Left 45 degrees (30% chance).If (num >= 40): Turn Right 45 degrees (60% chance). By skewing the odds, the robot tends to circle rooms in a specific direction but maintains enough unpredictability to escape getting permanently stuck in a corner!
The Wandering Algorithm (Perlin Noise)
Instead of driving in perfectly straight lines, you can apply a mathematical equation (like a simple sine wave or Perlin noise approximation) to the PWM speed of the left and right wheels.
- The wheels constantly vary their speed slightly.
- The robot drives in graceful, arcing curves, sweeping a much wider area of the room without any input from sensors until it approaches a wall.
First Part : Chassis and Motors
Chassis
The chassis of the Probability rover is made from the Bogie Runt Rover from Servo City and I followed a tutorial to put it together. The set comes with the complete set of motors and chassis but doesn't come with the electronics.
Motors
The rover uses 6 DC motors to power the wheels. All of the motors have the wires that come up to the top through a hole in the chassis. They then connect to a L298N motor driver. Because of these powerful motors Probability can reach speeds up to 4 mph!
Second Part: Electronics
Motor Driver
All of the six motors are powered by a L298N dual bridge motor driver chip. All of the motor wires are connected to the right and left sides of the chip. To give power to the arduino it is connected to the 5V and GND on the chip. Then the 5V goes to 5V and the GND goes to GND. For all of the motors to work the L298N motor drive chip needs to be connected to the arduino using the ENA, IN1, IN2, IN3, IN4, and ENB. These wires are then connected to any six of the digital pins on the arduino.
Ultra Long distance sensor
The HC-SR04 or (Ultra long distance sensor) is the electronic that senses objects in front of it and avoids the object. It works by making a high pitched sound out of the echo pin and receiving the sound through the trig pin. I mounted the sensor by cutting a paperclip in half then getting it red hot and burning a small hole in the ABS plastic. Then I put the sensor on and curled the paperclips around the small screw holes in it. The VCC pin connects to the arduino's 5V pin and the GND pin connects to GND on the arduino. The Trig and Echo pins then connect to any of the digital pins in the arduino. Make sure when you write the code to include what pins you are using for the Trig and Echo pins.
Servo
The servo on Probability is made for turning its head to use the ultra long distance sensor. The red wire goes to 5v pin on the Arduino and the black or brown wire goes to the GND pin on the Arduino. The other wire goes to any digital I/O pin. If you are going to use the servo don’t put the paper clips into the chassis. If you don’t understand read the paragraph that shows the ultra long distance sensor. When you write the code for it always remember to put in the right digital pin that you used.
Buzzer
The buzzer is on Probability so it can make sound. If you don’t want your rover to make sound don't put the buzzer on. On the top of the buzzer one side has a plus symbol. The wire underneath it is the wire that goes to any digital pin on the Arduino. The other wire goes to the GND pin on the Arduino. Remember to declare what digital pin you are using. To make it play sound you have to write a piece of code that says the tone. In the Probability soft 1.9 it shows you the tone code you need to have.
System Hardware
- Arduino Uno/Mega: The behavioral engine.
- Motor Control Board (L298N or Motor Shield V2).
- 2WD or 4WD Acrylic Robot Chassis Kit.
- HC-SR04 Ultrasonic Sensors (x3): Mounted on the front, left, and right, to constantly feed environmental data into the probability engine.