Introduction: SPAZNIC THE CREEP EYE SATELLITE!!!

Picture of SPAZNIC THE CREEP EYE SATELLITE!!!

Introducing Spaznic the Creep Eye Satellite!!
This is an arduino project that is a variation of the Halloween Props That Turn to Look at You as you Walk by DIY Hacks and How Tos.

What you will need for this project:

  • Styrofoam sphere ( 2 seperate halves)
  • Servo
  • Plastidip
  • Soldering Iron
  • Hot glue gun
  • Metallic Spray paint
  • Black acryllic paint
  • 5 10kohm resistors
  • 5 ambient light sensors
  • Good length of wires to create jumpers
  • breadboard
  • Arduino Uno microchip
  • Wire cutters
  • gloves (for safety when soldering)
  • Cardboard/construction foam

Step 1: Shell

Picture of Shell

So the first thing that we will need is to make a "shell" that is spacious enough to hold all the circuity neatly as well as to serve its function of looking like a satellite. So i have acquired a Styrofoam ball that came in two separate pieces. Both halves are 8'' in diameter and 4'' in height, the cost for one of the halves was appromixately $7.53 and can be found at any art and craft store, i got mine from Hobby Lobby. The same goes for the Styrofoam ring.

Step 2: Design

Picture of Design

Now with our materials its time to go ahead and add unique designs to the shell with the use of the soldering iron. Before doing anything permeate it's always good to lay down your work with either pencil or marker. Now this will be easy since extreme heat eats away at Styrofoam and the soldering iron will give us that steady hand we need to make crisp clean carvings. CAUTION PLEASE WHERE A PAINT MASK WHEN CARVING AND DO IT IN A NICE VENTILATED AREA because the fumes coming off aren't deadly but will make you feel lightheaded.

Now once you have all of your carvings in next a material called plasti dip which comes in either an aerosol or liquid and what it does is that it creates a plastic layer on whatever it comes into contact with price ranges around 7-9 dollars depending on where you get it. They can be found at your local hardware store like Lowes or Home Depot.

The reason why we do this is because when it comes time to paint onto styrofoam with spray paint, the paint will eat away at it but the plastidip prevents that.

Lastly we now need to connect the ring and the shell together with hot glue and then spray paint the entire thing and TADA your done.

*the only thing left that you really need to do is create a lens, i made one out of a bouncy ball i picked up at Walmart and just cut it in half. As well as you may choose to get a hinge so that you can open and close your shell with ease and a hole in the bottom part of the shell so that the servo can fit into.

Step 3: Circuitry Parts

Picture of Circuitry Parts

Now for this next part you will need

  • Arduino uno microchip $34
  • breadboard $5-$9
  • 5 10kohm resistors $1.99 (they come in a pack with 5 in it)
  • 5 ambent light sensors $1.99 (they come in a pack with 5 in it)
  • Servo $14.99
  • Some wires
  • Wirecutters
  • Gloves and goggles for protection (for when you are soldering)

All these supplies can be found at you local electronic store, i picked mines up from Radioshack and if that doesn't help the try Amazon.com

Now as said in the Halloween Prop instructable, "The brain of this project is the Arduino UNO microcontroller. This board has six analog input ports that are used to measure the voltages coming from the light sensors. The Arduino monitors these voltages over time and calculates which sensor experiences the greatest drop in voltage. This typically results from a person walking in front of that sensor and casting a shadow on it. The arduino then activates a servo to turn the skull to face that sensor and the person standing in front of it."

Step 4: Code

Now the Halloween Props Instructable code and my Satellite code are very similar however i use 5 sensors instead of three but here it. copy it and adjust it to your choosing. To actually control the setting to how you want it to move pay close attention to the float Threshold and the delay because the threshold determines how the servo turns direction wise while the delay is used to tell the servo how fast to move.

#include Servo myservo; //create servo object to control a servoint ResetTimer=0; //sets delay to reset positionint GoalPosition=3; //stores the goal postion (1-5) where the person is standingint GoalPositionDegrees; //stores the goal position in degrees (30-150)int CurrentPositionDegrees=90; //stores the current position in degrees (30-150)int AveragingSpeed=100; //sets how quickly the average values adjust (a lower value changes average value quickly) //quickly. A value of 100 changes the average value slowly // his effectively sets the speed at which the sensors recalibrate themselves to changing light conditionsint PinOneCurrent; //stores current value of pins 1-5int PinTwoCurrent;int PinThreeCurrent;int PinFourCurrent;int PinFiveCurrent;float PinOneAverage; //stores the average value of pins 1-5float PinTwoAverage;float PinThreeAverage;float PinFourAverage;float PinFiveAverage;float RatioPinOne=0.00; //stores the ratio of current pin value to average pin valuefloat RatioPinTwo=0.00;float RatioPinThree=0.00;float RatioPinFour=0.00;float RatioPinFive=0.00;float Threshold=0.95; //sets minimum threshold for sensorsvoid setup(){myservo.attach(A0); //attaches servo to digital pin 13PinOneAverage = analogRead(A1); //reads from sensors to set initial average pin valuePinTwoAverage = analogRead(A2);PinThreeAverage = analogRead(3);PinFourAverage = analogRead(4);PinFiveAverage = analogRead(A5);}void loop(){ //read analog pins 1-5 and set the result as current value PinOneCurrent= analogRead(1); PinTwoCurrent= analogRead(A2); PinThreeCurrent= analogRead(3); PinFourCurrent= analogRead(A4); PinFiveCurrent= analogRead(A5); //adjust average pin values PinOneAverage=PinOneAverage+(PinOneCurrent-PinOneAverage)/AveragingSpeed; PinTwoAverage=PinTwoAverage+(PinTwoCurrent-PinTwoAverage)/AveragingSpeed; PinThreeAverage=PinThreeAverage+(PinThreeCurrent-PinThreeAverage)/AveragingSpeed; PinFourAverage=PinFourAverage+(PinFourCurrent-PinFourAverage)/AveragingSpeed; PinFiveAverage=PinFiveAverage+(PinFiveCurrent-PinFiveAverage)/AveragingSpeed; //calculates ratio of current pin value to average pin value RatioPinOne=(float)PinOneCurrent/PinOneAverage; RatioPinTwo=(float)PinTwoCurrent/PinTwoAverage; RatioPinThree=(float)PinThreeCurrent/PinThreeAverage; RatioPinFour=(float)PinFourCurrent/PinFourAverage; RatioPinFive=(float)PinFiveCurrent/PinFiveAverage; //determine which ratio is the largest and sets the goal position //set goal position if (RatioPinThree < Threshold && RatioPinThree < RatioPinOne && RatioPinThree < RatioPinTwo && RatioPinThree < RatioPinFour && RatioPinThree < RatioPinFive) { GoalPosition=3; ResetTimer=0; } else if (RatioPinOne < Threshold && RatioPinOne < RatioPinTwo && RatioPinOne < RatioPinThree && RatioPinOne < RatioPinFour && RatioPinOne < RatioPinFive) { GoalPosition=1; ResetTimer=0; } else if (RatioPinTwo < Threshold && RatioPinTwo < RatioPinOne && RatioPinTwo < RatioPinThree && RatioPinTwo < RatioPinFour && RatioPinTwo < RatioPinFive) { GoalPosition=2; ResetTimer=0; } else if (RatioPinFour < Threshold && RatioPinFour < RatioPinOne && RatioPinFour < RatioPinTwo && RatioPinFour < RatioPinThree && RatioPinFour < RatioPinFive) { GoalPosition=4; ResetTimer=0; } else if (RatioPinFive < Threshold && RatioPinFive < RatioPinOne && RatioPinFive < RatioPinTwo && RatioPinFive < RatioPinThree && RatioPinFive < RatioPinFour) { GoalPosition=5; ResetTimer=0; } else if (ResetTimer > 100) //after delay resets to position 3 { GoalPosition=3; ResetTimer=0; } else { ResetTimer=ResetTimer+1; }GoalPositionDegrees=GoalPosition*25+15; //converts the goal position to degrees myservo.write(GoalPositionDegrees); //sets the servo position according to the scaled valuedelay(30); //sets how quckly the servo turns (lower numbers turn more quickly) }

