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 1.1.1.1, and I have a command set up called "prop1" that needs a time parameter. The command would look like this 'http://1.1.1.1/prop1/5000' 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.