loading

2016-11-1 update:

The all new spider - https://youtu.be/bxJC_vvggIc

2016-04-01 Modify:

Correct the Battery model name and dimension.

2016-01-24 update:

Open the all of design that including the software, Sketchup, EaglePCB, https://github.com/regishsu/SpiderRobot

2015-10-11 upload the PCB layout image file.

2015-10-04 update:

Step 2: schematic pdf file - spider_2015-10-04-open-v2.pdf

Step 10: picture 1.

2015-11-19 update:

Upload the Arduino sketch file which is "special dance" included(step13). Someone who are asking about it, they are interested in it. :-)

-------------------------------------------------------------------------------------------------------------------------------------------------

This is my first project for the 4 legs robot and it took me about 1 year development.

It is a robot that relies on calculations to position servos and pre-programmed sequences of legs.

I'm doing this by handmade way is because of it could be fun and educational for 3D design/printing and robot control.

This is the fourth generation of my design, you can take a look here if you are interested the history.

http://regishsu.blogspot.tw/search/label/0.SpiderR...

2 more projects sharing -

Spider Robot simulator by vPython

http://www.instructables.com/id/vPython-Spider-Rob...

Remote control by bluetooth

http://www.instructables.com/id/DIY-Spider-Robot-P...

Building this project is fun, however, it should take you more time and patient to implement.

If it is a hard job to you, the product comes from Sunfounder might a good choice.

http://www.sunfounder.com/index.php?c=showcs&id=99&model=Crawling%20Quadruped%20Robot

Before going to next step, please aware that the soldering tools and 3D printer will be used in this project.

Let's get start and have fun!

Step 1: Electrics Parts preparation

Here are the parts:

1x Arduino Pro Mini

1x DC-DC(12-5v/3A output)

1x HC-06 Bluetooth module(option)

12x SG90 servo(3DOF for 4 legs)

1x 3000mhA Li battery (DC12300, 90x43x17mm)

1x 12V Jack

1x 680 Ohm 1/4 watt 5% Resistor

1x 3mm Blue LED

1x Tactile Switch

1x 5x7cm perfboard

Some male and female pin headers

Small guage wire(Solid or Stranded)

I believe that these parts are most popular and not expensive. They are just cost me about 2,000 Taiwan dollar.

Step 2: Make the main-board

2015-10-11

upload the PCB layout image file, you should download the zip file would be better.

You can come here for more information about PCB DIY. http://regishsu.blogspot.tw/search/label/0.SpiderR...

******************************************************************

Refer to the schematics file, and place all components like the pictures. you can make the board as small as passable.

The main-board that the last one picture is the newest version, just for you reference.

Here are some tips while you are going to building the PCB:

1. Be sure the output voltage of DC-DC module should be 5v before mount to the perfboard.

2. The servos consume a lot of power, almost 3A in full loading condition. Please use more thick wire for "power" and ground" traces.

3. Do the "open/short" test with the multi-meter for your PCB when you finish the soldering, that is the important process.

4. Using the female pin header instead of solder the modules(Arduino, DC-DC) on the perfboard directly

5. The LED will be on while the "Switch" turns off. Why I design this way is because I would like to check the power source is ok or not when I plug in the power source like battery or something else, it is a simple way for protection..

6. While you see the LED turns on after connect the 12v battery to the board, congratulation!

Step 3: Test the main-board

Test process:

1. Don't plug the DC-DC and Arduino Pro Mini into the main-board

2. connect the battery to the 12v-Jack of main-board

3. Check the LED, if LED turns on, that is a good start.

4. Push the POWER-Switch, the LED should be off.

4. Using the multi-meter to check all of +5V and GND pins are correct

5. Push the POWER-Switch back to turn off the power, the LED turns on

6. Plug the DC-DC and Arduino Pro Mini into the main-board

7. Push the POWER-Switch, the LED turns off, but the LED of Arduino Pro Mini turns on

Then power off, and connect a servo to the first row of Leg1 connectors of main-board(pin2 of Arduino)

upload the "servo_test" code to Arduino and you will see the servo sweeps from 0 - 180 degree.

If you are here without any problem, that is a great progress!

servo_test source code:

Step 4: Building the mechanical parts - Download 3D STL files

This step is going to build the robot mechanical parts, you can print the parts by yourself or ask someone who has 3D printer to help you.

I also open the 3D model design which is design by Sketchup Make version and you can modify it with your great idea.

Download the STL file from http://www.thingiverse.com/thing:1009659

Print parts list:
1x body_d.stl

1x body_u.stl

2x coxa_l.stl

2x coxa_r.stl

2x tibia_l.stl

2x tibia_r.stl

4x femur_1.stl

8x s_hold.stl

Step 5: 3D objects printing

