loading

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!

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!

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>https://youtu.be/va6V6tebO6U</p>
<p>Hello guys,</p><p>I'm slowed down again due to a problem, for my robot I brought an Arduino Uno and a servo shield to make the build a bit simple.</p><p>This one:</p><p><a href="https://www.adafruit.com/products/1411" rel="nofollow">https://www.adafruit.com/products/1411</a></p><p>I tried for days using the original servo_init files to try to get my servos to swing but then I realised I need to use the specific library for the shield: <a href="https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library" rel="nofollow">https://github.com/adafruit/Adafruit-PWM-Servo-Dri...</a></p><p>Now the problem I have is I cannot use the original code supplied by Regis, and as I am only a beginner in coding, will someone be able to explain to me how I can get the original code to work with this shield, or how can I modify the original code to work with the shield?</p><p>If anyone could help me by taking time to modify the following files to solve my problems I will be very grateful. </p><p><a href="https://github.com/regishsu/SpiderRobot/blob/master/spider%20robot/spider_robot.ino" rel="nofollow">https://github.com/regishsu/SpiderRobot/blob/maste...</a></p><p><a href="http://www.instructables.com/files/orig/F78/BJT8/IEEOJWKW/F78BJT8IEEOJWKW.ino" rel="nofollow">http://www.instructables.com/files/orig/F78/BJT8/I...</a></p><p>Thanks everyone, very desperate for answers and help, my robot is due very soon for assessment, please help \(&gt;.&lt;)/</p><p>I will also leave my email here if anyone wants to contact me that way.</p><p>spittingcobra9921@gmail.com </p>
<p>Im not building it yet, my plan is using Arduino Uno too.</p><p>Maybe you can ask Gsyan (Thingiverse.com)</p><p><a href="http://www.thingiverse.com/make:168395" rel="nofollow">http://www.thingiverse.com/make:168395</a></p><p>he use Ardiuno Uno too.</p><p>Please update if you fix the problem</p><p>Thanks</p><p>cupi</p>
refer to the code <br>https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
<p>I have used those files to test my servos, what I need help with is the legs initialise code and the main code. They are both written for PWM while the shield uses I2C, so what I think needs to happen is code needs to be re-written for I2C? Could you give me advice and help with that?</p>
you can find the examples in this library. go into the floder of examples <br>https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
<p>P.S:</p><p>-&gt; the servos or current is not a problem, servos have been tested using example code in Adafruit Lib. Just need help with code :&lt;</p>
<p>I still haven't been able to solve my issue of the messed up leg movements on some commands. I don't know what exactly the problem is but I have ruled out power supply. I have tested spider_open_v1 and that works perfectly (the example loop) but spider_open_v3 and spider_robot are giving me troubles with Bluetooth control, could it be the serial library or something else in the code? How can I test or fix this. Please help, I really need to get this working or I will fail my subject.</p><p>https://youtu.be/R5byqzoi54Q </p><p>HELP PLEASE</p>
it would be better to show your power system including battery and power board.<br>I believe it could cause by power but software issue.<br>
<p>Sorry I didn't reply faster, my problem did get solved, I believe the problem was in one of the libraries, I downloaded libs from a different location and the spider works!</p><p>Thanks for all your help!</p>
<p>This is in regards to my previous problem, here's a video showing my problem.</p><p>https://youtu.be/R5byqzoi54Q</p>
It may cause by power issue. suggest to check the DC-DC output capability, it should support the current over 2A.
<p>I checked the amps, it seems to provide more than enough. I believe that power supply isnt an issue, spider_open_v1 's example loop works perfectly, its just when I try to control it through bluetooth using spider_robot that the movements get glitchy, can you put bluetooth function into spider_open_v1 and remove the example loop, please? I would do it myself but keep getting errors i'm unsure of, if you can could you please send the modified file to</p><p>spittingcobra9921@gmail.com</p><p>Thank you</p>
<p>- I have a question about the spider_open_v3 code, how do I stop it from looping example moves, and be able to control it via Bluetooth, I tried using the code from your github Regis but that also had problems for me, forward and back worked on that code but for everything else there was just crazy moves and wierds actions (eg. when trying to turn right 2 legs just go flat and then I have to reset them to get them back into place.</p><p>- I also want to know about issues regarding the servos, when I run the robot/ when its on its 4 legs, I am hearing a weird buzzing sound, this sound goes away when I place the robot say on a box so the legs don't touch. Does this sound mean I am straining the servos? I have already had 2 servos burn out, so I removed the battery which is ~180g but the buzzing sound still remains. </p>
If out+ goes to vcc and out- goes to ground of the arduino uno the what does in+ and in- go to.
<p>The [IN] goes to your power source, in this case your battery, the + and - are pretty self explanitory, red(positive) to + and black(negative) to - </p>
There are two holes for each in and out which ones do i put the wires into? Thank you for your help!
<p>I am not sure about your model but these holes seem like they both serve the same purpose, just conect it to any one of the two. I think they have two holes at each terminal so if you choose to you can put batteries in parallel.</p>
There are also two metal holes for each out+ out- and in+ in- what holes do i use out of the 8 holes.
<p>I have finished the Spider build, and all's well. I have tried to use HC-06 to no avail. It installs on the Pro Mini and pairs ok with Android. Unfortunately, I'm at a loss as to how to install the code. I have tried to follow the tutorial ReguisHsu kindly posted, Part 2 The-remote-control. Unfortunately, I'm at a complete loss as how to install the code. Does the code the spider_open_v3.ino remain and the HC-06 code added. Or do I remove spider_open_v3. If so it's here I'm failing. If some could talk me through the sequence I'd be eternally grateful. Sorry for the long comment</p>
<p>Upload this code to Arduino: (provided by Regis Hsu)</p><p><a href="https://github.com/regishsu/SpiderRobot/blob/master/spider%20robot/spider_robot.ino" rel="nofollow">https://github.com/regishsu/SpiderRobot/blob/maste...</a> </p><p>to control robot by bluetooth (android) use the app recommended and just change the values of buttons on the app. </p>
<p>To use the ESP8266 module, would I need to modify the arduino code? Also how do I use the module with this project? I don't understand where to put the code I found on your blog. http://regishsu.blogspot.com.au/2016/07/spider-robotesp8266robot-webpage-design.html</p>
The Miniplan board is came from here https://www.facebook.com/miniPlanrobot/<br><br>ESP8266 can be using Arduino IDE to editing and upload as the same as Arduino boards.<br><br>The ESP8266 code of spider robot is under developing and it is different with Arduino_Pro_mini in PWM control code. I might open the code while the code was stable.<br><br><br>
<p>Hi,</p><p>Can anyone help me with a drawing of the wires in the mainboard?</p><p>Thanks</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>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> Hi, </p><p>Can anyone recommend a suitable battery to use with this project, that is available in the UK. Many thanks.</p>
<p>Hello, </p><p>At the begininh i have to say, that this tutorial is really beaitful, and todayI'm starting to build this by my own.</p><p>I have one simple question - the servos are connected to 5V from DC_DC output, or to 5V from Arduuino, or to 12V from battery?</p><p>Thanks for help</p>
<p>They are connected from the DC-DC output, do not connect them to 5v arduino pin, running 12 servos off that pin will not work.</p>
<p>Thanks :)</p>
servo shall connect to dc-dc 5v.
<p>Thanks :)</p>
<p>Hi RegisHsu. I'm a little confused with the connected servos to the main board. Your picture now shows the the servos starting with connector 2, and ending with 13. How does that relate to the 1-12 I have on my board. Thanks.</p>
<p>All arduino boards have pins from 0-13, pins 0 and 1 relate to different things, as u can see in the picture I posted, you might say this is not the same board/ its bigger or smaller but all arduinos follow the same fundamentals. I'll leave the connection pic here for convenience.</p>
<p>Many thanks for your reply. Yes of course they do. I must have been having a senior moment duh!!. I should be up and running soon. Cheers.</p>
hey sorry for the late post,this is the body and the servos,i forgot to bring my pcb to the old house lol
<p>any problem to build this robot?</p>
<p>yeah bro,didn't know how to connect the body LOL.And btw what kind of thick cable should i use?im so confused</p>
<p>the first 3 pics show how to assemble the body. The purple parts you see are basisically what keeps the body together, they act like supports, they lock into the hole u might have noticed on femeur. There is not need to use cables unless you are tidying up the servo wires. The last pic shows how to connect servos to your pcb, the numbers relate to the digital pins on your arduino</p>
<p>just curious.theres no hc 06 modules here.And i bought a few hc-05,so if im using hc-05 i should set in on slave mode or can i use it without making it slave mode?</p>
<p>it is fine to use hc05, however, i didn't try non-slave mode. you can try it and share the result.</p>
<p>hey,i just got my servo delivery yesterday.Today i notice.I DONT KNOW HOW TO ATTACH THE SERVOS TO THE BODY HELPP ME!ill post the body pic(kinda funny because the printer is horrible).I think i know a few connection and how to make it work,im also using nano since pro mini is annoying.Btw what 3d printer do you recommend under 200$.I found 1 for 100$ but it was stopped</p>
<p>I didn't see any picture~</p>
Sorry,im visiting my nephew,peobably ill send you at 4pm jakarta time.im having school now<br>
<p>MOAHAHAHAHAHAHAHAHAHAHAHAHAHAAAAA</p>

About This Instructable

80,220views

667favorites

License:

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