Barney the Feet-Eater

by MushroomRaven in Circuits > Arduino

297 Views, 3 Favorites, 0 Comments

Barney the Feet-Eater

1655297859881.jpg
1654979346678.jpg
1fae883f5515d88f7137f8c1e00c9146.jpg
Barney gone wild

Concept:

Inspiration for this was a video with octopus arm, so I also wanted to make a mechanical pet. My fascination towards creepy lead me to the idea of a melting tank spider. I changed the concept of a tank into just a mini car, since it is as stable, simpler and you are not suppose to see it anyway (I thought caterpillar tracks would fit into melting theme but I also changed that). There was some inspiration of wiggly animations of the bosses from Dark Souls. Spiders also have one thing in common with foot fetish: they make me uncomfortable.

Supplies

For spider

  • Black Plastic box
  • Wood pieces: popsicle sticks, craft wood pieces (I had some canvas wedges so i just used them)
  • Wire nails
  • Black crafting fabric
  • Polyethylene Packing Foam
  • Hot glue gun
  • Black Isolation tape

Arduino

  • Jumper wires
  • Kit wheels
  • Ultrasonic sensor
  • 2 mini Servo's
  • 2 dc motors
  • L298N DC- motorcontroller
  • Breadboard Soldeboard (https://www.amazon.nl/GeeekPi-Breadboard-Experimen...
  • PS2 Joystick
  • 2 9V batteries
  • dc cable with battery socket

Coding & Wiring

sketch.png
#include <Servo.h>// constants won't changeconst int TRIG_PIN  = 2;  // Arduino pin connected to Ultrasonic Sensor's TRIG pinconst int ECHO_PIN  = 3;  // Arduino pin connected to Ultrasonic Sensor's ECHO pinconst int SERVO_PIN = 4; // Arduino pin connected to Servo Motor's pinconst int DISTANCE_THRESHOLD = 50; // centimetersServo servo; // create servo object to control a servo// variables will change:float duration_us, distance_cm;//----------------------------------------------------------------#define enA 9#define in1 5#define in2 6#define enB 10#define in3 7#define in4 8int motorSpeedA = 0;int motorSpeedB = 0;void setup() {  pinMode(enA, OUTPUT);  pinMode(enB, OUTPUT);  pinMode(in1, OUTPUT);  pinMode(in2, OUTPUT);  pinMode(in3, OUTPUT);  pinMode(in4, OUTPUT);  //SENSOR-------------------------------------------------------------  Serial.begin (9600);       // initialize serial port  pinMode(TRIG_PIN, OUTPUT); // set arduino pin to output mode  pinMode(ECHO_PIN, INPUT);  // set arduino pin to input mode  servo.attach(SERVO_PIN);   // attaches the servo on pin 9 to the servo object  servo.write(0);}//-------------------------------------------------------------------void loop() {  int xAxis = analogRead(A0); // Read Joysticks X-axis  int yAxis = analogRead(A1); // Read Joysticks Y-axis  // Y-axis used for forward and backward control  if (yAxis < 470) {    // Set Motor A backward    digitalWrite(in1, HIGH);    digitalWrite(in2, LOW);    // Set Motor B backward    digitalWrite(in3, HIGH);    digitalWrite(in4, LOW);    // Convert the declining Y-axis readings for going backward from 470 to 0 into 0 to 255 value for the PWM signal for increasing the motor speed    motorSpeedA = map(yAxis, 470, 0, 0, 255);    motorSpeedB = map(yAxis, 470, 0, 0, 255);  }  else if (yAxis > 550) {    // Set Motor A forward    digitalWrite(in1, LOW);    digitalWrite(in2, HIGH);    // Set Motor B forward    digitalWrite(in3, LOW);    digitalWrite(in4, HIGH);    // Convert the increasing Y-axis readings for going forward from 550 to 1023 into 0 to 255 value for the PWM signal for increasing the motor speed    motorSpeedA = map(yAxis, 550, 1023, 0, 255);    motorSpeedB = map(yAxis, 550, 1023, 0, 255);  }  // If joystick stays in middle the motors are not moving  else {    motorSpeedA = 0;    motorSpeedB = 0;  }  // X-axis used for left and right control  if (xAxis < 470) {    // Convert the declining X-axis readings from 470 to 0 into increasing 0 to 255 value    int xMapped = map(xAxis, 470, 0, 0, 255);    // Move to left - decrease left motor speed, increase right motor speed    motorSpeedA = motorSpeedA - xMapped;    motorSpeedB = motorSpeedB + xMapped;    // Confine the range from 0 to 255    if (motorSpeedA < 0) {      motorSpeedA = 0;    }    if (motorSpeedB > 255) {      motorSpeedB = 255;    }  }  if (xAxis > 550) {    // Convert the increasing X-axis readings from 550 to 1023 into 0 to 255 value    int xMapped = map(xAxis, 550, 1023, 0, 255);    // Move right - decrease right motor speed, increase left motor speed    motorSpeedA = motorSpeedA + xMapped;    motorSpeedB = motorSpeedB - xMapped;    // Confine the range from 0 to 255    if (motorSpeedA > 255) {      motorSpeedA = 255;    }    if (motorSpeedB < 0) {      motorSpeedB = 0;    }  }  // Prevent buzzing at low speeds (Adjust according to your motors. My motors couldn't start moving if PWM value was below value of 70)  if (motorSpeedA < 70) {    motorSpeedA = 0;  }  if (motorSpeedB < 70) {    motorSpeedB = 0;  }  analogWrite(enA, motorSpeedA); // Send PWM signal to motor A  analogWrite(enB, motorSpeedB); // Send PWM signal to motor Bvoid setup() {  //SENSOR------------------------------------------------------------------------------  // generate 10-microsecond pulse to TRIG pin  digitalWrite(TRIG_PIN, HIGH);  delayMicroseconds(5);  digitalWrite(TRIG_PIN, LOW);  // measure duration of pulse from ECHO pin  duration_us = pulseIn(ECHO_PIN, HIGH);  // calculate the distance  distance_cm = 0.005 * duration_us;  if (distance_cm < DISTANCE_THRESHOLD) {    servo.write(110); // rotate servo motor to 110 degree    delay(500) ;    servo.write(0);  } else {    servo.write(0);  // rotate servo motor to 0 degree  }  // print the value to Serial Monitor  Serial.print("distance: ");  Serial.print(distance_cm);  Serial.println(" cm");  delay(500);}<br>

Downloads

Making Case

1654975947194.jpg
1654975947215.jpg
1654975947090.jpg
1655043505415.jpg
1655297859920.jpg
1655297859940.jpg
1655297859999.jpg

The plastic box can differ, I chose this one because it had the right shape.

I cut out the hole for sensor and motors (to connect later with wheels).

The hole doesn't have to have a perfect cut since you can fill it hot glue.

Then i made a lid for the box from foam. It is easy to cut while being sturdy, I cut some more pieces and glued them together to have circular shape of the spider's abdomen.

Then i covered the pieces with thin black fabric, in the abdomen i left small opening so the foam where i cut out two holes could be places on two popsicle sticks that are glued to the box.

I also glued some foam pieces around the box so later i can connect legs and the blade fangs(servos) to it. That part i covered with fabric AFTER the legs were attached.

Legs

1654975947296.jpg
sg90-mini-servo-1500x1500.jpg
1654975946882.jpg
1655297859841.jpg
1655297859793.jpg
1654975947235.jpg

Legs have mechanism of a puppet.

I made a 2 holes in the popsicle sticks and the wood pieces, the wood pieces were suppose to resemble knees(?). You connect the wood with popsicle by putting it in the small holes. Then put some hot glue that when it dries so the nail cant fall out but still can move.

Pattern:

stick wood piece wood piece

stick nail stick nail

stick wood piece wood piece

Same thing did for the fangs but with razor blades at the end and without nails. On one side i glued the little plastic that comes with servo so it can be easily (de)attached to the servo's underneath the fabric. The blades are actually sharp, so I basically put blood, sweat and tears into the project.

For 'eyes' I used buttons connected with hot glue, everything spray painted matt black.

Wheels

On the side of the box i carefully cut out four small hole. Through one i clicked the wheel on the motors (on the end) and on the front i used lego pieces.

You can buy them on the internet/lego store or 3d print it.

https://www.thingiverse.com/thing:2352505

https://www.thingiverse.com/thing:1102710

It's about printing 2 pieces, one you glue to the box and the other you glue to the wheel and then you click them into each other so they would spin.

You could also buy two extra motors and connected in the same place, but you would need to change code and add extra lines for motor C & D (just like for the motor A&B).

Experiments

1655051905173.jpg
1654975947029.jpg
Limbo
Cat ate my homework
1655297859819.jpg

Reflection

During this project a learn a lot, not only how to solder but also that electronics doesn't have to be this difficult to make something fun(sadly they don't always work right). As well a way to design a game/experience using something you can actually touch and not only on a game engine. Electronics could be used to create an immersion, the system in the spider turned out to work slightly different than i intended to, yet it gave the idea of having it own will and people were still creeped out like I planned in the beginning.