
[
click here for a printable version (PDF) of this page ]
PROP-1 101 :: Using a relay to control a fog machine
Oh snap! It's the next GARAGE OF EVIL!! Prop-1 101 HOW-TO! Building on those invaluable lessons learned from our last two
installments, the Simple Push Button Trigger, and the Simple Light Flasher Using the RC-4!
You'd better get yourself a backup pair of knickers now!
MATERIALS LIST
RELATED DOCUMENTATION (local)
The list above of course assumes you have a relay and the means to trigger it. As you know, we here at the GoE are big time fans of the EFX-TEK line of prop controllers and input/output accessories. For example, the ever so handy RC-4 relay board you'll see pictured in this how-to. I should also state that we have no affiliation with EFX-TEK and furthermore we don't even get discounts on their products (but if anyone from EFX-TEK reads this, we'd really like some coupons).
But before we go further…
As you know, the GARAGE OF EVIL!! has long been and shall continue to be a steadfast advocate of killing yourself slowly through beer consumption and other vices. That said, it must be stated that we are staunchly against the practice of killing yourself all at once. If you think you're having trouble getting laid now, just wait till you're dead.
We mention this only (and specifically) because the project outlined herein involves 110V fry your ass deader than Elvis electricity. BE CAREFUL. You're not Elvis! If you die, no one - not even your mom - will pretend you're still alive.
If by some chance you actually are Elvis, I just want you to know I have all your records. Feel free to swing by and hang out.
Now then! Onto the project!
Why did we decide to do a write up for this project? After all it's pretty basic, as you'll see. The reason is, when I did this the first time I'll be damned if I could find a couple decent sources of information. The issue with "simple" projects is that once you complete them you say, "Well that was easy, no use describing that to anyone". Hindsight is funny that way. Thing is, nothing is easy until you dive in and do it. That's why we thought this would be a good way to kick off 2008. It's straightforward, simple, and in one hour you'll be remotely triggering fog from your Prop-1, and that's pretty cool.
Step 1, hacking the trigger:
Here you see a very standard fog machine remote switch. Most all the triggers I've come across work like this one.

MAKE SURE IT'S NOT PLUGGED INTO THE FOGGER BEFORE PROCEEDING
Unscrew it and open it up. Inside are three wires. The center is shared, and the two outside wires are used to close connections. One side (under the light) is of course, the light circuit. The other side is the toggle switch. We're going to modify that side and don't worry, the switch will still work fine when we're done.
Here's what we're looking at:

Now then, let's get to soldering. Strip the leads from your 16G wire, tin them with solder and solder them to the proper posts in the trigger as referenced in the photo above (bottom arrows). Be careful not to unsolder the existing connections in the process. Below, you see the excitement unfold:

Holy crap! We're halfway home!
Now use a careful, precise measurement to find the exact center of the trigger. Then drill a hole that will accommodate the 16G wire, allowing it to pass through the hole. Or chug a beer, and then drill pretty much anywhere that looks OK. We're not building a pacemaker folks.

Once the hole is drilled, grab the other end of the wire and pull it through so you get this:

And yes, I forgot to drill the hole first - but the above process works!
Reassemble the trigger unit like so:

Make sure the serial cable is hooked to PIN7 and the Prop-1 is using the ULN2003A chip:

Now, Hook up the wire to a relay on the RC-4. For no real reason, we chose relay 4, as pictured below:

As you can see, we already have the serial connector running from the Prop-1 to the RC-4, a trigger, and the programming cable (which is connected to my laptop) is connected to the Prop-1.
At this point, it was time to pause for a beer break. Then we wrote up a quick program that allows the Prop-1 to check for the button to be pressed. If it reads a button press it activates the relay - thus allowing a two second burst of fog. Don't be fooled by the picture above. We ended up moving the button to PIN 0 on the Prop-1. Why? I'm a moron that tried to use some bits of a leftover program for the test code. This resulted in forgetting to delete some lines, which in turn screwed up our efforts. Before we figured out the error of my ways, we moved the button to PIN 0 in our troubleshooting efforts.
Here's a picture of me trying figuring out why such a simple program wouldn't work:

I forgot to Photoshop an arrow pointing at me that said "Dumbass in action" so use your imagination.
Minutes later, the code below worked like a champ:
Click Here to Download the Code
'======================================================================
' File..... Fogger-Button-Control.bs1
' Author... Steve-O @ The GARAGE OF EVIL!!
' Web...... http://www.garageofevil.com
' {$STAMP BS1}
' {$PBASIC 1.0}
'
' -----[ Program Descripton ]------------------------------------------
' Using a Radio Shack SPST Switch Button (Part #275-011), connected via
' two wires (WR) on the Prop-1 to PIN0, when pressed, it completes the
' circuit, and the triggers a fogger to run and blast fog when holding
' it down via an RC-4 Control module.
'======================================================================
' -----[ Constants ]---------------------------------------------------
SYMBOL Sio = 7
SYMBOL Baud = OT2400
SYMBOL trigger = PIN0
SYMBOL IsOff = 0
SYMBOL IsOn = 1
' -----[ Program Code ]------------------------------------------------
Main:
DEBUG trigger
PAUSE 200
DEBUG CLS
IF trigger = IsOff THEN Main
DEBUG trigger
PAUSE 200
DEBUG CLS
SEROUT Sio, Baud, ("!RC4", %11, "R", 4, 1)
PAUSE 2000
SEROUT Sio, Baud, ("!RC4", %11, "R", 4, 0)
DEBUG CLS
GOTO Main
Click Here to Download the Code
The DEBUG commands are there so you can see the button press work, thus making troubleshooting easier. Delete them once your code is working as they slow things down.
Now with everything all set, we pushed the button, and behold… fog!

This page was last modified on: February 25, 2008 08:50:52 am