And print them out by your 3D printer.

Please check the configuration of 3D printer before start to print because of it will take a long time about 7~8 hours to print them all. Be patient~~~~

There are my print setting:

- The fill density - 15%

- Nozzle - 0.3mm

- Print speed - 65

you can print these parts separate by color group.

Step 6: Preparing to assemable

tear down the parts and check the objects printing quality, and using the sandpaper to polish the surface to make it looks good.

Refer to here to get more information: http://regishsu.blogspot.tw/2015/07/robot-quadruped-robot-re-design-3-round.html

Step 7: Assemble the body

Put the battery between the upper body case and lower body case with 4 screws(M3x25mm)

Step 8: Assemble the leg

And, install all of servos with legs parts, one leg comes with 3 servos and 4 screws(M1.6x3mm, or glue it anyway)

Notes: 1. Connect to all parts with screws and servos, but do not install the servo rocker arm in this step 2. Be sure the leg direction, refer to the picture 1 Refer to here to get more information:http://regishsu.blogspot.tw/2015/07/robot-quadrupe...

Step 9: Integrate 4 legs to body

connect all of legs to the body, and check all servos and joints are move smoothly.

Step 10: Connect servos to the main-board

2015-10-04

update the picture1 which is wrong pin assignment.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Place the main-board onto the body-case and use the polymer clay to fix it.

And then, refer to the picture, follow the pin number which mark by pink color to connect all servo wire to the main-board, and green color is present the signal direction of servo wire, yellow connect to "S", red to "+", brown to "-".

Be sure the servo of legs should match the pin number of main-board and leg direction, otherwise, the legs will get crazy...

Step 11: Locate the initial position for legs

This is an important procedure, the install procedure:

1. upload the "legs_init" code to Arduino to activate the servos

2. place the legs as the position shows the picture 1, and install the servo rocker arm with screws.

3. tighten all of the screw

legs_init source code:

Step 12: Organize the wires

Then, organize the wires of the servos to make it great looking.

Now, all of hardware installation was finished.

Step 13: It is showtime!!

It is excited to go this step.

Let's upload the "spider_open_v1" code to Arduino to make it moves!

Please download and install the lib FlexiTimer2 first before do compile the code, http://playground.arduino.cc/Main/FlexiTimer2

you will see the action as following

1. stand up, wait 2 sec

2. step forward 5 steps, wait 2 sec

3. backward 5 steps, wait 2 sec

4. turn right, wait 2 sec

5. turn left, wait 2 sec

6. wave the hand,, wait 2 sec

7. shake the hand, wait 2 sec

8. sit down, wait 2 sec

9. back to 1

Enjoy!

PS. the spider_open_v3 is add an interesting movement of "body dancing"

spider_open_v1 source code:

Step 14: Do something special

you can add more special feature like change the move speed dynamically with remote control, that will let your robot more attractive.

Welcome to share the funny gaits or movement.

The remote control

http://www.instructables.com/id/DIY-Spider-Robot-P...

Here are some idea share with you in my blog.

http://regishsu.blogspot.tw/2015/09/robot-quadrupe...

or

Add the IR-detector to detect the obstacle.

http://regishsu.blogspot.tw/2015/08/robot-quadrupe...

or

handmade the PCB

http://regishsu.blogspot.tw/2015/09/robot-quadrupe...

http://regishsu.blogspot.tw/2015/09/robot-quadrupe...

