The spider robot a.k.a. GC_MK1 moves forward and backward and can also dance depending on the code loaded on the Arduino. The robot uses 12 micro servo motors (SG90); 3 for each leg. The controller used to control the servo motors is an Arduino Nano. We also use a 12V battery which is stepped down to 5V by using a DC-DC converter, and then fed to the VIN pin to power the Arduino and servo motors as well. All the parts for the body of the robot have been 3D printed.

Key explanations:

Servo Motors:

Servo motors are often used rotate and push or pull objects with great precision.

A servo motor is made up of a small DC motor and a couple of gears that take the high speed of the motor and slow it down while increasing the torque of the output shaft in the servo.

Heavier work requires more torque (Metal gears are used in servo motors to produce more torque while plastic ones for less torque).

There is also a positional sensor on one of the gears of the motor which is connected to a small circuit board. The circuit board decodes the signals to determine how far the servo needs to rotate depending on the signal from the user. Then, it compares the desired position to the actual position and decides which direction to rotate.

Pulse Width Modulation (PWM) is used to control the servo motor position. Servo motors are activated when they receive a control signal (pulses). A pulse is a transition from low voltage to high voltage, usually, the pulse stays high for some time.

Servo motors tend to work in a range of 4.5 to 6 volts and a pulse train of about 50 to 60 Hz.

50HZ = 1/20ms >> PWM = 20ms

Types of Servo Motor

Positional Rotation Servo >> Rotates about 180 degrees/half circle. Continuous Rotation Servo >> Rotates in either direction indefinitely. Linear Servo >> Has an additional mechanism (rack and pinion) to move in a back and forth direction instead of circular.

Components

https://www.youtube.com/watch?v=651GJfu3v3g&feature=youtu.be

3D Printed Parts:

I used Fusion 360 and my Prusa i3 MK3 to print out all the parts for the spider robot. I modified the bed to fit my battery, but I miscalculated the dimensions, so I had to hold the battery myself for the demo. Already working on GC_MK2!

Upper Part Robot Spider Body

Lower Part Robot Spider Body

If you don’t need a bigger bed or any other change, you can use the current files in thingverse (link below).

Thingverse files for spider robot:

https://www.thingiverse.com/thing:1009659

Fritzing Diagram:

Refer to the picture below for more information about the servo signals (Yellow Wire)

How to Build – Video

https://www.youtube.com/watch?v=LNCdvFHbrno

Helpful Images

Building of Spider Robot (GC_MK1) _I

Building of Spider Robot (GC_MK1) _II

Building of Spider Robot (GC_MK1) _III

Building of Spider Robot (GC_MK1) _IV

Building of Spider Robot (GC_MK1) _V

*In similar fashion for the rest of the parts

Entire Leg Spider Robot (GC_MK1)

Body Spider Robot (GC_MK1)

Battery 12V – 3000mAh

DC-DC Converter and Arduino Nano

Custom PCB

Spider Robot (GC_MK1)

Arduino Code

In order to get all servo motors to the same initial position, you need to upload the arduino legs sketch (Legs.ino) file first.

After you complete the step above, you can add screws (zip ties work too) to the servo motor arms and tighten them.

Download and install FlexiTimer2 library before uploading program 1 and 2 sketches.

FlexiTimer2 Library

Now you’re ready to upload Program1.ino or Program2.ino to run on the Arduino.

Arduino Sketches

Legs.ino

// Locate the initial position of legs // RegisHsu 2015-09-09 #include <Servo.h> Servo servo[4][3]; //define servos' ports const int servo_pin[4][3] = { {2, 3, 4}, {5, 6, 7}, {8, 9, 10}, {11, 12, 13} }; void setup() { //initialize all servos for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { servo[i][j].attach(servo_pin[i][j]); delay(20); } } } void loop(void) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { servo[i][j].write(90); delay(20); } } }

The other two Arduino sketches are way too long to post here. Check link below.

Google drive folder link with all files. (Includes Arduino sketch files and flexitimer2 library)

Spider Robot Files

Credit to RegisHsu for the Arduino sketch files.

Demo: