Overall functionality – Halloween 2012

Main functional blocks:

  • Custom controller-application written in C#, running on my PC.
  • Audio-player application, also written in C# using managed DirectX (www.sharpdx.org) and XAudio2. Multi-channel/Polyphonic.
  • I/O Expander created using a Parallax Propeller (8 core microprocessor, 80 MHz), communicating with PC over serial/USB port. Handles all Input/Output like pressure mat input, relay-control for spider, PWM and quadrature encoding for skeleton motor, plus DMX light control.
  • DMX-controlled light fixtures and dimmer pack
  • Spider lift using pneumatics (air cylinder powered by air compressor and solenoid valve)
  • Skeleton on track in ceiling
  1. When no visitors are present the system will play random tracks from this CD. Some of the lights will flicker/pulsate.
  2. Visitor walks up the stairs leading to our porch. A DIY pressure mat (http://supersoda.com/detail.php?id=00000000036) triggers a digital input on the Propeller controller, which sends a command over a serial port to a PC running my custom C# application.
  3. All lights turn off, a sound effort of a creaking door is played, mixed with the violin screech sound from the Psycho movie.
  4. After a few seconds the spider is coming down and a red strobe that is pointing to it will flash. The spider is then raised again.
  5. Flashing multi-color strobe light directed at stationary skeleton and another sound effect played
  6. After a few moments another flashing multi-color strobe light turns on, combined with audio.
  7. Finally a laughter is played, white strobe light is going and the fish line mounted skeleton is moving towards the visitor! The skeleton will stop after a few feet and then go back after a few seconds.
  8. The visitor can now grab some candy. The system resets back for another visitor after a minute to allow some time to step off the porch without triggering another sequence.

Sample code from main controller C# application:

audioPlayer.PauseBackground();
audioPlayer.PlayEffect("Door-creak");
instance.WaitFor(TimeSpan.FromSeconds(2));

audioPlayer.PlayEffect("Violin screech");
blinkyEyesLight.JumpToLevel(0);
instance.WaitFor(TimeSpan.FromSeconds(2));

audioPlayer.PlayEffect("Scream");
spiderLight.SetStrobe(Color.Red, 200);
spiderMover.SetOutput(true);

Skeleton with multi-color strobe light

 

DMX Dimmer Pack, 4 channels, 7A each, 255 levels

 

I/O Expander with DMX connector, breadboard for PWM motor driver, digital input connections and relay board

 

Advertisements

2 Comments

Spider Pneumatic Lift – Halloween 2012

Time to write about some details about our Halloween 2012 project. First off is the Spider Lift. This is a simple mechanical design, basically a hinged wedge driven by an air cylinder. The double-acting air cylinder is hooked up  to a 5-port 4-way 12v solenoid valve with speed-adjustable mufflers. This valve either directs air to the top or bottom of the cylinder, so it will go to either position with pressure force. Applying 12 volts will send the air to the opposite side. I have the resting position at the top, so when the spider is triggered it will come down/towards the visitor, while a red strobe flashes and scream sound effects are played. Most equipment from http://www.frightprops.com. Yes, those are old cabinet doors 🙂

View of mechanical construction of Spider Lift

Picture of the mechanical construction with air cylinder and solenoid valve in view.

Close-up of air cylinder and valve of spider lift

Close-up of the air cylinder and valve. The hairy part is a spider leg 🙂

Full view of spider lift

View of the spider, mounted on top of the lifter. This is in the down position.

, , ,

Leave a comment

Halloween 2012

Some of the highlights of our 2012 Halloween installation:

  • Custom-written C# controller on PC
  • Network Audio Player using managed DirectX (XAudio2)
  • Propeller/Spin IO Expander (handles all IO including DMX)
  • Custom SPIN application with support for DMX, Relay, Inputs, Motor PWN and Quadrature Encoder
  • Pneumatic lifter for spider, triggered by solenoid valve
  • DMX lights: 4x LED RGB-lights, 1x LED strobe light, 1x dimmer pack 4chn
  • Skeleton on track in ceiling, controlled by motor and quadrature encoder (built in lego)
  • DIY pressure mat in stairs
  • Background music and multi-channel sound effects

 

More details to come soon!

3 Comments

IronRuby instead of NAnt or MSBuild?

I tried to use IronRuby in a continuous integration project and it worked pretty good, except when I wanted to use some external GEM to compress/extract zip files, turns out most are written for native un*x… But with a simple call to my trustworthy .NET solved that problem. Good read here: Say Goodby to NAnt and MSBuild

, , ,

Leave a comment

How Not To Lead Geeks

Got a good link from a friend: http://positivesharing.com/2006/03/how-not-to-lead-geeks/

It makes a lot of sense, I’m a strong believer in most of it.

,

Leave a comment

Passing WCF username AND PASSWORD to service handler

The correct way to do this in WCF is to implement IAuthorizationPolicy to replace PrimaryIdentity in the ServiceSecurityContext.

http://www.neovolve.com/post/2008/04/07/wcf-security-getting-the-password-of-the-user.aspx

Leave a comment

Collection of good questions to ask during a .NET interview

Now I just need to learn some of these before I can ask…

http://www.hanselman.com/blog/NewInterviewQuestionsForSeniorSoftwareEngineers.aspx

Leave a comment