View Full Version : In need of some advice.
06-02-2005, 02:24 AM
I am working on a project where I have multiple low and high gas pressure switches. Each switch is wired to a standard 120 V AC line, when the gas pressure gets too low (or too high) the switch will interupt the line. I am trying to use a BS2 to monitor these switches, but I don't know what to use with the stamp to detect whether or not the 120 V AC line is on or off (how to get this 120 V AC to logic inputs). There is probably a fairly simple solution, however I am very new to using Basic Stamps.
Any advice or ideas?
06-02-2005, 02:48 AM
You could put a 120Vac relay in series and then when the power switches off it would change states of the relay, in which you would have the stamp monitoring the contacts of the relay!
This is one of the simpler ways to do it.
You could also use hall affect sensors that detect the AC flux of a powered 120V line. However, if you were in a noisy environment (electrically and magnetically) it might not work for you.
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
06-02-2005, 02:49 AM
Firstly, you mentioned "monitoring". So you are not going to try to control the valves, correct?· Also, what are the consequences of a Stamp system failure? And what kind of enviroment are you operating in?
There are a number of ways to do this. I would suggest you select one that has good isolation from the 120VAC. For example, you could rectify the 120VAC and use a voltage divider to bring the voltage down to 5V, but this leaves your Stamp directly connected to the mains, and failure can fry things and make the entire circuit "hot".
One way would be to get some 3V or so transformers and wire them in parallel·to the solenoid valves. Rectify the output and sample it from a Stamp pin.
Another would be to use Hall effect sensors. You can place them next to the electromagnet in the solenoid valves. It doesn't matter if the valves are NO or NC, because you can look for either high or low. I used the same idea on a project for my brother in law. He uses a "deer chaser" sprinkler (IR motion detector) to keep racoons away from his pond. He wanted to add a strobe light, but the sprinkler unit is sealed, with no way to hack it. I used the Hall effect switch idea, and it has operated for about 4 years now.
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot