SIMPLE and fast way to sense 120VAC with a BS2... Safely

I've just been handed an additional task of sensing the state of a switch on an external piece of equipment, and the only way to do so is to sense whether there is 120 VAC present or not. I have tried passing the voltage through a 0.1uF cap and then rectifying that with a bridge rectifier, then passing the output of that through a voltage divider and filter cap... but I feel that it is exposing my circuitry to possible spikes, etc. THERE HAS TO BE A BETTER WAY!
Optoisolators are not an option at the moment... this has to be done with what I have right now. Is there a better, safer, faster way to sense 120VAC than the convoluted method I have described above? I just need to get a few miliamps at 4.5 to 5.0vdc to my BS2. I could use a relay, but jeez.... that's like using a bulldozer to push a marble...
Ideas?
Thanks
Dave
Optoisolators are not an option at the moment... this has to be done with what I have right now. Is there a better, safer, faster way to sense 120VAC than the convoluted method I have described above? I just need to get a few miliamps at 4.5 to 5.0vdc to my BS2. I could use a relay, but jeez.... that's like using a bulldozer to push a marble...
Ideas?
Thanks
Dave
Comments
Dave
Can you elaborate a bit more? I've got a single hot side 120 VAC lead coming back at me from the switch. I'm guessing I'd need a current limiting resistor befoe the clamping diode... I'm also assuming that the clamping diode is a special diode type, not just an arrangement of diode... which means might work great for NEXT time, but no time to order for this project. But I am interested in just what the clamping diode can do for me... Thanks! ... Also - how would this protect against voltage spikes to my BS2 input pin?
Dave
The inductive clamp will sense current flow in the wire, generating a voltage across the loop when the unit is drawing current from the 120vac.
No good?
Dave
-Phil
In fact. an LED can function as a photodetector, but for maximum sensitivity you might have to mix and match colors. So if you simply had two LEDs and a couple resistors you could probably make an optocoupler adequate for your uses.
Second pewards idea. Inductive probably safest. May think about comparator/op amp though depending on how many turns you use or if you use a current transformer designed for current measurement. You can check the GE AMX4 prints kvp/mA schematics (should be downloadable from their documentation site) for an example of this use.
Frank
Reference #6 on this thread:
http://forums.parallax.com/showthread.php?87014-stamp-life-expectancy
The detection circuit monitored power to each station via a twisted pair wire going back to the control unit... some of the ceiling runs were 30 feet. The Attached circuit in combination with a Basic Stamp II at the control board was essentially all there was to it... everything else was software which in turn drove a 40 Amp 120VAC relay to control the Vacuum Motor.
1. You won't get any inductive coupling by wrapping one wire around another. Any alternating curren in the AC wire will produce an alternating magnetic flux circling the wire. The sense wire has to be a right angles to the magnetic flux to couple to it inductively, not parallel, as it would be if wrapped around the AC line. The correct way to do this is to wrap the sense wire around a magnetic core or toroid, around which, or through which, the AC line also runs.
2. Even if you get an inductive coupling, it will be sensitive to the current in the AC line, not to the voltage present. IOW, if the switch is on, but there's no load, you won't get a reading.
-Phil
And you want to put a homemade detector in a explosive enviroment!
Spend the money and get a engineered device designed for that it will not be worth it if and accident happens.
"Spend the money and get a engineered device..." - I agree with you 100%, but an interesting dichotomy.... If an engineer designs a device that is a valid solution to a problem, at what point does it become engineered? time? credentials? both? ... I'm just curious
Valid Point.
Is Xanatos a Engineer? Or should I say a Professional Engineer?
Is this thing for his home or were he works?
Has it been tested, documented and retested? Does it have a UL certification, EU certification or certification for installation in explosive enviroments?
Im sure theare a million ways to solve this problem. But what are the risk. a few dollars to throw something together or a couple hundres to purchase something already designed for what he want to do.
What are the results of failure in this "Explovise Gas enverioment" He blows up his homemade widget or a factory with people inside.
Are Parallex products rated for explosive enviroments, because someone Is going to ask that I bet?
Today Lawyers can twist and turn anything into somebody else fault.
Savings from a non-certified engineering design - thousands of $$
Cost of an explosion - Priceless
My oops on 1, perhaps false assumption of complete ckt to cause detectable current flow in the second. Get out the cat o' nine tails, left hand rule or 2x lashes if I guessed the wrong hand here!
Frank
The issue, just to clarify, isn't that I will be putting a sensor of my own or anyone else's design in the explosive environment, hence my need to sense the switch via the voltage coming off of it when it is closed... In a different environment at a distance. That environment is where my control box is, and it is a nice, normal atmosphere.
For the immediate function I am simply using the wire coming from the switch to drive a relay, which switches an input on my stamp between 5v and ground. Something analogous to pushing a marble with a bulldozer, but it got the project out the door 100% and on time.
Since it's a prototype/live version, the next dozen or so will not be using a relay, but a nice optoisolator as I would have used here, if I had had them in the evening before the delivery date when the client asked for the change.
I also like the 2N3904 sensor circuit... That's the kind of quick & dirty little thing I would have gone with (capacitively coupled) had I had it at noon yesterday! I'm adding it to my "stuff to try" book.
So thanks again everybody,
Dave