Trybotics Logo

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

DESCRIPTION

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.

Description:

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

Description:

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

Description:

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

Attachments

Description:

Description:

Description:

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

Description:

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.

Description:

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

Description:

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.

Description:

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

Description:

  • 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

Description:

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


YOU MIGHT ALSO LIKE