Final Project
Mars Rover
The project is a mini version of mars rover that is controlled by smart phone using a mobile application with buttons and can even be controlled using voice commands.
In addition to smart features in the rover, that it is always measuring the free distance in front of it, whenever a wall, or a tall object is placed in front of the rover, it will automatically take decision to stop, and tell the user it can’t move. Then it moves backward to avoid that object if it is dynamic.
The most special thing about the Mars Rover is the Rocker Bogie mechanism. This mechanism looks like a walking robot that has front arms that are rotating freely separately from the other side too. The rocker bogie was first designed to let the rover be able to move on unstable ground conditions without rolling over or being damaged. It also can balance the box in the middle & prevent it from falling or tumbling.
My interest in this project started as I am interested in astronomy, I have already implemented this project as the graduation project but it was mainly an autonomous robot to guide blind people.
I have found that is was not easy to apply autonomous system in this short time & it would be complicated. So I decided to be the one who design the whole body & use laser cutting for the links & body, in addition to 3D printing the holders for the electronics components.
This project is a prototype for the Curiosity Rover, that can move on any rough conditions, instead of using camera, I will use an ultrasonic sensor to prevent it from hitting a wall.
The project design is created on Fusion 360
Projects main parts:
Control Box (components enclosure)
Rockers (rear links)
Bogies (front links)
Spacers
Ultrasonic sensor & Servo Motor Mount
Coupling
Wheels
Designing started with the 2D sketch of parts needed, then adding the fittings features;
The control box parts are connected with t-joints.
Then after sketching, all parts are extruded 3mm, and fittings are checked by joining the box parts together.
Designing started with the 2D sketch of parts needed, then adding the fittings features;
The control box parts are connected with t-joints
Then after sketching, all parts are extruded 3mm, and fittings are checked by joining the box parts together.
Links
Rockers were designed to fit the desired height for the robot which is about 16cm.
Rockers are placed at the 2 sides connected the box from one rotating axis, so a hole is created in the box sides & the rockers.
Spacers are being placed between the 2 parts to decrease friction of material.
Then the bogies are connected to the rockers from one rotating axis, and holes are placed in both parts.
Using join tool in fusion, the links are connected with rotary joints, box-rocker rotating from 30 to -30 degree, rocker-bogie rotating from 45 to -45 degree.
Components mounting on robot
All components designs are inserted from grabCad (STEP files), then inserted to design.
Control Box (bottom part)
On this part, the arduino, 2 motor drivers, small breadboard, will be placed.
Their fittings will be screws, so all screw holes are projected on the bottom part plane, then are being extruded (cut) to insure the accurate positions.
Arduino is places at the back center, the 2 drivers in the front on both sides so they are close to the motors.
Control Box (back part)
On this part, 2 openings are placed by projecting the Arduino power terminals on the back plane.
Rocker Bogie
On the rear leg of the rockers, & both legs of bogies, the DC Motors are places at the bottom of these legs.
So Projection of yellow DC Motors screw holes is placed on the legs plane, all aligned on the same horizontal line.
Coupling & Wheels
Using the dc motor shaft projection, the coupling is designed to accurately fit on shaft so it can transmit the rotary motion.
The coupling the 2 cylinders, one with a projection hole of the motor shaft, and the second cylinder is to be tied to the wheels.
Three holes are cut in the coupler outer side using the pattern tool, then from here the wheels are created with 8mm diameter (could be even 10mm for better climb), the 3 holes in the coupling are projected on the wheels planes.
Then using join tool the coupling is joined (rotary) to the dc motor & wheels.
As the wheels will be laser cut with 3mm thickness, I created copies of the extruded wheels to place 3-4 wheels on each motor, for more stability & to move on various types of ground.
Servo & Ultrasonic Mounts
The ultrasonic sensor is placed between two parts that are fixed together with side screws, these 2 parts have openings for front & back views of the sensor that are projected on the parts.
The servo motor is placed with the same method between to parts, one placed from bottom & the other is the Top Part of the control box, in both parts projection of servo is placed & openings are extruded to fit the servo.
Then these two mounts are connected together using a T-joint.
Some extra slots are cut on the top & front parts of the box, to allow wires input & output paths.
3D printing
The only part to be 3D printed is the coupling.
I extruded the coupling as .stl file, then imported it to the PrusaSlicer.
Settings are adjusted to be 20% infill, 0.2mm layer height, 6 copies of the coupling. It took around 1.5 hrs 9 grams of PLA.
Laser Cutting
All parts are laser cut using Plywood 3mm thickness.
Dxf file of all parts nested is imported to RDWorks, speed 25m/s & max power 50.
The Rover simply takes orders from user using a mobile app, and start moving in case of a free path is available, but when a wall detected at a distance of 50cm, the rover stops automatically & refuse to move forward, it automatically move backward a little bit to avoid hitting the wall.
Inputs
Ultrasonic Sensor: detecting tall objects & walls in front of the rover
5 Buttons on mobile app (MIT APP INVENTOR) GUI
Outputs
6 dc motors: responsible for motion
Driven by 2 Motor Drivers: To control directions of the DC motors
A label text on mobile screen: showing distance readings, & in case of obstacle it shows that the rover can’t move.
Serial Communication BT Module: connecting Arduino to smart phone
Arduino Uno Controller
LiPo rechargeable battery 1000mAh
Connections
Ultrasonic sensor
VCC – 5v
GND – GND
Trig - 12
Echo – 13
BT Module
VCC – 5v
GND – GND
RX – TX Arduino
TX – RX Arduino
Driver Left wheels
IN1 - D4
IN2 – D5
IN3 – D6
IN4 – D7
VCC – 7.4v (Vin Arduino)
Driver right wheels
IN1 – D8
IN2 – D9
IN3 – D10
IN4 – D11
VCC – 7.4v (Vin Arduino)
In this project there are 2 power supplies,
5V from Arduino supplying the ultrasonic sensor & BT module
7.4v from LiPo supplying the motor drivers, the six dc motors, and Arduino.
DC Motors are better supplied with max 12v that’s why I used the 7.4v battery.
The Rover is mobile robot, which means it has to have a portable battery that could be charged.
Current calculations:
In case the dc motors reached the max current consumption of 250mA each, the whole current consumed from motors would be 0.25*6 = 1.5A = 1500mA
Using the 1000mAh LiPo
Min time of operation = 1000mAh / 1500mA = 0.6667h = 40minutes.
On Arduino IDE
First the declaration part in code for all motor drivers pins, trigger & echo of ultrasonic, to make the application code readable & configurable.
A float variable is created to store distance read by ultrasonic function in it.
The character var is where the data received from serial communication is stored.
This character is send from mobile App to Arduino via Bluetooth, the characters are adjusted in settings of the app.
Five functions are created for motion options, these functions access the motor driver output pins using H-Bridge circuit.
Each driver is responsible for three motors on one side, therefore all output pairs are given the same instructions.
Forward, then all left & right wheels are moving forward.
Backward, all left & right wheels are moving backward.
Left, all left wheels are moving backward while right wheels are moving forward.
Right, all right wheels are moving backward while left wheels are moving forward.
Stop, all wheels are off.
This function is responsible for taking ultrasonic readings, calculating the distance, and returning the data when called.
When function is called, trig & echo pins are sent to it.
Resetting trigger pin, initially low.
Setting trigger to high to start sending waves.
Setting echo to be input
Receiving the time taken in echo.
Returning time taken in microseconds.
In Setup block
Setting all drivers pins to be output.
Starting the serial communication.
In the loop
If there is a data being received from mobile app, these data is saved in the variable bt_data.
Checking if the distance of any tall objects in front of the rover is more than 50, which means a clear path to move.
If so, the distance will be displayed on mobile screen.
Then will start checking which button is pressed which means checking the character received in BT data.
By receiving each of these characters, the function required will be executed.
Then resetting the BT data.
In case the distance is close and less than 50cm;
The rover will automatically stop
Can’t move is displayed on mobile screen.
Will move autonomously backward for half sec.
Then stop
Check any instructions received again.
MIT App Inventor
Mobile Application description
Bluetooth device is paired with mobile
From the mobile application, pressing on the BT button to choose the car’s Bluetooth
The button label will be changed to Connected
In case of a clear path, the distance is always being displayed at the bottom
Whenever a directional button is pressed down a character is sent to Arduino
Whenever the button is released the rover will stop
Whenever an obstacle is detected, Arduino sends data to app & display Can’t Move
Voice command blocks are programmed too, the words are inserted manually in the app settings and insure that they are easy to be detected by the phone, when the right word is send, the data is sent to Arduino and rover will move by voice commands.
Design Mode
Blocks Mode
I had to try first the idea of controlling the three motors with 1 driver, so I connected 2 motors on 1 channel & 1 motor to the second channel. Supplied the driver with 9V, it worked well.
In the latest week of projects (week8), I have designed the mobile application & programmed it to send specific characters when each button is pressed.
I tested the app with the Arduino code using 2 wheels only to check functions are working.
At first the robot move in a direction and doesn’t stop, whenever a button is pressed it moves, but when the button is released the robot didn’t stop, which needed to be modified in the app code.
I changed the code to being pressed down & pressed up conditions & it worked
6. Then I added the ultrasonic function & tested it on the 2 wheeled module.
7. I faced some challenging with the delay, when the robot sense a close distance, it stops, but then receives the app instructions with delay. So by trial & error method I reached the suitable delay to make it unnoticeable & function well.
8. Regarding the design I had to widen some holes that are housing for the dc motor, to make it freely to move, so this lead to offset in the dxf file & re printing some parts.
The Rocker & Bogies alone were not that tough, as the plywood is 3mm & it is not rigid. So I decided to add some supports as (T support) so I added extra parts on rockers & bogies that are fixed on them to make the whole link more rigid.
9. The coupling was printed with interference, so the motor motion would not be transmitted well. I tried to solve it and use double tape to make friction between the coupling & motor and it worked.
10. The wooden wheels are not that thick, so I had to put 3 wheels together, and then added rubber band to make friction. However the thickness of the wheels was still not enough to face some types of ground (gardens or sand), so I decided to use the yellow wheels that fit in the dc motors instead, till I print more wheels & test their function while steering on various ground.
I assisted a peer when she was facing a problem with displaying her design on laser works & how to export a dxf file from the final edit of a part shape. So I told her how to project the face she wants & she laser cut the parts well.
I assisted another peer in coding and debugging his project, also was there in assembly to help him finish on time.
In addition to him helping me in assembly, testing delay issues in coding & fixing
instability of the rover by using wooden spacers as bearing for rockers & bogies
to freely rotate.
n the step of using 3 drivers, each for controlling 2 motors. I faced the problem of not having enough pins on Arduino uno. That would lead to using the mega. But I asked my instructor if there is another solution.
He brought up the idea of controlling 2 motors from one channel of driver, as long as the motors won’t exceed the max current.
And the wheels issue, when I had to use the small yellow wheels for their thickness, I faced a problem with their small diameter, those wheels won’t be able to climb stair to climb a tall object. So I suggest, & will test it, that 6 of the wooden wheels could be used with diameter of 8mm or 10mm to climb stairs, in addition to the idea of 3d printing of wheels.
I would let the robot decide which direction is better to move in after finding an obstacle in front of it, and actually using the servo motor that is already mounted on the robot. So I will just modify the code and connect the motor.
I would like to go forward in making it move autonomously, which could be more realistic and more like mars curiosity rover. A camera could be added on its top to record pictures or live videos.
I would like to add an LCD at the front to make look cooler & more friendly, as it will welcome it’s friend when connected & display current status like I can’t move, or we better move left, etc…
Another approach is adding an LDR sensor & lamp, so whenever it gets darker the lamp will light the road.
Bearing are added to arms which makes motion very flexible & smooth 🤸
Rocker-Bogie Legs are double layers for better strength 💪
Wires are covered with plastic cover for better look 🤩