Automatic Fist Bumper

by warheroifiam1 in Circuits > Arduino

574 Views, 2 Favorites, 0 Comments

Automatic Fist Bumper

IMG_0061.JPG
IMG_0062.JPG

have you even laid down a sick burn or told an awesome pun and there was no one close enough or brave enough to give you a fist bump? if your answer is yes then this is the project for you.

if you said no... this is still fun to make.

This being my first arduino project i did.
so should not be too tough, all you need is


an arduino, i got a kit from amazon on sale for 50 dollars, it included a small manual a bread board and some extra sensors and leds.(the kit was a vilros.com product and i used the same box so you might see that name a lot)

a p.i.r. sensor, i got it from radioshack for 7 dollars.

a servo which i also got from radioshack for 7 dollars.

and because of the servo i got i need a capacitor (470uf or greater) for it to work, but it your servo might not have the same problems mine had.

for the fist i used

a glove

a small wooden dowel

some stuffing. (i used some scrap fabric)

and hot glue gun.

i did sew the glove back so you will probably need some thread and a needle.

the box just holds the arduino and a breadboard.

i also used some legos to secure the servo in place but i will get to that later. lets get started

The Fist Used for Bumping

IMG_0038.JPG
IMG_0039.JPG
IMG_0040.JPG
IMG_0041.JPG
IMG_0042.JPG
IMG_0043.JPG
IMG_0044.JPG
IMG_0045.JPG

i started making the fist by cutting the bottom off the glove off then i cut a slit through the middle on one side.
i hot glued the wooden dowel to the inside of the glove through the slit i cut earlier. i tried filling the glove enough that it would still look like a fist but not so much that the weight would overwork the servo.

i also hot glued one of the servos attachments to the bottom of the dowel. after that it was just the matter of sewing closed the slit and the back of the glove and the fingers down so it would form a fist. one of the things i could of done is add more stuffing for the fingers to make it look more fist like.

The Wiring for the Fist for Bumping

IMG_0058.JPG
IMG_0059.JPG
IMG_0057.JPG
IMG_0056.JPG
IMG_0055.JPG
IMG_0054.JPG

although the wiring in the picture looked complicated it is pretty simple.

the pir sensors ground is connected to ground .
the pir sensors vcc is connected to pin 13.
the pir sensors out is connected to pin 12.

the servos white or yellow wire connected to pin 4.
the servos red wire is connected to 5v.
the servos brown or black wire is connected to ground.

the capacitor is connected between the 5v and ground.

in hindsight it might have easier if i color coded the wires.

The Code for Arduino for the Wiring for the First of the Bumping

this code i got from seraine's instructable(https://www.instructables.com/id/Motion-Activated-S...)
i just made a couple of changes to original code like how far the servo spinned and how fast it moved but that is pretty much it. so special thanks to seraine.

CODE

#include <Servo.h>

Servo myservo;

int pos = 0;

long unsigned int lowIn;

long unsigned int pause = 5000;

boolean lockLow = true;

boolean takeLowTime;

int pirPin = 12; //digital pin connected to the PIR's output

int pirPos = 13; //connects to the PIR's 5V pin

void setup(){

myservo.attach(4);

Serial.begin(9600);

pinMode(pirPin, INPUT);

pinMode(pirPos, OUTPUT);

digitalWrite(pirPos, HIGH);

Serial.println("calibrating sensor ");

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

Serial.print("-");

delay(1000);

}

Serial.println();

Serial.println("done");

while (digitalRead(pirPin) == HIGH) {

delay(500); Serial.print(".");

}

Serial.print("SENSOR ACTIVE");

}

void loop(){

if(digitalRead(pirPin) == HIGH){

for(pos = 0; pos < 90; pos += 1)

{

myservo.write(pos); //tells servo to go to position in variable "pos"

delay(5); //waits for the servo to reach the position

}

for(pos = 90; pos>=1; pos-=1) //goes from 90 to 0 degrees

{

myservo.write(pos);

delay(50);

}

if(lockLow){ //makes sure we wait for a transition to LOW before further output is made

lockLow = false;

Serial.println("---");

Serial.print("motion detected at ");

Serial.print(millis()/1000);

Serial.println(" sec");

delay(50);

}

takeLowTime = true;

}

if(digitalRead(pirPin) == LOW)

{

if(takeLowTime){

lowIn = millis(); //save the time of the transition from HIGH to LOW

takeLowTime = false;

}

if(!lockLow && millis() - lowIn > pause){

//makes sure this block of code is only executed again after

//a new motion sequence has been detected

lockLow = true;

Serial.print("motion ended at "); //output

Serial.print((millis() - pause)/1000);

Serial.println(" sec");

delay(50);

}
}
}

The Box Which Contains the Wiring That Uses the Program to Control the Fist of the Bumping

IMG_0047.JPG
IMG_0046.JPG
IMG_0050.JPG
IMG_0049.JPG
IMG_0048.JPG
IMG_0051.JPG

i used the the box that the arduino kit came in. i cut a slit near the top to fit the servos wire and one near the bottom for the pir servo to see through. the pir sensor is really sensitive so it will take a little while to make the hole the right size.

i also glued some small pieces of cardboard in the box to keep the board and arduino in place.

the servo is what gave me the most problems during this project. when started the servo would chose a direction at random which way it would spin so i glued legos on each side of the servo and a lego plate to the box so if the servo started spinning the other way i would just flip it over. it also keeps the servo in place without having to glue it down.

Now Your Done With the The Box Which Contains the Wiring That Uses... You Get the Point

IMG_0060.JPG
automatic fist bumper

enjoy the machine that will not leave you hanging. when you turn it on you just need to wait for at least 30 seconds for the pir sensor to calibrate but after that i will pick up any and every movement.

hopefully your creation will bring as much joy as it has to me