"animatronic" Bug Exo-Spine

by TimoKolk in Craft > Costumes & Cosplay

448 Views, 1 Favorites, 0 Comments

"animatronic" Bug Exo-Spine

20220615_113155_001.jpg
20220615_113950_001.jpg
20220615_114118.jpg
bug spine thing.png

So here we have a school project of mine where we had to make something with an Arduino, and i somehow ended up with a bug exo-spine thing that moves its legs when you bend forewards...


Anyways here are the steps i took to make this, including some pain with broken parts.

Supplies

  • Worbla.
  • Foam.
  • Ducktape.
  • Clingwrap.
  • Arduino Uno.
  • Servo.
  • Either a 3-pin Tilt Switch or an Accelerometer.
  • Metal wire.
  • Cardboard.
  • Contact glue.
  • Superglue.
  • Rope or shoelaces.
  • Elastic.
  • Wristwatch straps.

The Gorget

How to Make Duct Tape Patterns for Cosplay // Sylvie Cosplay Tutorial Pt. 3
IMG-20220506-WA0000.jpg
IMG-20220506-WA0006.jpg
IMG-20220508-WA0000.jpg
20220615_114106.jpg
  1. Follow the instructions from this video but for your neck and upper body.
  2. Copy the pattern onto the foam and then glue them together with contact glue. make sure to leave the back open so you can still take the piece on and off.
  3. cover the foam with Worbla and sculpt a design.
  4. glue the wristwatch straps onto the back so you can strap it closed.

The Spine, Internal

20220414_171021.jpg
20220414_195624.jpg
20220414 171043
20220504 143009
  1. Take some cardboard and draw the design for your spine.
  2. then construct the internal mechanism as shown in the pictures for each segment.
  3. at the bottom add an elastic band to make sure the mechanism returns to its starting position.
  4. cut the cardboard into its separate segments.
  5. Add Ducktape to the back to prevent excess movement.

The Spine, External

20220524_124239.jpg
  1. Copy the shapes for the segments you drew on your cardboard and transfer them onto your Worbla at a slightly larger scale.
  2. sculpt the Worbla so there is room underneath for the mechanism.
  3. glue the Worbla onto the cardboard.
  4. make an upper segment without any cardboard with enough room underneath for your Arduino.
  5. add some rope to the bottom segment.

Arduino Option 1, Accelerometer

Screenshot (230).png
20220513 163052
This is how I was initially going to do this project but my parts kept breaking. So I ended up going with Option 2, listed later.


Copy this code into your Arduino.

#include <Wire.h>                     // Wire  library 
#include <Servo.h>                    // Servo library

int ADXL345 = 0x53;                   // The ADXL345 sensor I2C address, included in tutorial

float Z_out;                          // Data output
Servo myservo;                        // Create servo 

void setup() {
  Serial.begin(9600);                 
  Wire.begin();                       // Initiate the Wire library
  
  // Set ADXL345 in measuring mode
  Wire.beginTransmission(ADXL345);    // Start communicating with the device 
  Wire.write(0x2D);                   // Access/ talk to POWER_CTL Register - 0x2D
  
  // Enable measurement
  Wire.write(8);                      // (8dec -> 0000 1000 binary) Bit D3 High for measuring enable 
  Wire.endTransmission();             // End transmision so it won't interfere
  
  myservo.attach(9);                  // Attaches the servo on pin 9 
}

void loop() {
  Wire.beginTransmission(ADXL345);    // Start transmission again
  Wire.write(0x32);                   // Start with register 0x32 (ACCEL_XOUT_H)
  Wire.endTransmission(false);
  Wire.requestFrom(ADXL345, 6, true); // Read 6 registers total, each axis value is stored in 2 registers

  Z_out = ( Wire.read()| Wire.read() << 8); // Z-axis value
  Z_out = Z_out/32;                   // Divide value to make it more sensitive

  Serial.print("Za: ");
  Serial.println(Z_out);

  float y = map(abs(Z_out), 0, 12.8, 0, 120);

  myservo.write(y);                 // tell servo to go to position in variable 'pos'
  delay(4);                         // waits 15ms for the servo to reach the position
}


Make sure you solder your wires.

Arduino Option 2, Tilt Switch

Screenshot (231).png
20220612 125711
So because of broken parts I ended up going with this instead, works fine but is far less nuanced than the other option.


Copy this code into your Arduino.

/* Better Debouncer
 * 
 * This debouncing circuit is more rugged, and will work with tilt switches!
 *
 * http://www.ladyada.net/learn/sensor/tilt.html
 */


#include <Servo.h>


Servo myservo;  // create servo object to control a servo
 
int inPin = 2;         // the number of the input pin
int outPin = 13;       // the number of the output pin
 
int LEDstate = HIGH;      // the current state of the output pin
int reading;           // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin
 
// the following variables are long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0;         // the last time the output pin was toggled
long debounce = 50;   // the debounce time, increase if the output flickers
 
void setup()
{
  pinMode(inPin, INPUT);
  digitalWrite(inPin, HIGH);   // turn on the built in pull-up resistor
  pinMode(outPin, OUTPUT);
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  myservo.write(190);   
  delay(15);    
}
 
void loop()
{
  int switchstate;
 
  reading = digitalRead(inPin);
 
  // If the switch changed, due to bounce or pressing...
  if (reading != previous) {
    // reset the debouncing timer
    time = millis();
  } 
 
  if ((millis() - time) > debounce) {
     // whatever the switch is at, its been there for a long time
     // so lets settle on it!
     switchstate = reading;
 
     // Now invert the output on the pin13 LED
    if (switchstate == HIGH) {
      LEDstate = LOW;
       myservo.write(190);   
       delay(15);    
    }
    else {
      LEDstate = HIGH;
       myservo.write(8 0);  
       delay(15); 
    }    
  }
  digitalWrite(outPin, LEDstate);
 
  // Save the last reading so we keep a running tally
  previous = reading;
}


Make sure you solder your wires.

Putting It Together

20220612_150333.jpg
20220614_174801.jpg
  1. make a flat version of your upper segment.
  2. glue your Arduino onto it
  3. layer your Gorget, Arduino panel, and the upper segment on top of each other.
  4. punch 4 holes through them.
  5. string your rope through the holes.
  6. attach your top piece of spine mechanism to your servo.
  7. attach the rope from the bottom piece of the spine to a belt or pants so the whole construction stays in place when the servo moves.
  8. paint your parts however you want.

You Did It, Now Go Celebrate

  1. Get yourself a cake or something.
  2. Eat it.