<p>Fantastic project!!! Thanks for sharing all the details! </p><p>I've made my own laser cut quadruped robot and trying to adapt your code. </p><p>Only difference is that I'm using Adafruit's 16 channel controller board instead of arduino PWM pins. Your code mentions &quot;adjustment&quot; routines, but they are missing. Would you mind sharing those as well? :) </p><p> I got everything moving but because I'm wired different and have different frame, leg positions is incorrect (i.e. leg #4 is not doing mouch for some reason). I think I just need to calibrate it...<br>I wrote small function to emulate &quot;servo&quot; command with PWM controller:</p><p>void moveServo(char chan, float deg) {<br>int pulselength;<br>if ( (deg &gt;= 0 ) &amp;&amp; (deg &lt;= 180 )) {<br>pulselength = map(deg, 0, 180, SERVOMIN, SERVOMAX);<br>pwm.setPWM(chan,0,pulselength);<br>} else Serial.println (&quot;Invalid degree specified!&quot;);<br>}</p>
<p>You can disregard my question. I just found original Soundfounder's code :) Looks like you removed parts of it, that's what confused me. There's also a nice guide explaining how code works.</p>
<p>Hello,</p><p>Great tutorial, I am nearing the end of my spider.</p><p>I would like to add the infrared remote and IR detector. </p><p>I did look for these in github but was not able to find.</p><p>Would you be able to provide me with schematics and code for infrared remote and IR detector please?</p><p>Please send the schematics and code to the following email: spittingcobra9921@gmail.com</p><p>Also I would like some advice, I brought the DC 12300 but it was faulty, would you be able to recommend me an alternative and also if I choose not to buy a battery, will this robot work with AA batteries in series?</p><p>Sorry, for the long comment, waiting to hear from you.</p><p>Thankyou</p>
<p>Hi</p><p>I have been struggling to get a suitable battery. In the mean time I put together a battery case to take 8 x AAA rechargeable batteries so I can carry out testing. It lasts about 10mins which is more than enough for the purpose. Hope this is helpful. </p>
<p>is it on serial or paralle?</p>
<p>You can use two 18650 (3.7v+3.7v=7.4v) instead of DC12300. However, you need to modify the part of body_d.</p><p>for the IR detector, my orignal code seems gone. here is a brief FYI.</p><p>the feedback pin is connected to Arduino A0(14).</p><p>void loop()</p><p>{</p><p> SCmd.readSerial();</p><p> if (!digitalRead(14))</p><p> {</p><p> step_back(1);</p><p> }</p><p>}</p>
<p>thx for the reply.</p><p>I found this code in previous comment, is this still functional?</p><p>The connection is Vcc,GND and A0.</p><p>Here is the code segment, please port it into your code.</p><p>/////////////////////////////////////////////////////</p><p>// pin-A0</p><p>#define IR_Detect_IO 14</p><p>void setup()</p><p>{</p><p>...</p><p>// config IR_Detect_IO pin as input</p><p>pinMode(IR_Detect_IO, INPUT);</p><p>...</p><p>}</p><p>int flag_obstacle = 0;</p><p>int mode_left_right = 0;</p><p>void loop()</p><p>{</p><p>int tmp_turn, tmp_leg, tmp_body;</p><p>//Regis, 2015-07-15, for Bluetooth command</p><p>SCmd.readSerial();</p><p>if (!digitalRead(IR_Detect_IO) &amp;&amp; is_stand())</p><p>{</p><p>tmp_turn = spot_turn_speed;</p><p>tmp_leg = leg_move_speed;</p><p>tmp_body = body_move_speed;</p><p>spot_turn_speed = leg_move_speed = body_move_speed = 20;</p><p>if (flag_obstacle &lt; 3)</p><p>{</p><p>step_back(1);</p><p>flag_obstacle++;</p><p>}</p><p>else</p><p>{</p><p>if (mode_left_right)</p><p>turn_right(1);</p><p>else</p><p>turn_left(1);</p><p>mode_left_right = 1 - mode_left_right;</p><p>flag_obstacle = 0;</p><p>}</p><p>spot_turn_speed = tmp_turn;</p><p>leg_move_speed = tmp_leg;</p><p>body_move_speed = tmp_body;</p><p>}</p><p>}</p>
<p>what not try it first?</p>
<p>I am still waiting on the battery, and I don't have access to a power supply/ AC-DC plug. So, would you please be able to recall if this was the functional code?</p>
<p>Hey, did you print your 3d parts in ABS or in PLA?</p>
I am using PLA,however, ABS is fine.
<p>Hey, I was wondering if we have to modify the servos in any way. If the servo have 180 deg of motion, should we modify it to have 360 deg?</p>
Not needed
Thanks for the reply!
<p>Sup.Ive finished attaching the body.The question : I cant find the dc 12300 battery anywher in my local online shops.My mum wont allow shops like amazon or ebay.So can i use an old power bank?ill make a series then just connect it to power supply.Will it work?I think it will cause power bank output are 5v right?</p>
it is fine with any battery or power bank. however, you should make sure the output capabilty of battery is over 3A current.<br>
<p>okok thx.I think it will reach around 2.7 will it be sufficient?</p>
I think it wont work with 2.7A ,Coz i first tried 2.5 A but it was able to run onlyb8 servos,so i added 2 of them and got 5A :)
<p>Hello, I would like to control the servos via I2C using a servo driver board. How much work is it to modify the cope for this. I have to admit that I am no coder at all.</p><p>Thanks Michi</p>
<p>Hello I stand Axel GonzalezRusso am from Argentina, I saw it and I love your project, I'm doing about 6 months ago but I had some problems with programming, I could solve but I emerged new and makes a time that can not resolve them and appreciate to help me complete this project. I pass the error in a file .ino .txt<br>https://gist.github.com/DavidRom98/195678a481fccb217e549564489e955d</p>
<p>What error message you got? what Arduino you are using? the include file missing - #include &lt;NewPing.h&gt;?</p>
<p>I finished assembling, checked all connections, but when I turn the switch he makes a move and begins to shake and flashing leds as Arduino was short, he trembles every time</p>
any details information about your board and battery?<br>
<p></p><div>It is the list of the materials you sent</div>
<p>please show the pictures and I could know in details.</p>
<p>Hello I have a question, is the a6 + a7 a direct connection to the powerjack and ground. I'm asking this question because there is a box with the 1 and 2 inside of it. (see added image)</p>
A6/A7 connect to a 2 pins connector, these two connectors weren't connect together.<br>
<p>So they are both seperate 2 pins connectors? Why did you connect those, cause I assume you're not using them?</p>
<p>I left a6/a7 connector for another purpose, you can omit it. </p>
<p>is the [1 2] rectangle at the power jack/in_ground also can be omitted?</p>
<p>May I know why you want to omit these pins? </p>
<p>well I'm assuming those pins are not being used right? So why would I not omit them if I'm not using them. I'm still confused about the [1,2] pins at the powerjack, are also these not being used?</p>
<p>allright, and same goes for the 2pin-connector connected at POWER_JACK and IN_GROUND? (also shown in the same picture)</p>
<p>Good afternoon, I need to use a capacitor if so please pass the specification and resistance it is 1k or 10k</p>
hallo, how are using for android?
<p>Android?!! </p><p>Too heavy system and expensive for this kind of toys.</p>
<p>Hi I just really quickly want to ask what parts these two schematics reference? I am at a loss on what it is for and where it connects too.</p>
Those pins are just reserved for future used, for examples Gyroscope sensor, IR sensor,...,etc.<br>
<p>Oh thank you for that, I was getting confused :) </p>
I am using arduino nano for servo board. The connection given to servo is like this<br>d2,d3,d4,d5,d6,d7 for servo 1,2,3,4,5,6 and A0,A1,A2,A3,A4,A5 for servo 7,8,9,10,11,12.<br>I make the servo board twice and the crazy leg position repeats.<br>
<p>I don't know what servo board you are using. However, the pins of 7~12 are wrong. They are should be connected to the nano digit pins. In my design, the pin from d2-d13.</p>
I am using arguing nano.I want to use nRF24L01 for wireless control.Is there any way to make that change in the v3 code
<p>you can modify the line in the sketch file</p><p>const int servo_pin[4][3] = { {2, 3, 4}, {5, 6, 7}, {8, 9, 13}, {12, 11, 10} };</p><p>it is a config for the servo pin.</p>
for which leg the pins{8,9,13} and {10,11,12} is to be connected
I have to use nRF24L01.the pins d8-d13 should be assigned to the wireless module. Does changing the servo pin in arduino code to A0-A5 after d7 should make the robot to run properly?
Ive made autonomus mode. Ill share my code on my youtube channel
I've seen it...cool!!
I am facing an issue here. please help ...<br>1.when I upload the leg.init code to nano and try to run all the servo using power bank [5v 2.1A] the servo vibrates.when connecting each servo at a time it does not vibrates and i install all rocker arm as in picture.<br>2. after uploading V3 code the leg comes into weird position <br>3. I am using nRF24L01 for wireless control. what changes to be made for using this module
<p>it may cause by the wrong connection between servos and Arduino board. you should read the step 10 more detail.</p>
<p>I have some questions regarding power supply</p><p>I'm using a 5v ,5A portable power bank as the power supply to the servos.</p><p>The problem is its not accurately 5v output,its about 3.9v,So can i use a Step Up to increase it to exact 5v . And now How should i power the Arduino Pro Mini. I was planning to power it with a 9v battery .But unfortunately i dont know much about these things ,as im new to this. Can you tell me how to connect 9v battery to arduino and how to use that 5v regulated power bank as external power supply for servos. And how to fit the servo into those 'Tibia' Leg parts (i'll attach the images). As there is those 3 wires of servo, it cant be fitted inside that square hole. the hole is exactly printed for the bottom of the servo. Sorry for my &lt;&lt;Noob questions&gt;&gt; .And i bought &quot;XL 4005 DC-DC&quot; Step down.Can it be used as Step Up for that 3.9 v Power bank.Please Help me i have to submit this project in 15 days .Thank You.</p><p>LINKS.</p><p>Power Bank:-<a href="http://www.shopo.in/products/2578747" rel="nofollow">http://www.shopo.in/products/2578747 </a> (Not the same one but different model)</p><p>DC-DC Step Down:-<a href="http://www.ebay.in/itm/282146608026?aff_source=Sok-Goog" rel="nofollow">http://www.ebay.in/itm/282146608026?aff_source=Sok...</a></p><p>Thank You .Please Help.</p>

About This Instructable

98,953views

694favorites

License:

More by RegisHsu:Handy Power Supply [vPython] Spider Robot simulator [DIY] Spider Robot - PART II - Remote control 
Add instructable to: