3D Printed Robot

by randofo in Circuits > Robots

86282 Views, 332 Favorites, 0 Comments

3D Printed Robot

main.jpg

The nice thing about 3D printing is that it makes building robots easy. You can design whatever configuration of parts that you can dream up and have them in your hand virtually right away. This allows for rapid prototyping and experimention. This particular 3D printed robot is an example of that.

This idea to have a walker bot that shifted its front center of balance is one that I have had for a few years. However, implementing it with off the shelf parts always proved rather tricky and prevented me from really trying. Yet, when I realized that this could be done quickly and easily with 3D printing, I was able to finally create this robot in about two days. Basically, 3D printing had enabled me to take an idea and actualize it in less than 48 hours.

If you want to try your hand at making this easy robot, I have included the files and posted instructions for you to make on yourself. This is definately a fun weekend project for someone with a 3D printer who knows a little bit about electronics and soldering to get their feet wet with robotics.

Robot Parts

1A.jpg

Get the following materials:

(x1) 3D printer (I use a Creality CR-10)
(x2) Standard servos
(x1) Arduino micro
(x1) 40-pin socket
(x1) PCB
(x1) 9V battery snap
(x1) 9V battery holder
(x1) 9V battery
(x2) 3-pin headers
(x13) M3 nuts and bolts
(x4) pencils

(Note that some of the links on this page are affiliate links. This does not change the cost of the item for you. I reinvest whatever proceeds I receive into making new projects. If you would like any suggestions for alternative suppliers, please let me know.)

3D Print Parts

2A.jpg

3D print the attached files using your particular 3D printer. You may need to setup the files to work with support for your particular setup.

Front Assesmbly

3B.jpg
3C.jpg
3D.jpg
3E.jpg
3F.jpg

Insert four bolts into the front of the robot.

Slide the two front leg gears into the compartment in the front of the robot body such that the leg sockets are pointed outwards.

Place the gear inbetween the two rack gears of the legs.

Press the servo's drive shat into the socket on the center gear and use a screw to fasten this into place.

Finally, bolt the servo in place using the bolts installed earlier to complete the front assesmbly.

Bottom Servo

4B.jpg
4C.jpg

Slide the bottom servo into its mounting bracket and bolt it into place.

Attach the Torso

5B.jpg
5C.jpg

Press fit the 3D printed torso centered upon the motor's drive shift and bolt it into place.

Insert Pencils

6A.jpg
6B.jpg

Insert pencils into the torso socket such that the eraser ends are sticking out.

Pull the Erasers

7A.jpg
7B.jpg

Pull the erasers off of two pencil using a pair of pliers.

Insert More Pencils

8A.jpg
8B.jpg

Insert the end of the pencils that the eraser used to be attached to into each of the front leg sockets.

Build the Circuit

9A.jpg
10A.jpg

Solder the 40-pin socket to the center of the board.

Connect the black wire from the 9V battery snap to the ground pin on the Arduino socket and the red wire to the V-in pin.

Solder the first three pin male header to the 40 pin socket as follows:

header pin 1 ---> 5V power
header pin 2 ---> Ground
header pin 3 ---> Digital Pin 8 (socket pin 36)

Solder the second three pin male header to the 40 pin socket as follows:

header pin 1 ---> 5V power
header pin 2 ---> Ground
header pin 3 ---> Digital Pin 9 (socket pin 37)

Drill

11A.jpg
11B.jpg

Drill a 1/8" hole centered upon a part of the circuit board where there are no soldered electrical connections.

Insert the Arduino Micro

12A.jpg

Insert the Arduino micro into the appropriate pins on the socket.

Attach the Battery Clip

13A.jpg
13B.jpg

Attach the battery clip to the bottom of the circuit board while being careful not to short circuit any electrical connections with it.

Attach the Circuit Board

14A.jpg
14B.jpg
14C.jpg

Bolt the circuit board to the mounting holes on the robot body.

Wire the Servos

15A.jpg
15B.jpg

Plug the servo sockets into the appropriate male header pins on the circuit board.

Program the Arduino

16A.jpg

Program the Arduino with the following code:

//
// Code for a 3D Printed Robot
// Learn more at: https://www.instructables.com/id/3D-Printed-Robot/
// This code is in the Public Domain
//


//add the servo library
#include <Servo.h> 

//Create two servo instances 
Servo myservo; 
Servo myservo1; 
 
//Change this numbers until the servos are centered!!!!
//In theory 90 is perfect center, but it is usually higher or lower.
int FrontBalanced = 75;
int BackCentered = 100;

//Variables to compensate for the back center of balance when the front shifts
int backRight = BackCentered - 20;
int backLeft = BackCentered + 20;



//Setup initial conditions of the Servos and wait 2 seconds
void setup() 
{ 
  myservo.attach(8); 
  myservo1.attach(9); 
  myservo1.write(FrontBalanced); 
  myservo.write(BackCentered);  
  delay(2000);
} 

 
 
void loop() 
{ 
  
  //Walk straight
  goStraight();
  for(int walk = 10 ; walk >= 0; walk -=1) { 
     walkOn();
  }   
 
  //Turn right
  goRight();
  for(int walk = 10 ; walk >= 0; walk -=1) { 
     walkOn();
  } 
  
  
  //Walk straight   
  goStraight();
  for(int walk = 10 ; walk >= 0; walk -=1) { 
     walkOn();
  }  
  
  //Turn left  
  goLeft();
  for(int walk = 10 ; walk >= 0; walk -=1) { 
     walkOn();
  } 

} 


//Walking function
void walkOn(){
    myservo.write(BackCentered + 30);
    delay(1000);
    myservo.write(BackCentered - 30);
    delay(1000);
}


//Turn left function
void goLeft(){
  BackCentered = backLeft;
  myservo1.write(FrontBalanced + 40);       
}


//Turn right function
void goRight(){
  BackCentered = backRight;
  myservo1.write(FrontBalanced - 40);              
}


//Go straight function
void goStraight(){
  BackCentered = 100;
  myservo1.write(FrontBalanced);             
}

Plug in the Battery

17A.jpg

Plug in the 9V battery and secure it in place with the battery clip.

Did you find this useful, fun, or entertaining?
Follow @madeineuphoria to see my latest projects.