Step 5: Breadboarding

Picture of Breadboarding

Now you don't really have to worry about the library Servo.h because its already programmed into the Arduino when the chip is running. So you can just copy this code here or from the site and run it into your Arduino to see if it runs correctly.

Something important about this code is that when it runs it needs to be calibrated to the sensors that you are using. The ones that i am using aren't photo resistors but ambient light resistors and they are a little bit more sensitive.

To deal with this problem its kind of a hit or miss within the code but the area that you want to look at is the float Threshold count. The float Threshold count calculates how much information that it receives from the sensors, runs it through the arduino and thus tells the servo to turn in that direction.

Then lastly you can also mess with the delay setting so that you can tell your servo if you want it to go either fast or slow depending on what you want it to do.
Now it comes down to the wiring part So what we need to build now is what is called a light sensor array.That means we are going to build and array where the servo will turn to different directions based off of how much light is being blocked to each sensor. So for this task we will need 5 10kohm resistors, 5 ambient light sensors, and around 12-15 jumper wires that will go to the the arduino and the servo.

  1. Now when you set it up it should look like this, now when you see the servo, it comes with three color coded wires that stick together where brown is ground, yellow is the signal (basically where you would plug it into the arduino in order to give it information on how to move) and orange/red is the positive.
  2. So from there you will need a breadboard and small jumper wires. One wire needs to go from the ground in the arduino to to the positive side of the board, another wire should go from the 3.3v or 5v on the arduino to the + side of the breadboard(which ever you servo can take, it should say on the box or instruction booklet) opposite side from the ground. Then you should have wires connecting from the board to servo (So the brown cable should have a jumper to where the ground is on the arduino etc...) last but no least we need to establish a signal connection and this and this can be on anywhere on on the arduino digital or analog pins, for me i used analog 0.

  3. Next, is to establish a ground connection so we plug a jumper connection from the ground of the arduino to the + side of the breadboard. Secondly along that side we plug in the resistors into the same side as the ground going from the ground (or power rail) to the half of the board that is closer to the ground(power rail). Afterwards we make another connection to the arduino board by connection jumpers from the breadboard to the arduino's analogy pins 1-5.
  4. Once you have plugged the holes on the arduino with the jumpers then proceed to attach the other ends to the corresponding holes that are on the breadboard where the resistors are attached.
  5. Fifth, we need to create a bridge that links the side with the components on them to the other side of the breadboard so we need to create 5 bridges to the 5 connections we already have..
  6. Lastly its time to set up the last part where we connect our ambient light sources to the other end of the breadboard (opposite of the ground). Theses sources again will be connected to the same row as the bridges that we made in the previous step and thus lastly connected to the negative side of the breadboard in order to complete the circuit. Just remember the that the long side is positive and the short end is negative.

After everything is said and and done it should work like this:

Servo

Step 6: Finishing Touches

Picture of Finishing Touches

Once the servo is completed now its time to extend the ambient light sensors by soldering on wire to give it an extra length that way you can position them anyway of your choosing.

Lastly once everything works out now its time to create a base to put everything on.

Now that the base is created again we use the plastidip to create a coating and then simply spray paint it to the color of your choosing..

Then Tada its done

For more help refer to Halloween Props That Turn to Look at You as you Walk by DIY Hacks and How Tos

Enjoy

Comments

Cool! Make sure you enter this in the halloween contest!

About This Instructable

485views

2favorites

License:

More by Kenshow6873:SPAZNIC THE CREEP EYE SATELLITE!!!
Add instructable to: