Ez Arduino Spidey - Making a 12 DOF 3D Printed Quadruped Robot

28,639

174

65

Introduction: Ez Arduino Spidey - Making a 12 DOF 3D Printed Quadruped Robot

About: We love robotics!

This is an inexpensive 3D printed 12 DOF quadruped robot using Arduino kind control board. It has two playing modes. One is autonomous pilot mode which the robot walks and performs actions randomly. This is the default. The other is control mode where the robot is controlled by iPhone or Android phone via BLE technology. This page should guide everyone to make one easily.

We have an hexapod robot, you may be interested to make it too, see here.

Step 1: Printing 3D Models

Download the 3D printed STL models files here. Suggested parameters for slicing the models to print are as followings. You may adjust them to fit the 3D printer you're using. If you don't have a 3D printer, you may find online 3D print service.

  • bottom/top thickness: 1mm
  • shell thickness: 1.2mm
  • ayer height: 0.2mm fill
  • density: 10%
  • support: yes
  • adhesion type: skirt or brim

Step 2: Software

Software are free to download:

Robot Code -

  • Arduino code on githup
  • uploading the Arduino code by open firmware.ino in the Arduino Software, see step 10 on IOS app and step 11 on Android app to control the robot.

for HuaDuino, in Arduino IDE software:

the board selection: "Arduino Nano", processor "ATmega328" for AVR Boards support version 1.6.20 or older;

the board selection: "Arduino Nano", processor "ATmega328 (Old Bootloader)" for AVR Boards support version 1.6.21 or newer.

Control Apps -

  • goBLE - iOS app on Apple Store
  • playBLE - Android app on Google Play
  • virtual-gamepad-BLE - Android app contributed by a supporter, for Android 5.0 and latest.
  • virtual-gamepad-SPP Android app contributed by a supporter for HC-06, HC-05 and SPP-CA classic Bluetooth 4.0 SPP module; compatible to Android 4.0 and above

Step 3: Hardware

The components can be found in ebay, amazon, aliexpress, DX and etc online store.

Main -

Bluetooth Module - this module is optional if you don't need App control

  • a HC-06, HC-05 and SPP-CA classic Bluetooth 4.0 SPP module - this is optional if you don't need App control. If you use this type of Bluetooth module, it must use the virtual-gamepad-SPPAndroid app for control; baud rate must be set to 115200; see this tutorial to configure the baud rate using AT commands;
  • Or
  • a BT-05 CC2540 Bluetooth LE module - this is optional if you don't need App control. In fact, there are many BLE modules named differently, but they are built with CC254x chip. Examples such as HM-10 and CC41-A are the typical you can find in the market. Since the firmware is different, the AT command set may vary too. You may use this code to identify them. To work with the robot code and the apps, baud rate is required to set to 115200; service UUID must set to 0xDFB0 and characteristic UUID must set to 0xDFB1 using the AT commands. Below is the code intended to do that automatically but it may not work if you have different one.. The reference of the AT command set to configure BT-05 BLE can be downloaded here. You don't need this module if you like to make this gamepad to control and play Spidey.

  • Below only required for Bluetooth LE module

The following Arduino program issues AT commands setting BLE module service UUID, characteristic ID and baud rate, assuming the BLE default baud rate is 9600. For running below code in HuaDuino with the module onto it, the S1 switch must be set to the BT position.

void setup() {  
  Serial.begin(9600); //change to fit your ble initial baud_rate, usually is 9600<br>
  Serial.println("AT+UUID0xDFB0\r"); // set service UUID<br>
  delay(50);
  Serial.println("AT+CHAR0xDFB1\r"); // set characteristic UUID<br>
  delay(50);
  Serial.println("AT+BAUD8\r"); // set baud rate to 115200
}
void loop() {}

The steps you should do of uploading the Arduino sketch to HuaDuino for BLE control are as following

  1. insert the BLE module, switch S1 to USB side, turn on huaduino,
  2. uploading the above ble module setup program
  3. turn off huaduino, switch S1 to BT side
  4. turn on huaduino, let the ble module setup program run in few seconds.
  5. switch S1 to USB side
  6. uploading the robot program
  7. switch S1 back to BT side, the robot now can be controlled by BLE

Step 4: Installation of Servos and the Control Board

Step 5: Legs

Step 6: Servo Wiring

Connection to digital pins of HuaDuino are as followings:

  • D2 to front right femur servo
  • D3 to front right tibia servo
  • D4 to front right coxa servo
  • D5 to back right femur servo
  • D6 to back right tibia servo
  • D7 to back right coxa servo
  • D8 to front left femur servo
  • D9 to front left tibia servo
  • D10 to front left coxa servo
  • D11 to back left femur servo
  • D12 to back left tibia servo
  • D13 to back left coxa servo

Step 7: Calibration

Using a female-female dupoint wire between A5 and 3.3V pin, the robot servos will be set to default reference angles. This is the status for installing servos and having servo arm capping on the correct angle.

Step 8: Installation of Servo Arms

while the female-female dupoint wire connected between A5 and 3.3V pin, puts the servo arms to the servo shaft

Step 9: Finishing Up

insert the CC2540 Bluetooth BLE module to the board's Bluetooth connector, and slide the S1 switch to the BT side (ignore this step for new version of HuaDuino), finally closes the robot with the top cover and eyes.

Step 10: Plays Using IPhone

To success doing this part, you must configure CC2540 Bluetooth BLE module, see the step 3 - hardware

  • opens the iOS app and closes it the robot
  • after few seconds the BLE paring between the robot and iPhone should be done, you will see the connection symbol changed to green
  • press the top middle virtual button will switch the robot to control mode
  • press bottom middle virtual button will turn back to autonomous self walking mode

