Arduino Based Perserverance Rover Model (Fusion 360)
by WilliamA63 in Circuits > Robots
2759 Views, 44 Favorites, 0 Comments
Arduino Based Perserverance Rover Model (Fusion 360)
With NASA's Perserverance Rover recently landing on mars, I had decided to make a functional model of it using cheap parts and 3d printed parts that anyone can make
I have future plans to make it remote controlled using a bluetooth module and a robotic arm attachement like the real Perserverance rover
Fusion360 fille:
https://drive.google.com/file/d/1nA0JO2aUx77cQdadsd3VJ98wFMZ9qM2Y/view?usp=sharing
Supplies
Parts:
- 3D printed parts
- Skateboard bearing (x 12)
- Machine screws and screw nuts (x 82)
- i used 6-32
- You can cut them to size through the project as needed
- The ammount you use will depend on if you glue certain parts or not
- SG90 servo motor(x 4)
- With horn and screws
- Yellow dc motor (x 6)
- https://m.media-amazon.com/images/I/51C-m4mTFvL._SX342_.jpg
- Black Electrical tape (optional)
- Wood board (for main body)
- 19.5 cm * 64 cm (x 2)
- 30 cm * 64 cm (x 2)
- 19.5 cm * 30 cm (x 2)
- The overall dimensions and thickness can vary for preference.
Electronics:
- Yellow dc motors(x 6)
- SG90 servo motor (x 4)
- With horn and screws
- Arduino
- wire
- Power supply
- I used AA batteries, but you can use whatever you want
- L298N motor driver (at least x 2)
3D Printed Parts:
- Body_Connector_BearingScrewCap (x2)
- Body_Connector_Big_Left
- Body_Connector_Big_Right
- Body_Connector_Small_Left
- Body_Connector_Small_Right
- Body_Frame_ConnectorMount (x4)
- Body_Frame_Mount (x2)
- Wheel_Main_Body_Corner (x4)
- Wheel_Main_Body_Middle (x2)
- Wheel_Main_DriveMiterGear (x6)
- Wheel_Main_SteerGear (x4)
- Wheel_Steer_Body (x4)
- Wheel_Steer_DriveGear (x4)
- Wheel_Tire (x6)
- Wheel_Tire_MiterGear (x6)
Tools:
- 3D printer
- Screw driver
- Crazy glue
- Soldering iron
- depending on how you make the circuit
Downloads
3D Print Parts
3D print the following parts, the ones without a count must simply be printed once:
- Body_Connector_BearingScrewCap (x2)
- Body_Connector_Big_Left
- Body_Connector_Big_Right
- Body_Connector_Small_Left
- Body_Connector_Small_Right
- Body_Frame_ConnectorMount (x4)
- Body_Frame_Mount (x2)
- Wheel_Main_Body_Corner (x4)
- Wheel_Main_Body_Middle (x2)
- Wheel_Main_DriveMiterGear (x6)
- Wheel_Main_SteerGear (x4)
- Wheel_Steer_Body (x4)
- Wheel_Steer_DriveGear (x4)
- Wheel_Tire (x6)
- Wheel_Tire_MiterGear (x6)
Downloads
Install Screw Nuts
A lot of the parts contain slots to fit in the Screw Nuts. However depending on your preferences, you might want to glue the parts instead.
Assemble Corner Wheel Drives
- Install Yellwo DC Motor:
- Attach the yellow dc motor inside the Wheel_Main_Body_Corner 3d printed part.
- You can use the screw holes (drill to widen hole if nececary) or glue the part directly as I did.
- Install Bearing:
- Press fit a skateboard bearing on the little nub.
- If loose or for preference, you can glue the bearing directly on.
- Add Miter Gear:
- Press fit a Wheel_Main_DriveMiterGear on the motor on the side with the bigger hole.
- Install Bearing And Screw Nut On Wheel_Main_SteerGear:
- Press the nut inside the socket (use glue if necessary).
- Press fit the skateboard bearing in its socket.
- Install Wheel_Main_SteerGear:
- attach the Wheel_Main_SteerGear on the Wheel_Main_Body_Corner using 2 6-32 machine screws and screw nuts thru the 2 holes.
- make sure that the gear is oriented so that the gear is on top of the motor.
Repeat this step 3 more times for each of the Wheel_Main_Body_Corner parts to have a total of 4 corner wheel drives.
Assemble Middle Wheel Drives
- Install Screw Nut:
- Press fit inside socket (use glue if needed).
- Install Yellwo DC Motor:
- Attach the yellow dc motor inside the Wheel_Main_Body_Middle 3d printed part.
- You can use the screw holes (drill to widen hole if nececary) or glue the part directly as I did.
- Install Bearing:
- Press fit a skateboard bearing on the little nub.
- If loose or for preference, you can glue the bearing directly on.
- Add Miter Gear:
- Press fit a Wheel_Main_DriveMiterGear on the motor on the side with the bigger hole.
Repeat this step once more to have a total of 2 middle wheel drives.
Prepare Tires
- Optional:
- Wrap electrical tape around Wheel_Tire for inscreased traction.
- install Wheel_Tire_MiterGear Inside The Socket Of Wheel_Tire:
- You can install screw nuts inside the gear then bind them together with 3 machine screws. (be sure to cut the screw flush to the nut so that it does not interfere with the bearing).
- Alternatively, you can glue it on directly as I did.
Repeat this step 5 more times to have a total of 6 Tires.
Install Tire
Attach all of the Wheel_Tire_MiterGears to bearings to the all Wheel_Main_Bodies
If needed, you can use crazy glue for a more permenant fix.
Prepare Steer Bodies
- Install Screw Nut:
- Press nut in socket on Wheel_Steer_Body.
- use glue if needded.
- Install SG90:
- Push it into slot then screw down through holes.
- Prepare Servo Gear:
- Cut SG90 servo horn to fit it through Wheel_Steer_DriveGear.
- Make sure it sticks out from the back a little.
- Glue on inside with crazy glue. Make sure no to get glue inside horn teeth or hole.
- Attach Servo Horn
- Push it onto the servo then screw it securly.
Repeat this step 3 more times to make a total of 4 steer bodies.
Prepare Connectors
- Install Bearing In Body_Connector_Small_Right:
- press fit the bearing inside Body_Connector_Small_Right. You might need to sand incase it is to tight.
- Install Screw Nut in Body_Connector_Big_Right:
- Press the nut inside the socket on Body_Connector_Big_Right.
- Since it's deep and might be tight, you might want to screw a screw into it then hammer that in.
- Connect Rods Together:
- Press the part of Body_Connector_Small_Right with the bearing inside the part of Body_Connector_Big_Right to make a revolving joint.
- Fit a Body_Connector_BearingScrewCap on a machine screw then (from the bearing side), drive the screw through the joint to secure it. (make sure not to put it too tightly to reduce friction).
Assemble Connectors
- Mount Steer Bodies:
- Connect the steer bodies on to each end of the connectors. Make sure to orient the bodies according to the image
- Use machine screw to secure them (tight enough to not have any play, but not tight enough to break anything).
- Mount Middle Wheel Drive:
- Connect the middle wheel drive to the middle end of the connectors. Make sure to orient the drive according to the image
- Use machine screw to secure them (tight enough to not have any play, but not tight enough to break anything).
Add Corner Wheel Drives
- In order to properly align the wheel drives, you must connect one servo motors and program them to be in the 90 angle.
- To do so, connect the servo to an arduino (I used an arduino uno)
- the brown wire of the SG90 to the gnd pin of the arduino
- the red wire to the +5v pin of the arduino
- the orange wire to the 6 pin of the arduino
- Run the following code on the arduino
#include <Servo.h> Servo servo; void setup() { servo.attach(6); servo.write(90); } void loop() { }
3. Fit Wheel_Main_SteerGear in the Wheel_Steer_Body (with the servo activated) so that the tires are parallel to the
tire of the middle wheel drive (make sure to orient it according to the images)
4. Drive a screw thru the joint to secure the Wheel_Main_SteerGear to the Wheel_Steer_Body
a. Make sure not to do it too tightly
Repeat this step on for the other servo body
Make the Left Side
Repeat Steps 8 to 10 But replace the left parts with their corresponding right part
Assemble Main Box
- Drill holes through the corner of the board to fit the mount on. Also, this is a good time to aligne the wheel connector pieces on both side pieces of the main body to make holes to mount it. Make sure to align it so that the main body is close to the middle in between the wheels (do this for each side).
- Install the screw nuts in the Body_Frame_Mount pieces.
- Screw the mount on to the board to build a box, leave the top panel of to have access for now.
Assemble the Whole Thing!
Attach both sides of the rover with Body_Frame_ConnectorMount (on the inside of the body) by screwing them in.
Install Electronics
This is optional but i drilled holes on the side to put the wires thru.
Solder wires to the motors and attach them inside body.
I ziptied them along the side of the connectors.
Extend Servo wires if needed.
The way you do this is up to you, but connect all of the components together:
- Connect the negative wire of you power supply to a gnd pin on the arduino
- Connect the positive wire of the servos to the power your power supplie's positive
- Connect the negative wire of the servos to gnd
- Connect each control wire of the servos to respective pwm pins on the arduino
- Connect the 12v pin of the l298N drivers to the power supply (even though it's 6v)
- Connect the gnd pin of the l298n drivers to gnd
- On one side of the rover, connect the three motors to a l298N driver. 2 of them parralle to pin out1 and out2, then the last one on out3 and out4 (repeat on other side)
- Then connect pins in1, in2, in3, and in4 on the l298N drivers to the pins 2, 3, 4, 5 in that order repectivly. You are connecting them parralelle to the arduino so they get controlled all by the same pins on the arduino (2 l298N to the same pins).
You can solder directly or use jumper wires for a less permanent approach (as I did).
The specific pins that you use do not really matter as you will most likely need to adjust the code according to your arrangement.
Program!
Finally, we can get to programming.
For simplicity, if you want, you can modify then upload the following code to you arduino to make sequences of mouvements:
#include <Servo.h> Servo servoTR; Servo servoTL; Servo servoBR; Servo servoBL; int motor1pin1 = 2; int motor1pin2 = 3; int motor2pin1 = 4; int motor2pin2 = 5; void Forward(int delayTime){ // makes rover go forward digitalWrite(motor1pin1, HIGH); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, HIGH); digitalWrite(motor2pin2, LOW); delay(delayTime); digitalWrite(motor1pin1, LOW); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, LOW); digitalWrite(motor2pin2, LOW); } void Backward(int delayTime){ // makes rover go backward digitalWrite(motor1pin1, LOW); digitalWrite(motor1pin2, HIGH); digitalWrite(motor2pin1, LOW); digitalWrite(motor2pin2, HIGH); delay(delayTime); digitalWrite(motor1pin1, LOW); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, LOW); digitalWrite(motor2pin2, LOW); } void TurnRight(int delayTime){ //make right turn servoTR.write(180); servoTL.write(180); servoBR.write(180); servoBL.write(180); digitalWrite(motor1pin1, HIGH); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, HIGH); digitalWrite(motor2pin2, LOW); delay(delayTime); digitalWrite(motor1pin1, LOW); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, LOW); digitalWrite(motor2pin2, LOW); } void TurnLeft(int delayTime){ // make left turn servoTR.write(90); servoTL.write(90); servoBR.write(90); servoBL.write(90); digitalWrite(motor1pin1, HIGH); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, HIGH); digitalWrite(motor2pin2, LOW); delay(delayTime); digitalWrite(motor1pin1, LOW); digitalWrite(motor1pin2, LOW); digitalWrite(motor2pin1, LOW); digitalWrite(motor2pin2, LOW); } void setup() { pinMode(motor1pin1, OUTPUT); //sets up dc motor pins pinMode(motor1pin2, OUTPUT); pinMode(motor2pin1, OUTPUT); pinMode(motor2pin2, OUTPUT); servoTR.attach(6);//sets up servo pins servoTL.attach(9); servoBR.attach(11); servoBL.attach(10); servoTR.write(90); servoTL.write(90); servoBR.write(90); servoBL.write(90); } void loop() { //use combination of the above functions to make the rover move! }
Done!
Side note: Please forgive the miss written listings and wrong indents, I used the new editor not realizing that there are a lot of bugs in it, thanks.