Sunday, October 27, 2013

A Year Already?!

Well that went by fast! It is time again for Halloween. In the true spirit (see what I did there?) of the holiday, we have waited far too long to get started and are dreadfully behind.

One of the main purposes of our over the top decorations each year is to learn something new. This year is no different and we found some really cool technologies to use. Now we love our Netduino and C# is an important language for us to learn, but we made a decision this year to switch to a Python framework working on a Linux controller called a Raspberry Pi.

The biggest benefit to using this controller is it doesn't just run a linear script of code. It is an entire operating system. You can log in and run multiple programs at one time. This importantly includes for us the ability to run to control system, a web server, and a database simultaneously.

Last year we had a computer babysitting the Netduino server and a computer to play sounds for the props. This year it will just be the Pi as a single server to handle everything. And here goes the flow:

The Pi has a database that holds all the sequences. Each sequence is a series of Python commands that sends a signal or plays a sound. There is a web server that shows all the commands and a server that listens on the web for them.

This new setup is very easy to scale up. We can add peripheral devices very easily using a serial protocol called I2C. We just add new props or devices to the command sequence a we're done.

Unfortunately, our attempt to etch our own board this year was a complete failure. However, next year we plan to do a custom series of boards that plug and play like USB.

We love this time of year. Sometimes we get dragged away by other obligations, but I promise to write a lot more about next years progress. Be ready for that to start showing up around May this time, though.

I hope everyone has a wonderful Halloween

Thursday, October 18, 2012

The Full Effect

Yesterday we did a full test of the whole Halloween system and SUCCESS! The motors are moving, the pistons are firing, and all the little switches are lighting up like they are supposed to. It was amazing to see how months of work on code and mechanics translated into a full-fledged system with a lot of extras we never even thought we would/could do when this project started.

One of the cool things we were able to do was add lighting effects to most of the props. We just happened to have some extra space on the board to add them so we thought it would be a cool addition. Now, when a moving prop goes off, a light will shine on it just during its action. That way people won't anticipate props based on light positions. It also will give the whole production a little more quality.

We also have two props that have sound associated with them. The issue here was how to let the sound system know what, when and where to play the sound.

The first thing that had to be done was to create a program that could play media through different speakers depending on the prop activated. Thanks to Adam, we have just that! The program receives a command through USB, determines whether the prop needs sound, and then sends that sound to the appropriate speaker.

So now you get the full show. Phone > Server > Prop with sound and lights. The system handles all these commands almost simultaneously!

The last thing is the PSI sensor. There is a chip that is attached to a pressure hose. The amount of air pressure that pushes against the chip changes the amount of electricity that flows through it. We then measure that and convert to PSI. This value then gets sent to the phone AND a LCD screen inside so people can see what is activated and how much air-pressure we currently have.

We have  all the controls mounted, tested and ready to go. I can't wait to see everyone at Halloween and show off our cool new system! I will try to post videos of any more tests. Enjoy the pictures and videos we have below. Happy Halloween!!!


Wednesday, September 26, 2012

The User Experience

So I have shown through all the previous posts how the mechanics of Halloween work. There are many devices all working together and logically controlled by code through a small micro-controller. This controller is then connected to the internet and given commands through that connection. The end game is to have the user control everything from a simple, intuitive phone app.

This gets a little technical, but for those interested, here is how the commands work: The controller acts like a server on a local network (think of a shared printer you can access from the network). It listens for web commands using whats called HTTP. Really, all this means is that I can go to its address in a web browser and include commands in the URL itself. For example) if the controller has an IP address of, and I have a command set up called "prop1" that needs a time parameter. The command would look like this '' That will set off Prop number 1 for 5000 milliseconds.

Now we have a way to command the props through the internet! However, we don't want to have to type in commands for everything we want to set off. We need a simple interface for this. Luckily, Android has a very easy to use (if you know Java) process for creating your own App! So now it just comes down to designing the App and connecting the buttons to these web commands. The phone is even smart enough to receive a message back from the controller (like current PSI of the compressor) and show it on the screen. A lot of learning and code later we get this, App-O-Ween

Ready to control all the Halloween fun! There is even more we are doing, but I will leave that for next time.

Saturday, September 22, 2012

Making Halloween Go

Today I reached a milestone! The first draft of all the code needed for Halloween is complete. So I figure this is the best time to talk about all the background controls and how they are making Halloween possible this year.

I mentioned in the introductory post that this year we are using something called a Netduino to run everything. In actuality, we are using the Netduino Plus. The main difference is its ability to connect to the internet. Once connected, it will have an IP address that we can access. Without getting too technical, this means we can send commands to it just like going to a web page, but instead of seeing a site come up, the controller send out electric signals to actuators or reads from sensors.

