loading

2017-03-26 update:
Share the MG90 servo version - http://www.thingiverse.com/thing:2204279

you can download it and build with MG90 servos.

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

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

Remote control by bluetooth

https://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.

https://www.sunfounder.com/robotic-drone/quadruped/crawling-quadruped-robot-kit.html

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

https://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...

Hi teacher Regis.<br>The existence of this very project cleaner I can RegisHsu more teachers learn more.<br>I compiled this with each leg robot slowly and meticulously follow the step.<br><br>I still wanted to make the robot school.<br><br>But how come everytime I change the coding robots walk so messed up, that I was originally using a coding legs_init after that I change into a coding URspider_open_v1.ino foot robot so messed up and running is not perfect.<br><br>Maybe that's the problem I face please help and explanation<br><br>Thank you very much.
Almost done.i chose to use a powrbank with 2.1 ampere output(2 slots) and i attach 3 servo to each and it seems to work fine XD
<p>can you pls tell me how to calibrate the legs and which lines should i uncomment in the code</p>
<p>Vishal, at the end of Step 11 there is a leg_init sketch. Just upload that before you mount the servo horns to match the picture on that step.</p>
U said to me and i did the same but my bot 3 legs work properly and 1 leg works wiredly what can i do pls give me suggestions
<p>I would double-check the servos for that leg. There is a diagram showing the servo numbers on step 10.</p>
Can u pls share ur simple schematic design
<p>Hi Regis! Thanks for sharing your awesome design!<br>It is AWESOME!!!<br><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/9Pos9pE8xwU" width="500"></iframe></p>
<p>should I need to use capacitors to avoid glitch of servo motion. In the picture of circuit diagrams, capacitors are used but you haven't say about the capacitors.</p>
<p>Why did you take the leg calibration parts of code out?</p><p>It is impossible to have the servos be perfectly aligned and the legs perfectly straight.</p><p>How is this part done?</p>
<p>actually the legs need a calibration function, however I didn't put it into the code because of this project isn't a commercial product. You can refer to original design here (https://www.sunfounder.com/robotic-drone/quadruped/crawling-quadruped-robot-kit.html) to put it back. </p>
<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>Can you tell me the link to the code you found, i am also having a slight problem...</p>
<p>HI Regishsu..</p><p>First I want to thank you for sharing this cool project.</p><p>Me and my son realy exited building this project.</p><p>I use Arduino Nano with expantion shield.</p><p>For power I use two 18650 battery. (from inside used laptop battery, to get cheap one).</p><p>But we stil have any problem. Everytime this robot walk or turn, it only take one or two step and than stop and restart itself. But when I hold it in the air and make it walk. It can walk a couples step and then it stop and restart it self (more step than when it on ground).</p><p>Is it a power matters ?</p><p>thanks</p><p>cupi</p>
Same here<br>I used atx power supply to make sure the current is sufficient. But the spider keep restarting.<br><br>
More thwn likely a power issue, double check for any shorts and if possible use a external supply to eliminate power issues 12v 2amp wall plug make sure center of plugs dc jack is positive thought.
Hello<br>Nice project you have.<br><br>I decided to make one, with arduino i made by myself (not uno or mini). When I uploaded legs init, it's still working perfectly, but when I uploaded demo sketch, the robot just stand-forward and repeat.<br><br>https://drive.google.com/file/d/0Bws6H47Gp4hZQ0FoaV8weXBXbmM/view?usp=drivesdk<br><br>Can anyone help me?<br>I guess its not power issue since I tried with battery and power supply (40A max)
<p>here some upgrade comman you can download,</p><p>some improvements i make it using bluetooth module;-</p><p>-folding</p><p>-Head up</p><p>-Head down</p><p>-Body dance</p><p>-adjust high but cant walk</p><p><a href="https://drive.google.com/open?id=0B6o0nhlQqriqT0JvMWQ1OVVuaFU" rel="nofollow">https://drive.google.com/open?id=0B6o0nhlQqriqT0Jv...</a></p><p><a rel="nofollow">[d</a></p>
how about share the video?
<p>this video for folding</p>
Dear author, would you be able to print parts for me? Id be happy to pay! I cannot afford a printer and cant find someone to do it!
<p>hey i sell this frame</p><p><a href="https://www.etsy.com/listing/478977661/" rel="nofollow">https://www.etsy.com/listing/478977661/</a></p>
<p>hey i sell this frame</p><p><a href="https://www.etsy.com/listing/478977661/" rel="nofollow">https://www.etsy.com/listing/478977661/</a></p>
<p>this is auto? ^.^ i want to control it. can you tell me how to do that ?</p>
<p>hey dude,i found a battery online its the same brand as you recommend but im curious with the size,it always vary from one shop to another.</p><p>this is the closest spec i found:Size: Approx. 90*45*18mm (L*W*H)</p>
<p>this code is wrong..can you fix it ?</p>
I don't know what are you talking about which code, however, the code is correct and all of people are made it already.
thankz for you super
<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>

About This Instructable

129,512views

741favorites

License:

More by RegisHsu:How to Make a Complex Shape 3D Model by SketchUp Handy Power Supply [vPython] Spider Robot simulator 
Add instructable to: