Introduction: 3D Printed "Transformers" Robot - Spiderbot

The Spiderbot is an imitation of the "Transformers". It is a RC quadruped robot and has two modes of operation: spider and vehicle, just like the robots in "Transformers". It is Arduino-based and controlled by Android phone using Bluetooth. It does not have any kinematic calculation inside. The robot cannot be played on rough ground as it needs to slip slightly. You should check out the Youtube video demonstration first!

Hope you like it!

Step 1: Materials and Skills Required

Electronic Parts

  • Arduino Nano x1
  • EMAX ES08MA II 12g Mini Metal Gear Analog Servo x12
  • Adafruit 16-Channel 12-bit PWM/Servo Driver x1
  • Bluetooth HC-05 module x1
  • H-bridge motor driver IC L293D x2
  • 300RPM 6V N20 DC Geared Motor w Rubber Wheel x4
  • Hobbywing UBEC-8A 2-6S Lipo Input 8A UBEC for RC Model x1
  • Wild Scorpion 7.4V 2200mAh 30C MAX 40C 2S T Plug Li-po Battery for RC Car Airplane Helicopter Part x1
  • T-socket battery cable x1
  • 6cm x 9.5cm PCB board x1
  • 5mm LED x2
  • Some wires, jumpers, pin headers and socket

Mechanical Parts

  • M2 x 10mm Round Head screws and nuts x50
  • M1.2 x 6mm Countersunk Head Self-tapping screw x30
  • Few cable ties
  • 3D printing

Skills Required

  • PCB fabrication
  • Soldering

Step 2: Prepare 3D Printed Body

3D Parts Needed

The rar file includes 8 files. To build the robot, you need to print:

  • base.stl x1
  • cover.stl x1
  • coxa.stl x2
  • coxa_mirror.stl x2
  • femur.stl x4
  • motorMount.stl x4
  • tibia.stl x2
  • tibia_mirror.stl x2

For fill density setting, the "Femur" needed to beas dense as possible while other parts can just use normal settings.

Step 3: Build the Body Frame

  1. Screw the round servo arm into the Base and 4 Femurs using M1.2 x 6mm screws
  2. Attach the servos to the Coxae and Tibias and screw them with M2 screws with nuts
  3. Attach the N20 motors w wheels on the Tibias using Motor Mount and screw them with M2 screws with nuts

Be aware of the orientation of the servos and motors.
You may refer to the photos above.

Step 4: Make the PCB and Solder the Parts

The PCB outline is 6cm x 9.5cm

First you have to make the PCB using " Main_Board.pdf " file.

Please be reminded that the pcb/pdf file is BOTTOM SIDE , you should check the orientation before you make the PCB. There is a reference photo above so please check it.

For one who don't know how to make a PCB, you may find it here https://www.instructables.com/howto/PCB/

After you made the board, you can solder the componets to the board. I recommend adding pin socket for the Arduino board. (you may refer to photo above.)

After soldered the componets, connect the holes left with same color using wires and add jumpers according to the images above. There should be 6 wires: 5V x2, Ground x2, Arduino Rx<->HC-05 Tx & Arduino Tx<->HC-05 Rx

The 8 holes left are for motors connection which will be done later.

Then, solder 2 LED in parallel with a series resistor like the photo above. It acts as the eyes of the robot.

After that, solder the switch between the input+ side of UBEC and the T-socket cable as shown in the photo above.

Lastly, set UBEC to 6V output and connect the output to the 16-channel servo driver as shown in the photo above.

Step 5: Connect the Servos and Motors to the Board

Connect the servos to the board accordingly.

The servo has 3 wires: Brown wire is Ground, Red wire is V+, Yellow wire is PWM

The Left Front Leg has servo 0,1,2

The Right Front Leg has servo 4,5,6

The Left Rear Leg has servo 8,9,10

The Right Rear Leg has servo 12,13,14

3,11,15 are left unconnected.

7 is used for LED PWM.

Next, solder one end of wires to the PCB board motor outputs (total 8 holes for 4 motors) and solder the other end to the N20 motors on the Tibia accordingly. Please refer to the photos above.

Dont connect the Coxa, Femur and Tibia together now as the servos need calibration first.

Step 6: Download Code to Arduino and Calibrate Servos

Before calibrating the servos, you have to upload the code to Arduino Nano.

You will need the Adafruit_PWMServoDriver Library and download link is here:

https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library

How to Install Arduino Library: https://www.arduino.cc/en/Guide/Libraries

After installing the library, you can first complie the code to see if everything is fine.

Before connecting the Arduino Nano board to USB cable, you should:

Remove the 2 jumper caps on the board (1 is to disconnect Bluetooth power to free Tx Rx pins for USB, 1 is to disconnect the Nano from servos power)

OR

Plug out your Arduino Nano when uploading

Once you finished uploading, you can put back the 2 jumper caps and turn on the switch.

Up on starting, all servos will be initialized to a "zero" position and now you can attach the Base, Coxa, Femur and Tibia together like the photos above, Coxa 45 degrees to the edge of base, Femur 30 degrees to Coxa and make Tibia vertical and slightly bend outside. remember keep the power on so that the servos will keep the "zero" position when you are attaching them. In the Arduino code, you can adjust the servo offset values to make the servos have a more accurate positions.

Lastly is to use cable tie to tie the battery to the board. Be aware of the battery cable orientation as we need to fit the cable into the Cover. You may refer to the photo above.

Step 7: Calibrate Robot Movements

You can uncomment one of the functions (forward, backward, left, right and vehicle) in the main loop in Arduino code to test whether the movements work fine.

void loop() { 
/////////////////////
//Functions Below are for first time motion calibration
//Uncomment one of them to calibrate
//forward(); 
//backward(); 
//left(); 
//right(); 
//vehicle(); 
/////////////////////
}

If not, you can adjust the corresponding servo degree values inside each function.

For vehicle mode, the leg shoud bend in the way like the photo shown above. It should have 2 supporting points to minimize servos load.

Please be cautious that servos may get damaged when experiencing high load. When the servo angles are wrongly set, servos rotation may be blocked by mechanical parts. It will be very noisy under this circumstance. Please turn off the main power switch to prevent damage.

The gait of the robot is creep gait. You may refer to http://www.oricomtech.com/projects/proj2/crp-stab.htm for more details. There is no kinematics in this project so as to make it simple.

While adjusting gait, you need to form a stable tripod when one leg lift up. Which means you can just only adjust the values of Servo 0, 4, 8 and 12 (LFa, RFa, LRa and RRa in Arduino code) to achieve stable tripod.

Lastly you may calibrate the servos value inside mleft() and mright() functions which are responsible for Vehicle Mode turn left and right motions.

Step 8: Download Android App and Pair Up Bluetooth

The apk file above support 5" screen.

I have also uploaded the source code, you can modify it if you want.

In order to communicate with the robot, first you need to pair up with it.

The device name of the robot should be "HC-05" as it is the Bluetooth module number.

The password by default is 1234. After paired up, you will see the "HC-05" when you turn on the Bluetooth connection in th app.

"Connect" will be shown if you are successfully connected.

Step 9: Install the Cover and FINISHED

First plug the LED into the Cover's hole.

Then plug the switch through the single hole.

Finally fit the battery cable at the front of the cover.

NOW EVERYTHING DONE~~~

ENJOY PLAYING~~~

Robotics Contest

First Prize in the
Robotics Contest

Tech Contest

First Prize in the
Tech Contest