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)

F1B5XCOKUV8WW30.png
20211018_224629.jpg
20211018_224655.jpg
20211018_224708.jpg
20211018_224722.jpg
Screenshot 2021-10-18 001021.png

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

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)

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

20211017_191804.jpg
20211017_191859.jpg
20211017_192001.jpg
20211017_192108.jpg
20211017_192113.jpg
20211017_193119.jpg
  1. Install Yellwo DC Motor:
  2. Attach the yellow dc motor inside the Wheel_Main_Body_Corner 3d printed part.
  3. You can use the screw holes (drill to widen hole if nececary) or glue the part directly as I did.
  4. Install Bearing:
  5. Press fit a skateboard bearing on the little nub.
  6. If loose or for preference, you can glue the bearing directly on.
  7. Add Miter Gear:
  8. Press fit a Wheel_Main_DriveMiterGear on the motor on the side with the bigger hole.
  9. Install Bearing And Screw Nut On Wheel_Main_SteerGear:
  10. Press the nut inside the socket (use glue if necessary).
  11. Press fit the skateboard bearing in its socket.
  12. Install Wheel_Main_SteerGear:
  13. attach the Wheel_Main_SteerGear on the Wheel_Main_Body_Corner using 2 6-32 machine screws and screw nuts thru the 2 holes.
  14. 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

20211017_193334.jpg
20211017_193401.jpg
20211017_193501.jpg
20211017_193546.jpg
  1. Install Screw Nut:
  2. Press fit inside socket (use glue if needed).
  3. Install Yellwo DC Motor:
  4. Attach the yellow dc motor inside the Wheel_Main_Body_Middle 3d printed part.
  5. You can use the screw holes (drill to widen hole if nececary) or glue the part directly as I did.
  6. Install Bearing:
  7. Press fit a skateboard bearing on the little nub.
  8. If loose or for preference, you can glue the bearing directly on.
  9. Add Miter Gear:
  10. 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

20211017_193712.jpg
20211017_193743.jpg
20211017_195246.jpg
  1. Optional:
  2. Wrap electrical tape around Wheel_Tire for inscreased traction.
  3. install Wheel_Tire_MiterGear Inside The Socket Of Wheel_Tire:
  4. 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).
  5. 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

20211017_195949.jpg

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

20211017_204907.jpg
20211017_205251.jpg
20211017_205400.jpg
20211017_205809.jpg
20211017_205855.jpg
20211017_211346.jpg
  1. Install Screw Nut:
  2. Press nut in socket on Wheel_Steer_Body.
  3. use glue if needded.
  4. Install SG90:
  5. Push it into slot then screw down through holes.
  6. Prepare Servo Gear:
  7. Cut SG90 servo horn to fit it through Wheel_Steer_DriveGear.
  8. Make sure it sticks out from the back a little.
  9. Glue on inside with crazy glue. Make sure no to get glue inside horn teeth or hole.
  10. Attach Servo Horn
  11. 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

20211017_211854.jpg
20211017_212209.jpg
20211017_212409.jpg
20211017_212448.jpg
20211017_212612.jpg
  1. Install Bearing In Body_Connector_Small_Right:
  2. press fit the bearing inside Body_Connector_Small_Right. You might need to sand incase it is to tight.
  3. Install Screw Nut in Body_Connector_Big_Right:
  4. Press the nut inside the socket on Body_Connector_Big_Right.
  5. Since it's deep and might be tight, you might want to screw a screw into it then hammer that in.
  6. Connect Rods Together:
  7. Press the part of Body_Connector_Small_Right with the bearing inside the part of Body_Connector_Big_Right to make a revolving joint.
  8. 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

20211017_213112.jpg
20211017_213122.jpg
20211017_213251.jpg
  1. Mount Steer Bodies:
  2. Connect the steer bodies on to each end of the connectors. Make sure to orient the bodies according to the image
  3. Use machine screw to secure them (tight enough to not have any play, but not tight enough to break anything).
  4. Mount Middle Wheel Drive:
  5. Connect the middle wheel drive to the middle end of the connectors. Make sure to orient the drive according to the image
  6. Use machine screw to secure them (tight enough to not have any play, but not tight enough to break anything).

Add Corner Wheel Drives

20211017_223017.jpg
20211017_223053.jpg
20211017_224028.jpg
  1. In order to properly align the wheel drives, you must connect one servo motors and program them to be in the 90 angle.
  2. To do so, connect the servo to an arduino (I used an arduino uno)
  3. the brown wire of the SG90 to the gnd pin of the arduino
  4. the red wire to the +5v pin of the arduino
  5. the orange wire to the 6 pin of the arduino
  6. 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

20211017_225736.jpg
20211017_225706.jpg
20211017_231223.jpg
  1. 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).
  2. Install the screw nuts in the Body_Frame_Mount pieces.
  3. 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!

20211017_231620.jpg
20211017_231607.jpg

Attach both sides of the rover with Body_Frame_ConnectorMount (on the inside of the body) by screwing them in.

Install Electronics

20211018_184130.jpg
L298N-Module-Pinout.jpg

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.