I am attempting to build a circuit that will be able to tell a Stamp if an AC device (relay, light bulb, or any other 120v item) is on. Anyone have some thoughts on this?
If you note I am looking to sense 120 Volts AC the jpeg you posted looks a lot like one for DC. But I like the fact you didn't suggest a relay. I know the 'button' command will de-bounce the contacts but I am also looking maybe to run this through TTL at some point and it would be better if it were a 'clean' signal.
Well, the opto coupler design is nice and so I thought about how capacitors act like resistors with AC. Look at this one and see what you think. More surgical. less shotgun.
Mike2545
(Some of sam_sam_sam's posts removed) you had to be there. It was colorful)
The zener breakdown voltage for the diodes is set at 10 V by the diode model parameter “bv=10” in the spice net list in Figure above. This causes the zeners to clip at about 10 V. The back-to-back diodes clip both peaks. For a positive half-cycle, the top zener is reverse biased, breaking down at the zener voltage of 10 V. The lower zener drops approximately 0.7 V since it is forward biased. Thus, a more accurate clipping level is 10+0.7=10.7V. Similar negative half-cycle clipping occurs a -10.7 V. <!--split for double ref-->(Figure below) shows the clipping level at a little over ±10 V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ ··Thanks for any··that you may have and all of your time finding them
· · · · Sam
Post Edited (sam_sam_sam) : 1/11/2009 2:47:16 AM GMT
I'm glad cooler heads prevailed, and with the circuit I drew, you can pick the capacitor to match the load. Just follow the math in the page and you can get the right one every time.
What about passive sensing of AC ?·· Something like a small coil place near the cord or around the cord with some resistors and a diode to condition the signal?· It seems like this was brought up before and there was some problem with it...
I like the idea of not breaking into the circuit though.· It keeps your insurance and the fire-inspector happy.
That was the advantage of my solution using the bridge rectifier, it needed to be easily attached and removed. It was used with our people-counting system to count and log the people waiting at a pedestrian crossing, for a local authority.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
There may be some passive ways to determine if something is on, say a light bulb, you could detect heat or light to determine the on/off state. Maybe a vibration sensor for telling whether a motor is running and things like that.
The formula Xc=1/2piFC is based on Reactance. Its a proven formula (type in in your browser) and widely available. You can even run static loads with this practice. The ideas put forth by sam_sam_sam on the subject will surely get you in trouble down the line. I can't think of an easier, safer, less expensive way to accomplish this.
Comments
The photo below is the way you would hook it to your Basic Stamp
You Must use the right Resister for 120 Volts the value show en is for 24 volts
The only reason the + and - are there is if you use it on DC voltage you must have the polarity correct or it will
not work
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2009 1:45:02 AM GMT
If you note I am looking to sense 120 Volts AC the jpeg you posted looks a lot like one for DC. But I like the fact you didn't suggest a relay. I know the 'button' command will de-bounce the contacts but I am also looking maybe to run this through TTL at some point and it would be better if it were a 'clean' signal.
Mike2545
which is on the left side of the Chip
The ouput side that hook to the Basic Stamp is going to be the same
Your resister would be 1200000 ohms for 120 volts instead of 24000 ohms for 24 volts
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2009 1:41:37 AM GMT
Won't the led cycle at 60Hz? Surely TTL could pick up that chatter. I'm going pass on that design, maybe someone else has a different idea.
Mike2545
the range is 5 to 10 as long as you follow this you will be alright
I use this all the time with no problem at all
·You could also use one of these as well
· H11AA1· Optocouplers Bi-Directional Input
Here is where the data sheet is
http://www.fairchildsemi.com/ds/H1%2FH11AA1-M.pdf
When you use this optic sensor
use have to use 2 resisters one on each input pin
600000
In you code you would use IN_· pin# that you are using
Not the button Command
Here is an example of a routine that I have used before
Pick_ONE:
DO
IF IN14 = 0 THEN
·· GOSUB Power_ON
ELSE
·· GOSUB Power_OFF
ENDIF
LOOP
I know the 'button' command will de-bounce the contacts but
·I am also looking maybe to run this through TTL at some point and it would be better if it were a 'clean' signal.
If this a problem then you just put 10 mfd cap on the input pins but then you will need to use a rectifier
then yor resisters then the cap
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2009 2:12:17 AM GMT
Mike2545
(Some of sam_sam_sam's posts removed) you had to be there. It was colorful)
Post Edited (Mike2545) : 1/11/2009 3:30:05 AM GMT
No its in the correct place. Mock it up, you'll see.
Mike2545
I learn something today· I have never seen it used that way before
http://www.allaboutcircuits.com/vol_3/chpt_3/11.html
·
Zener diode clipper:
The zener breakdown voltage for the diodes is set at 10 V by the diode model parameter “bv=10” in the spice net list in Figure above. This causes the zeners to clip at about 10 V. The back-to-back diodes clip both peaks. For a positive half-cycle, the top zener is reverse biased, breaking down at the zener voltage of 10 V. The lower zener drops approximately 0.7 V since it is forward biased. Thus, a more accurate clipping level is 10+0.7=10.7V. Similar negative half-cycle clipping occurs a -10.7 V. <!--split for double ref-->(Figure below) shows the clipping level at a little over ±10 V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 1/11/2009 2:47:16 AM GMT
Mike2545
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Whereas to get Xc you take 120v-5v=115v 115v/.012(ma)=9583 ohms (this is Xc)
So 1/2piFXc =C where F is frequency (60 Hz) that's .00006 in this case
You should get 3.6118327
The answer for 12 ma is...1/3.6118327 or .27 Mf
Be sure to use capacitors rated for 180 V AC like Mylar. Get them from Mouser
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
I like the idea of not breaking into the circuit though.· It keeps your insurance and the fire-inspector happy.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The formula Xc=1/2piFC is based on Reactance. Its a proven formula (type in in your browser) and widely available. You can even run static loads with this practice. The ideas put forth by sam_sam_sam on the subject will surely get you in trouble down the line. I can't think of an easier, safer, less expensive way to accomplish this.
I'm sorry about the hand drawn sketch I posted.
Mike