Step 11: Plays Using Android Phone

  • open the Android app while robot is on pressing the connection symbol closed the top edge
  • after few seconds you should see listed BLE device and select it and connection symbol should turn to blue when successes
  • press the top middle virtual button it will switch to control mode
  • press bottom middle virtual button will back to autonomous self walking mode

Step 12: Battery Charging

  • plugs a 5V power source micro USB cable to the robot USB port
  • a red light indicates charging
  • a green light indicates charging completed

Make it Move Contest

Runner Up in the
Make it Move Contest

1 Person Made This Project!

Recommendations

  • Recycled Speed Challenge

    Recycled Speed Challenge
  • Make it Move Contest 2020

    Make it Move Contest 2020
  • Build a Tool Contest

    Build a Tool Contest

65 Discussions

0
eric.ringeval59
eric.ringeval59

5 months ago

Je l,ai fait avec un arduino uno et une carte d'extension. Bien-sur j'ai du modifier le corps pour l'arduino et le code que j'ai totalement recréé pour l'arduino et le module bluetooth.
Mais pour une raison que je ne trouve pas , le bluetooth s'éteint et se rallume.

IMG_20200322_211239826.jpgIMG_20200322_211639452.jpgVID_20200321_010705844.gif
0
philippwerth
philippwerth

Question 6 months ago

Hey,


I have build the
spider, download the Code from GitHub and changed nothing. Nevertheless is the
spider doing not what she has to do. She
pulls out over and over, occasionally trys to run some steps,


but fails after less
steps. I bought myself this HuArduino:


https://www.ebay.de/itm/HuaDuino-Arduino-Compatible-Board-with-Lithium-Battery-Power-Up-and-Charging/312249230239?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Moreover work the
connection between my Android mobile phone and the BLE- Modul, but doesnt
respond to the input from the buttons.


Could it be that,
because the HuArduino has no switch?

0
manic-3d-print
manic-3d-print

Answer 6 months ago

It is update version of hauduino, it doesn't need the swtich for BT and USB, just disconnect from USB, Serial will take input from BT module. You have a video to show your problem?

0
roman.genkhel
roman.genkhel

7 months ago

Thank you for your great job !
Just broke "H" shaped part, middle part is very weak ...
Im Going to try your design with PCA9685 (i2c PWM controller) and MPU-6050 (accelerometer), leg will moving down till accelerometer feel changing of body orientation, so, robot should detect borders and moves on rough terrain)

0
manic-3d-print
manic-3d-print

Reply 7 months ago

Great! Pretty sure many people will like to see it walks on rough terrain.

0
roman.genkhel
roman.genkhel

Reply 7 months ago

I will share result, even if i failed.
Btw: i manage to assembly your model, thank you. Going to write program

P_20200202_021639.jpg
0
awilliams128
awilliams128

10 months ago

for programing were is the S1 switch located I can not find it? I can not get it to connect to a computer

0
manic-3d-print
manic-3d-print

Reply 10 months ago

new version of huaduino doesn't need that switch, you can ignore this step.

0
awilliams128
awilliams128

Reply 10 months ago

how do I get it to connect to the computer to upload the program?

0
manic-3d-print
manic-3d-print

Reply 10 months ago

this video will be helpful

0
JonathanA202
JonathanA202

10 months ago

Hola me podrías pasar un enlace donde se explique el funcionamiento fisico de este proyecto (ecuaciones, calculos ,etc)

0
wmmacle
wmmacle

10 months ago

Perfect project for a new maker. Test your servos! I bought a 20 pack from china and 4 were bad (2 stripped, 2 seized). Of course, all 4 made it into my first build attempt. Swaping them out wasn't super difficult. Just a waste of time and added stress on the parts to keep disassembling/assembling.

0
JorgeH77
JorgeH77

1 year ago

Hola Manic, las conexiones para arduino nano con placa controladora como seria? ya que en el mercado no cuento con la huadino.

0
manic-3d-print
manic-3d-print

Reply 1 year ago

no Nano! You can buy the huaduino in ebay, see step 3 for hardware to find the ebay url link

0
luis.j.padilla
luis.j.padilla

Question 1 year ago

Hi Manic,
I tried not to ask for help, but i cant seem to change the demo to control mode and its driving me nuts, LOL. These are the facts,
-I am using PlayBle,
-I can connect to the Bluetooth, the app icon turns blue..
-set the service UUID to 0xDFB0 the characteristic UUID to 0xDFB1 and the Baud to 115200.(included evidence).
-I am using the BT(HC-06) seen in the picture, which version is Firmware V3.0.6,Bluetooth V4.0 LE.

I connected the BT to a USB serial and used Tera Term to check the traffic between the BT and the PlayBLE app and i can see traffic(see the screenshot).If i run the robot code without the servos, activate the serial monitor and use the app, then i get no traffic. Any suggestion?

Great design by the way, everyone at the office is crazy about the spider.

Regards,

Luis

Bluetooth_parameters.jpgtraffic between playble and the bluetooth.jpgBT.png
0
manic-3d-print
manic-3d-print

Reply 1 year ago

Are you using the HuaDuino board as we suggested? There is a S1 switch to control the route of rxtx pins to USB TTL or BLE modue. You must set it correctly. By the way, there is a new android app released. It works better.

0
luis.j.padilla.mercado
luis.j.padilla.mercado

Reply 1 year ago

Yes, i used a huaduino. I mounted a second spider for my son and had exactly the same issue with the bluetooth.