Step #4: Test the Terminals With a Resistor

- There are two types of "ON" switches that you might find on a Halloween prop. The first type is a low current signal switch. These just send a small signal to the control chip on the prop. The second type is a high current power switch. This switch connects the prop to the battery pack and has to handle all the power that is required by the prop. We need to know which type of switch it is so that we can use an appropriate transistor to activate the prop.
- To test which type of switch you have, take a 1kohm resistor and touch the two leads of the resistor to the two terminals of the switch that are connected to the prop. (If there isn't a large enough exposed surface, you can disconnect the switch at the base of the prop and touch the leads of the resistor the terminals of the prop itself.)
- If the animation activates, then it is a low current switch and you will be able to use a low current transistor to activate the prop. If it does not activate, then it is probably a high current switch and you should use a "power transistor" (rated for at least 1amp) to activate it.
Step #7: Add Additional Props



Repeat the previous steps to add additional props. You can control as many props as there are digital output pins on your microcontroller.
Step #9: Sample Arduino Code

//Here is some really basic sample code that you can use to test your system.
int PropOnePin = 8; // Prop One connected to digital pin 8
int PropTwoPin = 9; // Prop One connected to digital pin 9 int PropThreePin = 10; // Prop One connected to digital pin 10 int PropFourPin = 11; // Prop One connected to digital pin 11 int PropFivePin = 12; // Prop One connected to digital pin 12 int SensorPin = 3; // sensor connected to analog pin 3 int SensorVal = 0; // variable to store the value read
void setup() { pinMode(PropOnePin, OUTPUT); // sets the digital pin as output pinMode(PropTwoPin, OUTPUT); // sets the digital pin as output pinMode(PropThreePin, OUTPUT); // sets the digital pin as output pinMode(PropFourPin, OUTPUT); // sets the digital pin as output pinMode(PropFivePin, OUTPUT); // sets the digital pin as output }
void loop() { SensorVal = analogRead(SensorPin); // read the input pin if (SensorVal >100) { digitalWrite(PropThreePin, HIGH); digitalWrite(PropFourPin, HIGH); digitalWrite(PropTwoPin, HIGH); digitalWrite(PropOnePin, HIGH); digitalWrite(PropFivePin, HIGH);
delay(10000); digitalWrite(PropThreePin, LOW); digitalWrite(PropFivePin, LOW); digitalWrite(PropOnePin, LOW); digitalWrite(PropTwoPin, LOW); digitalWrite(PropFourPin, LOW);
delay(5000); digitalWrite(PropThreePin, HIGH); digitalWrite(PropFourPin, HIGH); digitalWrite(PropTwoPin, HIGH); digitalWrite(PropOnePin, HIGH); digitalWrite(PropFivePin, HIGH);
delay(10000); digitalWrite(PropThreePin, LOW); digitalWrite(PropFivePin, LOW); digitalWrite(PropOnePin, LOW); digitalWrite(PropTwoPin, LOW); digitalWrite(PropFourPin, LOW); delay(5000); } }
Step #10: Enjoy Your Automated Halloween Props



Now all you have to do is set up the props in your haunted house and enjoy the fun of scaring your guests.
Hi there! We have linked this Hack Tutorial in our blog. We are looking for more ideas for our incompany Halloween party!
Trick or treat!
http://www.cooking-hacks.com/blog/trick-or-treat-8-amazing-halloween-hacks-you-can-make-with-arduino
I saw am following your article for this project, printed in the magazine. Great project and thanks a ton for putting this out there.