CokeBot the Animatronic character.

A robot character made from empty coke cans along with servo motors. We made a prototype back in the summer (2017) and thought it would make a great robot character. We went out and bought a case of coke* and as they are emptied we kept the cans ready for construction. In order, to make the cans safe for children to handle, ring pulls can slice little fingers, we have designed inserts that pop onto the top of the cans as well as parts that house servo motors. We use three servos to control the movements, of the CokeBots arms and neck. There is also the instructions to build a non-animated version which does not use servos.
Supplies:
For this Instructable you will require:
23 Cans,
Strong glue
The 3d printed joiners, of which the files are freely available at Booting

For the animatronic version you will also require:
An Arduino Uno,
3 Servos (metal gear recommended),
It is also recommended to use a servo driver board.

  1. Step 1: Print 3D Files.

    Print off the required 3D parts according to the following list:-

  2. Step 2: Where the parts are used.

  3. Step 3: Build #1


  4. Step 4: Build #2

  5. Step 5: Build #3

  6. Step 6: Build #4

  7. Step 7: Build #5

  8. Step 8: Build #6

  9. Step 9: Build #7

  10. Step 10: Build #8

  11. Step 11: Put it all together.

    So through the process of making the individual parts we have fabricated sections that can now be glued together a piece at a time. Working from bottom to top we glue each part to the next as follows:

    Glue LEG (x2) to HIP, allow to dry.

    Glue TORSO to HIP, allow to dry.

    Glue SHOULDER to TORSO, with part CB_07 (cups), allow to dry.

    Glue part CB_05 (shoulder joints) one to each of the SHOULDER servos, the part should cup the servo with the rest of the part facing downward, allow to dry. Then glue ARM to each of the CB_05 (shoulder joints), allow to dry.

    Finally we glue part HEAD to the neck servo to finish the build.

    *** If you do not want an animatronic version you just reframe from adding the servos and print two extra CB_03, and connect the arms in the same way as the legs, posing the arms according to your desired look ***

  12. Step 12: Coding...

    Now we have him built it is time to get him animated. We will need an Arduino Uno, a servo driver board and of course some code to make the magic happen. In my version of code I've just opted to leave out the servo driver board as with 3 servos we can get away without it. In my code I've also added lights to the eyes for an added effect. If you stick to the standard version, without lights, then comment out the LED control in the code.


    /*

    ----- www.booting.co.uk -----

    Coded by Gary Talman

    Date: 06-01-2021

    Version: 1.00

    */

    #include <Servo.h>

    #include "FastLED.h"


    //############################### servo connections #################################

    Servo head_servo;

    Servo left_arm_servo;

    Servo right_arm_servo;


    //############################### constant values ###################################

    #define eyes 3


    //############################### variables values ##################################

    CRGB eye_data[2];


    //############################### function defs #####################################

    void move_right_up();

    void move_right_down();

    void right_wave();

    void move_left_up();

    void move_left_down();

    void left_wave();

    void move_head_right();

    void move_head_left();

    void move_head_centre();

    void eyes_on();

    void eyes_off();

    void eyes_flash();


    void setup() {

    FastLED.addLeds<WS2812, eyes, RGB>(eye_data, 2); // set up fast led library with2 leds for the eyes

    head_servo.attach(9);

    left_arm_servo.attach(10);

    right_arm_servo.attach(11);

    }


    void loop(){

    move_head_centre();

    eyes_flash();

    eyes_on();

    right_wave();

    delay(2000);

    eyes_off();

    move_head_left();

    delay(1000);

    move_head_right();

    delay(1000);

    eyes_on();

    move_left_up();

    delay(1000);

    move_left_down();

    move_head_centre();

    delay(5000);

    }


    void move_right_up() {

    right_arm_servo.write(0);

    }

    void move_right_down() {

    right_arm_servo.write(130);

    }


    void right_wave() {

    right_arm_servo.write(30);

    delay(200);

    right_arm_servo.write(90);

    delay(200);

    right_arm_servo.write(30);

    delay(200);

    right_arm_servo.write(90);

    delay(200);

    move_right_down();

    }

    void move_left_up() {

    left_arm_servo.write(180);

    }

    void move_left_down() {

    left_arm_servo.write(30);

    }


    void left_wave() {

    left_arm_servo.write(180);

    delay(200);

    left_arm_servo.write(120);

    delay(200);

    left_arm_servo.write(180);

    delay(200);

    left_arm_servo.write(120);

    delay(200);

    move_left_down();

    }


    void move_head_right() {

    head_servo.write(0);

    }

    void move_head_left() {

    head_servo.write(180);

    }

    void move_head_centre(){

    head_servo.write(90);

    }


    void eyes_on() {

    eye_data[0]=CRGB::White;

    eye_data[1]=CRGB::White;

    FastLED.show();

    }


    void eyes_off(){

    eye_data[0]=CRGB::Black;

    eye_data[1]=CRGB::Black;

    FastLED.show();

    }


    void eyes_flash(){

    for (int i=0;i<4;i++) {

    eye_data[0]=CRGB::White;

    eye_data[1]=CRGB::White;

    FastLED.show();

    delay(200);

    eye_data[0]=CRGB::Red;

    eye_data[1]=CRGB::Red;

    FastLED.show();

    delay(200);

    }

    }


    This code is provided as an example of one way to control him, I'm sure you can get creative and get him responding in other ways. Also it is worth checking your servo minimum and maximum values, and changing the values, in the code, so you do not get chattering, or indeed burn out your servos.


    Full instructions and files are available at http://www.booting.co.uk/articles/files/CokeBot.pdf

    3D Files: http://www.booting.co.uk/articles/files/CokeBot3dFiles.zip

    Arduino code: http://www.booting.co.uk/articles/files/cokebot.ino


    Other projects are available on our website.

Comments