how to detect Ac

Status
Not open for further replies.

khatib

Member
I Need Circuit That Can Detect The Occurance Of Ac Voltage , And When Ac Disrupt Occur , The Pic Will Control The Operation 16f877
How To Do That ?
 
Exactly what the previous poster suggested. Now draw a circuit diagram of what he said and write the code for a sub-routine to detect the AC. You can either "poll" the input or have the "HIGH" send the micro to the ISR. (interrupt the operation of your program and deal with the HIGH).
 
Use the same coat-hanger this time. Just connect it to the input of a micro with a voltage-divider and you have the answer. Use a capacitor if you want isolation.
 
You don't need anything so complex. Just 4 x 1Meg resistors (2 x 1M in series) on each line. 100n caps on each line (200v rating or higher) feeding into the input of the micro. The current will be so low that the protection diodes will clip the signal.
 
Well, 6 components is a little piece of mind, then that is one less thing to go wrong.
Or, you know use the coat hanger thing, it doesn't matter to me.
 
Last edited:
The previous circuit (the attached file above) did not provide isolation from both lines so it would need more components. You cannot assume one line will be neutral. You must treat both lines as "active" and provide isolation in the form of "current isolation."
 
Last edited:
The coat hanger or the one I suggested?

It uses capacitive reactance, doesn't matter what way you hook it up.
 
Last edited:

He design it with a OPTOCoupler , it will be ok.
For extra precaution, make sure your instrument has a EARTH grounding.

Csaba
 
Line isolation and no high wattage dropping resistors or HV capacitors. The lamp represents the AC load. The diodes need to be rated for the AC load current, so may not be convenient in all cases. Also it indicates the load is drawing current, not just that the switch is closed. (i.e. burned out lamp )

ken
 

Attachments

  • Line Detector.gif
    7.4 KB · Views: 506
Last edited:
Still nice.

The one I posted is patented. At least in a device that is patented... so I know it works well...
 
Last edited:
The coat hanger or the one I suggested?

It uses capacitive reactance, doesn't matter what way you hook it up.

It certainly DOES MATTER which way you hook it up. Connect the lower line on the diagram to the "active" wire of an AC outlet and you are directly connected to 120v or 240v.

That's why you should not give advice unless you have actually tested what you provide.
 
just to put a little light on it here some thing to think about you can use a Optocouplers for isolation and resistor for current limiting. and feed it 120 volts
now we can't look inside a Optocoupler so I just use a led so you can see that
it's not going to hurt your Optocoupler.
 

Attachments

  • GEDC0318-1.JPG
    19.7 KB · Views: 249
  • GEDC0319-1.JPG
    17.7 KB · Views: 290
  • power.PNG
    11.4 KB · Views: 285
Last edited:
I think you'll find the the reverse breakdown voltage of the LED in the optoisolator is something less that 120v x 1.414. Placing a 1N4003 across the LED, and opposite the LED polarity will solve that problem. The resistor will have to be a 2W...dissipating 1.44 W.

But that works.

Ken
 
I think it a little less then 1.44 W. more like 422.5 Milliwatts but any way I let it stay on for a hour with just a half watter 10 k and it didn't get hot You no phone's have them Optocouplers in them to pickup the ring-signal AC wave it can be up too 90 volts
 
Last edited:
Hey be80be - the circuit you've drawn cant possibly work, the sense wire coming off the emitter will never sit at anything but ground potential.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…