Ez Arduino MiniKame Mk2 - Making a 8 DOF 3D Print Quadruped Robot

15,122

66

68

About: We love robotics!

This is an inexpensive 3D printed 8 DOF quadruped robot using Arduino kind control board. It has two playing modes. One is autonoumose pilot mode which the robot walks and performs action randomly. The other is control mode where the robot is controlled by iPhone or Android phone via BLE technology.

This instructable page contains detail of steps in sequence of videos to people who are interested to build one.

We have a hexapod robot, you may like to make it too, see here.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Printing 3D Models

You can download the 3D printed STL models here. Those samples are printed in PLA. Suggested parameters for slicing the models to print are as followings. You may adjust them to fit the 3D printer you're using.

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

If you don't have a 3D printer, you may find online 3D print service.

Step 2: Software

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: Electronics Components

    The electronic components can be found in online store such as ebay, amazon, aliexpress and etc.

    Main -

    • a HuaDuino board, it is Arduino Nano compatible with enhanced features. It integrates everything on a single PCB. It's a lot easier for people to make a bot with it. Embedded battery charging circuit, battery charging is more convenient. It can be found on Amazon and ebay.
    • a single 3.7V 18650 lithium ion battery or battery pack with XH2.54 connector, if you want longer running time getting a pack with two 18650 in parallel. You may like to use this 18650 battery holder. However, it is also fine to use 3.7V 10440 lithium ion and 3.7V lithium polymer battery dimension not bigger than W35mm, L70mm & T60mm. The photo is with two 10440 lithium batteries in parallel.
    • 8 x Tower Pro SG90/compatible 9g servos OR tower pro MG90s/ compatible. Just print the STL models for the type of servo you choose;
    • a female-female dupoint wire or anything you can figure out for connecting two pins;
    • some m2x6 tapping screws

    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 - if you use this type of Bluetooth module, it must use the virtual-gamepad-SPP Android 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 - 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.
    • Below only required for Bluetooth LE module

    The following Arduino code issues AT commands setting BLE module UUID, characteristic and baud rate, assuming the BLE default baud rate is 9600. For running this program 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
      Serial.println("AT+UUID0xDFB0\r"); // uuid
      delay(50);
      Serial.println("AT+CHAR0xDFB1\r"); // characteristic
      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 code by open "firmware.ino"
    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 hip servo
    • D3 to front right leg servo
    • D4 to back right hip servo
    • D5 to back right leg servo
    • D6 to back left hip servo
    • D7 to back left leg servo
    • D8 to front left hip servo
    • D9 to front left leg servo

    Step 7: Calibration

    Using a du-point wire between D12 and 3.3V pin, the robot servos will be set to default angle and in stance position. This is the status for installing servos and having servo arm capping on the correct angle.

    Step 8: Installation of Servo Arms

    while the du-point wire connected between D12 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, finally closes the robot with the top cover.

    Step 10: Plays Using IPhone

    To success doing this part, you must configure CC2540 Bluetooth BLE module, see the step 3 - electronics components
    • 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, and press again 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 and press again it 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

    Microcontroller Contest

    Runner Up in the
    Microcontroller Contest

    2 People Made This Project!

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    68 Discussions

    None
    lilysgrampa

    Question 7 weeks ago on Step 12

    Well I have it made (using HauDuino) and in auto mode it runs fine (grandkids love it) and now I'm trying to connect with an iPhone (using GoBLE). I have an AT-09 !!! Android IOS BLE 4.0 Bluetooth module for arduino CC2540 CC2541 Serial Wireless Module compatible HM-10 but while I can use AT commands to change the baud rate, I can't change the UUID or CHAR. They are UUID=FFE0 and CHAR=FFE1. Any suggestions?

    version=5.3

    5 answers
    None
    manic-3d-printlilysgrampa

    Reply 6 weeks ago

    some firmware version does not take "0x" as hex number prefix, for AT+UUID and AT+CHAR commands, you may try AT+UUIDDFB0 and AT+CHARDFB1

    None
    lilysgrampamanic-3d-print

    Reply 6 weeks ago

    Unfortunately that doesn't work eithor. Is the UUID DFB0 a coded value or something in the HuaDino board?

    None
    manic-3d-printlilysgrampa

    Reply 6 weeks ago

    0xDFB0 and 0xDFB1 are the values of service UUID and characteristics UUID in BLE module., ios app looks for them to make the connection.

    None
    lilysgrampamanic-3d-print

    Reply 6 weeks ago

    Thanks, so to make sure I understand, if I can't change the UUID and CHAR, I'd have to change the GoBle code (which I can't) to get this to work.
    Now to try to find a AT-09 that allows you to change the UUDI/CHAR...

    p.s. my grandkids love the robots.

    If anyone knows where I could get one I'd be very appreciative :>)

    None
    manic-3d-printlilysgrampa

    Reply 6 weeks ago

    you must change UUID and CHAR as they are values in BLE module, not any parts of the robot code.

    None
    ib22861

    5 months ago

    im having trouble with code so I downloaded the firmware code and i copied and pasted the other codes into other tab and im getting compiling errors and exit statuses

    1 reply
    None
    manic-3d-printib22861

    Reply 5 months ago

    download the zip from github, and open minikame.ino in arduino ide software after unzip

    None
    patty87

    10 months ago

    I can upload the program to the bot, and the app connects to the bot, but the controls do not make the bot move at all.

    1 reply
    None
    ib22861patty87

    Reply 5 months ago

    the program doesnt work for me how did you get it to work it just says undefined rerefrence to minkame

    None
    Jian WeiW

    8 months ago

    Hi, I am using arduino nano + shield v3.0 + 4.8v AA rechargable batteries to build up this robot. When i turn on the power to calibrate the servo, the servo is rotating non stop, I cannot ensure whether it is in initial angle.

    None
    MaxR108

    9 months ago on Step 12

    Hello! Thank you for such a nice bot! Assembling and playing is so easy and fun))
    Can you help me with HC-SR04 sensor? I ve outcommented the line to define sensor, but robot turns crazy: moves lost fluidity and it doesnt answer to BLE commands.
    Actually I want to try to change the code for bot could feel the line with the sensor on TCRT5000 and stops before the obstacle with HC-sR04. Is it possible?
    Thanks for reading and I'm appreciate for your response.

    1 reply
    None
    manic-3d-printMaxR108

    Reply 9 months ago

    the only advice to give is to double check HC-SR04 wiring if it is correct on the pins as states in the code. Suggesting you test it with a simple code(you use the Ping example code found Arduino software). Don't know exactly how to do with TCRT5000, but as long as there are enough pins, likely it is possible, but changing the robot code for that is not that obvious. The major logic of the robot is an event loop of commands, there shouldn't be any blocking code otherwise, the interactive control will not be responsive enough.

    None
    TrầnQ

    Question 10 months ago

    I don't have any Huaduino, but i have USB to TTL using CP2102 instead. Can I uploading the code to the BT module through it, and which part of the Firmware.ino should I upload (to the Arduino Nano and the BT module). And I'm using Bluetooth 4.0 UART CC2541 AT-09, is it the same to the one that you used in this project. Thanks for reading and I'm looking forward for your response.

    3 answers
    None
    manic-3d-printTrầnQ

    Reply 10 months ago

    CC2541 AT-09 is BLE, I think you have the right one. Yes, you can use the USB to TTL adapter to configure it , what you need is to use the AT commands to change the UUID, CHAR and BAUD parameters manually.

    None
    TrầnQmanic-3d-print

    Reply 10 months ago

    Thank you so much.
    But I have another problem. Now I can use AT commands to change the UUID, CHAR and BAUD, which means there are some parts of the Firmware.ino that I don't need to upload to Arduino Nano, can you tell me which parts of the firmware.ino that I need to delete.

    11.png
    None
    manic-3d-printTrầnQ

    Reply 10 months ago

    You need all the robot codes You just set parameters of the BLE module to meet the requirement for the Apps.