In other words, you can program a computer to decide when to spurt out fog.
We did this as part of our Crate Beast project.
This is a very simple project that uses a Prop-1 controller to tell a glycol fogger when to shoot a burst of fog. It is very similar to our X-10 fogger remote control, except that we are shooting fog when the microcontroller wants to, not on remote control via X-10.
The Prop-1 controller (and the Basic Stamp 1 from which it was derived) communicates with the outside world through a set of eight wires ("pins"), marked on the board as P0 through P7. Any of these wires can be set up to serve as an input or output. By convention, P0-P5 are used for output and P6-P7 are used for input. Parallax modified P6-P7 to make it easier to do input with them (by adding pullup and pulldown resistors), and P0-P7 to make it easy to do output (presenting buffered output on OUT0 through OUT7) But exactly how these pins are used is your choice.
In order to use a pin for output, you must:
We will use buffered output OUT0 through OUT7 to control a relay that tells the fogger to shoot fog.
The only way to be certain that this project will work with any fogger is
to take the fogger's own remote control and
teach the Prop-1 to press the "fog" button on that remote.
This is the only method that will work for all foggers.
We do this by using a
relay
(a switch that is operated by an electrical signal).
We put the relay switch in parallel with the fogger's switch.
Then, whenever the Prop-1 energizes the relay, it will short out the fogger's switch and make it shoot fog.
This is very similar to our
X-10 fogger remote control
project, except that project was designed for one specific model of fogger,
and this one will work with anything.
Following are some relays with 12 Volt DC coils [as of October 2005].
You would use these with a 12 VDC wall wart
and the Prop-1 power switch in position 2.
[If you power your PROP-1 from some other voltage,
like 24 VDC in order to drive a particular solenoid valve,
you will need a different relay, with a coil that matches that power supply.]
Please see purchasing electronic parts.
Background Material
If you are unfamiliar with using microcontrollers, we suggest that you first read:
Hardware
Basic Approach
Glycol foggers
are available in
many models.
Different companies use different electrical connections to tell the fogger when to shoot fog.
Some use a high voltage, some low voltage.
Some use an IEC power connector, some use telephone connectors, or 1/4" photo jacks.
We would like this project to work for any fogger out there.
Hardware Connection
The hardware connection is very simple.
Just attach the
relay
coil to the Prop-1 output.
Then connect the relay contacts in parallel with the fogger's "fire" switch.
Relay Selection
You must select a
relay
with a "coil" specification that matches the output of the Prop-1's
buffered
OUT0 through OUT7
outputs.
When the Prop-1 power switch is in position 2, this is the same voltage that
the wall wart power supply feeds into the Prop-1.
| part number | description | contacts | coil | price |
|---|---|---|---|---|
| Radio Shack #275-241 | 12VDC/1A SPDT Micro Relay | SPDT 1A at 125VAC | 12VDC, 37.5mA, 320Ω | $4.29 |
| Radio Shack #270-206 | 12VDC/5A DPDT Plug-In Relay & Socket | DPDT 5A at 125VAC/250VAC/32VDC (resistive) | 12VDC, 70mA, 160Ω | $9.39 |
| Radio Shack #270-218 | 12VDC/10A DPDT Plug-in Relay | DPDT 10A at 125VDC | 12VDC, 130mA (?), 160Ω | $8.39 |
| Radio Shack #275-249 | 125VDC/5A DPDT Mini Relay | DPDT 5A at 125VAC | 12VDC, 60mA, 200Ω | $5.29 |
| Radio Shack #275-248 | 125VDC/10A SPDT Mini Relay | SPDT 10A at 125VAC | 12VDC, 30mA, 400Ω | $4.29 |
The exact procedure will depend on exactly what fogger and controller you have.
We will take several examples to give you the feel...
Gemmy Manual Remote - year 2005
Gemmy Timer Remote - year 2002-2005
This is a timer remote for a Gemmy fogger.
This particular one was purchased in 2005,
but it is identical to the ones sold in 2002.
It looks like the electrical connections that Gemmy uses betwen fogger and
the remote control have stayed the same over many years.
Elation Master Blaster 1500
This is the control panel for an Elation Master Blaster 1500
fogger.
This fogger can be controlled in several ways:
Any fogger that is operated with a pushbutton can be modified this way!
In order to prepare for input and output, you need to tell the Prop-1 which of the eight pins
are used for input and which are for output.
[This isn't always necessary, as the Prop-1 has certain "default" values that
take effect until you decide to change them.
But when I write a program, I dislike making assumptions,
so I explicitly tell the Prop-1 what I want to do.]
This is done by setting "DIRS" equal to some value.
Another thing that I like to do in the front of the program is to clear all output bits.
You can set all the bits at once by assigning a value to PINS.
Example:
Here is a simple example:
Here is a slightly more readable example:
If you hook a
light emitting diode
to
P0,
you can make it blink on and off.
If you hook a
solenoid valve
to
OUT0,
you can make it puff regularly timed blasts of air.
Since we are hooking up to a fogger, this same program will send short bursts of fog.
Copy the following program from this web page, and paste it into the BASIC Stamp Editor's
program window.
Using
positive logic,
the Prop-1 turns something on by sending out a value of 1.
Hacking The Fogger
Our goal is simple.
We are not trying to build a special controller to replace the fogger's own.
We are simply finding the fogger's own button that you press to shoot fog - and
put the relay contacts in parallel with that.
outside the remote
inside the remote
outside the remote
inside the remote
But note that it has a manual pushbutton!
Programming
Initialization
"Initialization" is the beginning of the program where things are set up
for later use.
Normally, the program only executes the initialization part once - when you turn it on.
The value that is assigned starts with "%".
This means that it is a binary value,
with each digit being a "0" or "1", and corresponding to an I/O pin.
When setting DIRS, "1" means the corresponding pin will be used for output and "0" means input.
' 76543210 ' bit positions
DIRS = %00111111 ' make P7-P6 inputs, P5-P0 outputs
PINS = %00000000 ' all outputs off
Setting Output
The output can be set by using "LOW" and "HIGH" statements.
[There are also other ways to control output.]
These instructions will work, but they aren't very readable.
Some day you might need to come back to an old program and change it,
so I prefer to put in some comments
and refer to the pin and value it takes with symbols.
HIGH 0
PAUSE 1000
LOW 0
What this does:
SYMBOL ShootFog = 0 ' PIN0 connected to fogger
HIGH ShootFog ' turn on the fogger
PAUSE 2000 ' wait 2 second while fog comes out
LOW ShootFog ' turn off the fogger
Example
Now, let's try a very simple program.
All we will do is flip pin 0 on and off; back and forth; on for a second, off for four seconds.
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL ShootFog = 0 ' PIN0 controls fog machine
' 76543210 ' bit positions
DIRS = %00111111 ' make P7-P6 inputs, P5-P0 outputs
PINS = %00000000 ' all outputs off
Main:
HIGH ShootFog ' turn on the fogger
PAUSE 1000 ' wait 1 second
LOW ShootFog ' turn off the fogger
PAUSE 4000 ' wait 4 seconds
GOTO Main ' repeat forever
END