Arduino Powered Wearable Tail

by lovronix in Circuits > Wearables

2286 Views, 11 Favorites, 0 Comments

Arduino Powered Wearable Tail

IMAG1289~2.jpg
Pony tail for my daughter - demo

One day I saw my daughter running around with a jump rope around her hip pretending that she is a pony and that she has a tail. Soon after that I got an idea to make a controlable tail that swings on command.

Components

For this project I needed:

1. Old belt (i used old army belt because of easy size adaptation)

2. Arduino nano

3. Slider potentiometar (first idea was rotary potentiometer, but I had this one laying around so...)

4. Servo motor

5. Battery (I used two 3,7V 2,6Ah in serial connection)

6. Various cables (lying around in garage)

7. Some decorative strings (use any suitable material)

8. Green (or any) LED

9. Resistor

10. 3D printer (optional), or any suitable cases for the components.

Connecting Components

ponyTail_bb.png

First I soldered Arduino on prototype board and connected Ground and Vin from the battery pack (without batteries). After that I connected LED to resistor to pin 4 and to Ground, Servo to Vin (because it didn't work well on 5V pin), Ground and pin 9, and at the end I connected Slide potentiometer to A2, 5V and Ground.

Check schematics.

Code and Testing

Dodatni rep - prototip
Dodatni rep - slaganje na pojas

Arduino code is simple. It reads the slider's data and accordingly rotates servo motor and controles the LED.

#include <Servo.h>
Servo myservo; 
int readA2;
int led = 4;
  
  void setup()
  {
    myservo.attach(9);
    myservo.write(90);
    pinMode(A2, INPUT);
    pinMode (led, OUTPUT);
    digitalWrite (led, HIGH);
  
  }
  
  void loop()
  {
  
    readA2 = analogRead(A2);
    int rep = map (readA2, 0, 1023, 0, 10); // transforming 0 - 1023 values to 0-10
    switch (rep) // 0 means stop, 10 is fastest moving of the tail
    {
      case 0:
        {
          stani();
          break;
      }    case 1:
        {
          mahanje(1000);
          break;
      }    case 2:
        {
          mahanje(900);
          break;
      }    case 3:
        {
          mahanje(850);
          break;
      }    case 4:
        {
          mahanje(800);
          break;
      }    case 5:
        {
          mahanje(750);
          break;
      }    case 6:
  
        {
          mahanje(700);
          break;
      }    case 7:
        {
          mahanje(500);
          break;
      }    case 8:
        {
          mahanje(400);
          break;
      }    case 9:
        {
          mahanje(300);
          break;
  
      }    case 10:
        {
          mahanje(250);
          break;
        }
    }
  }
  

// moving the tail


  void mahanje(int brzina) {
    myservo.write(20);
    delay(brzina);
    myservo.write(160);
    delay(brzina);
  }
  
  void stani() {
    myservo.write(90);
  }

Downloads

3D Printing

IMAG1290.jpg
Untitled_2017-Aug-05_10-52-00AM-000_CustomizedView16632853487.png
Untitled_2017-Aug-05_10-51-43AM-000_CustomizedView10232762070.png
Untitled_2017-Aug-05_10-51-51AM-000_CustomizedView52250917559.png
Untitled_2017-Aug-05_10-51-32AM-000_CustomizedView25384573752.png
poklopac_za_potenciometar_2017-Aug-05_10-52-31AM-000_CustomizedView19231565469.png
poklopac_za_potenciometar_2017-Aug-05_10-52-42AM-000_CustomizedView16214519063.png
poklopac_za_potenciometar_2017-Aug-05_10-52-55AM-000_CustomizedView11188193561.png
IMAG1292.jpg
poklopci_sa_strane_za_dra_Arduino_2017-Aug-05_10-53-46AM-000_CustomizedView33400645598.png
dra_za_Arduino_i_prekida_2017-Aug-05_10-49-20AM-000_CustomizedView7428204991.png
dra_za_Arduino_i_prekida_2017-Aug-05_10-49-29AM-000_CustomizedView55075377347.png
dra_za_Arduino_i_prekida_2017-Aug-05_10-49-37AM-000_CustomizedView39524297561.png
dra_za_Arduino_i_prekida_2017-Aug-05_10-49-45AM-000_CustomizedView10542991772.png
poklopac_za_arduino_2017-Aug-05_10-50-39AM-000_CustomizedView30031315504.png
poklopac_za_arduino_2017-Aug-05_10-51-01AM-000_CustomizedView4719432270.png
IMAG1293.jpg
IMAG1291.jpg
IMAG1294.jpg
rep_-_dra_za_servo_2017-Aug-05_10-48-00AM-000_CustomizedView34274687430.png
rep_-_dra_za_servo_2017-Aug-05_10-48-32AM-000_CustomizedView22127572448.png

Before printing I had to draw the desired design of the boxes that are going to be attached to the belt. I used Fusion 360. There are some great lessons here on the Instructables where I learned how to work in Autodesk Fusion 360.

Here are the links:

  1. https://www.instructables.com/class/3D-Design-Class/
  2. https://www.instructables.com/class/Beginner-3D-Printing-Class/
  3. https://www.instructables.com/class/Intermediate-3D-Printing-Class/
  4. https://www.instructables.com/class/Advanced-3D-Printing-Class/

After creating everything in Fusion 360, I have exported each file to Slic3r Prusa Edition and then saved it as gCode file, no support, 30% infill, infill overlap 75%, brim 5mm, flow 60% (3D printing settings can vary from printer to printer), and printed in on Vertex K8400 printer with PLA.

Finishing and Testing

Pony tail for my daughter - demo
Pony tail for my daughter - wearable

After printing, I had to put all the components together (mind the length of the cables), and test it. After first successful test, I have glued the strings to servo and attached the components to the belt.

That was that.

This is my first instructable. All comments are welcome.

Mission Accomplished!

Wearable Arduino controlled pony tail