PDA

View Full Version : How to read AC mains with an inductance coil



KB3BYT
- 17th February 2008, 22:46
Can anyone point me to an example circuit of how to read AC with an inductance coil
and have PBP interpret the fact that AC voltage has turned on in the AC mains wire?
I'd like to use the most basic of PICs... 12C509 or F84 or 628...what I have here now on the bench.

Charles Linquis
- 17th February 2008, 23:48
If you just want to sense if AC is present, I would recommend using an opto-isolator
instead of a transformer. The opto approach is smaller and cheaper.

If you instead want to measure whether a load connected to the AC mains is ON or
OFF, you can still use an opto - but it takes a few more parts.

KB3BYT
- 19th February 2008, 03:06
I wanted to sense if the AC current was ON without actually tapping into the AC circuit.
I was thinking of how a clamp-on ammeter does not make actual contact with the
AC current but does actuate a meter needle to swing.
I just want an ON OFF detection that can fire off a relay or a PIC to be able to sense that ON OFF in PBP.

dhouston
- 19th February 2008, 03:19
Coilcraft (and others) make what you want.http://www.coilcraft.com/misc/sen60_t.html
Click BACK at upper left to see specs, etc.

KB3BYT
- 20th February 2008, 04:16
YEs...this is what I was thinking but I don't know how to have PBP
interface this inductance coil.
I'm a programmer, not an electronics engineer, so I am at a loss as to
what PBP command to use with this coil from coilcraft.
My first thought was to do PULSIN but I do not know the proper way to wire
PULSIN to an inductor coil.
Any example or advice how to wire and read the COILCRAFT coil output?

mackrackit
- 20th February 2008, 12:02
Rectify the coil output and then read it with an ADC pin on the PIC.
With a little experimentation, you will not only be able to see if the load is on or off, you will also be able to tell what the load is.

Say the max amps in the load circuit is 20 and the ADC is 8 bit. Set the VREF so that 20 amps reads 255 at the ADC. Then 127 at the ADC would indicate 10 amps on the load circuit. Or there abouts.