These web commands and signals out and in are handled by using a coding language known as C# to access a special framework. This framework then can logically turn sensor or web input into action. This action can be anything from just turning one of the outputs to sending serial commands to the computer. We actually will be using the serial commands to play music, but more on that later.

The next challenge from here is how to power all the props. This controller can only send out very small amounts of electricity, but the compressor solenoids and lighting require much more. That means we need a relay. A relay will take very small amounts of electricity and open or close various circuits. We can now plug in a light or other device into a socket, but the electricity will not flow until switched on in the relay by our controller. All these things happen very quickly and in some cases so quickly that you perceive them as simultaneous.

So now you know (if you read everything) how the mechanics of Halloween work. We use a lot of different actuators and ties them together with a processor that will switch them on and off with a web command. The next thing to talk about is turning those commands into an app on the phone! Stay tuned....

Thursday, September 13, 2012

The Fire

Sorry it has been a while everybody. I have been spending all extra time not working either thinking about Halloween stuff or working on Halloween code.

Lets talk about fire!
A couple years ago Adam and I wanted to incorporate fire into some aspect of our decorations. It started with a pumpkin head, but a real one wouldn't last long near larger amounts of fire. We played with the idea (briefly) of small-ish fireballs, but we figured we might set some kids on fire.

We settled on propane torch that is used to get rid of weeds. We attached a piston to the trigger and presto! FIRE! Just bury the torch, add a zombie, and enjoy the fear.

The effect turned out great. The fire added a good accent and everybody enjoyed seeing something new. However, the mechanics were always an issue. When the trigger is on an air piston, you get dirt clogging the piston up. Also, the cramped space in the hole made repairs very difficult. When the trigger was in the house the pressure took forever to get to the flame, and the timing go all thrown off. 

Enter Stepper Motor
Using a special motor that takes a given number of 'steps', we can control the torches regulator by turning it up and down varying degrees. This will allow us to use our computer program to tell the fire to be more or less intense based on a number of steps up on the regulator. This also gives us a safety switch. When we say off, the motor will shut the flow of gas completely off. 

Lastly, the motor is small enough for the whole underground system to be placed in a box so everything stays clear of dirt.

This system will gives this year's fire a much smoother and better timed effect.

Friday, August 24, 2012

The Props

The props are the main event! Lets at where they came from and how they will work this year under our new automated approach.

The props are really where the Thomas Family Halloween came from. We grew up going to Disney and riding The Haunted Mansion. We wanted something that could pop out at you just like the ride.

So we made a piston out of PVC pipe, put a scary mask on the end and BAM pop-up guy. He still scares people every year even though he has been haunting the front yard for about a decade now. Over the years, we have added an opening coffin, a swinging ghost and a screaming clown. All these are based on pneumatic devices running off of a compressor in the garage. We would bring a hose in from the compressor, then you would manually release air out to all the props making them go off when unsuspecting/ already crying children would approach.

This year the props won't change at all! Exciting right? However, instead of pulling hoses into the house, then out of the house, then having to sit at a table to let air into the props we will be using electric air solenoids. These work by letting air in when powered. So all you have to do is connect power and prop goes on, disconnect and prop goes off.

 No more miles and miles of air hoses!

The next challenge is to switch the power on from anywhere you want using a micro-controller and the internet. However, that is another topic.

Saturday, August 11, 2012

The Challenges

So, here we are. We have decided to activate Halloween prop (or any physical thing) from a phone. Here is what we are facing:

  • 4 props acting independently
  • 2 sound effects (sound attached to props)
  • Music playing separate from sound effects
  • Lighting effects (lights attached to props)
  • House lighting

Not too bad right? This is essentially our setup every year.

Enter automation:

We have to find a way to control the props automatically. In the past we have physically pushed air to make the props go up and down. This year we will have to find a way to do this mechanically.

We then have to find a way to communicate which props we want. Since we want to do this through a phone we have to use Internet Protocol (IP). This means we have to code a program to listen for commands over the internet and activate the props we want. We also have to create an 'App' to send those commands and be dynamic enough to handle changes in IP addresses, Prop name, execution times, ect.

We then have to find a way/create a way to connect all the peripherals to each prop (ie if a ghost pops out it should say "BOO!!!" with lights on it.)

Its not landing a rover on Mars, but it is still a lot for two full-time workers with limited development experience. More detail on the above as they become worked on/complete/abandoned.

Should be a good time!