Author Topic: Detecting mains voltage  (Read 4996 times)

0 Members and 1 Guest are viewing this topic.

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Detecting mains voltage
« on: March 03, 2014, 07:00:42 pm »
Is there a simple way to detect when mains voltage is present?

I am going to put together a simple XBee-based remote switch.  The scenario is I have an existing in-wall digital timer to control outdoor lights and would like, when that timer turns on the lights, to activate another set of lights that are wired to power at a different location.  Getting the remote switching running is no problem, but what I need is a way for the source XBee to detect when the timer turns on/off the power - kind of like a reverse relay (since the XBee will already have power, I just need to apply that to one of the IO pins).

Clearly I have options such as connecting a small power supply to the switched side of the timer; or opening up the timer (which has an LCD display) and seeing if there is already a low voltage output.  Are there other approaches?  Is there such a thing as a relay that switches under mains voltage. Or an induction coil type of arrangement?

Thanks for any ideas

Anthony
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9693
  • Country: us
Re: Detecting mains voltage
« Reply #1 on: March 03, 2014, 08:02:17 pm »
You could do something simple like connect a neon lamp on the output of the timer and use a photo-detector on the input of the XBee to detect when the neon is lit?
I'm not an EE--what am I doing here?
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 1904
  • Country: fr
    • kripton2035 schematics repository
Re: Detecting mains voltage
« Reply #2 on: March 03, 2014, 08:09:38 pm »
there are relays that need mains voltage to turn on, and then switch another mains voltage
search for 220v or 110v relays depending on your location.

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #3 on: March 03, 2014, 08:41:49 pm »
You could do something simple like connect a neon lamp on the output of the timer and use a photo-detector on the input of the XBee to detect when the neon is lit?

Interesting idea. That may also help with the need to separate the high and low voltage in the installation box.

Thanks
 

Offline Circuitous

  • Supporter
  • ****
  • Posts: 236
  • Country: us
    • Corgi-Tronics
Re: Detecting mains voltage
« Reply #4 on: March 03, 2014, 09:44:37 pm »
There are plenty of opto isolators out there that will do this for you.
Just be sure to use a big enough resistor to limit the current and make sure it is flame-proof... I can't recall getting any other direction on that.
Also, check the isolation voltage of the opto, but it should be good enough, they're usually pretty high.

I don't recall the specific ones that I used, but I can check tonight if you need some specific part numbers.

The ones I chose have dual (reverse biased) LEDs, so that it picks up both halves of the cycle.

Offline sacherjj

  • Frequent Contributor
  • **
  • Posts: 993
  • Country: us
Re: Detecting mains voltage
« Reply #5 on: March 03, 2014, 10:38:30 pm »
I've used the LTV-354T from LiteOn for this and it works well.  You get pulses for all time, but zero crossing.  Which allows you to find zero crossing for free.  Just put in the correct current limiting resistors.  I was getting solid switching at < 2mA.

We switched to another smaller Opto, due to board size for the multi channel design.  Not finding that right now. 
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7597
  • Country: nz
Re: Detecting mains voltage
« Reply #6 on: March 03, 2014, 10:57:13 pm »
i wonder if you could put a turn of the mains wiring around a floating ADC input and pickup the 50hz coupling to it.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #7 on: March 04, 2014, 01:32:15 am »
There are plenty of opto isolators out there that will do this for you.
Just be sure to use a big enough resistor to limit the current and make sure it is flame-proof... I can't recall getting any other direction on that.
Also, check the isolation voltage of the opto, but it should be good enough, they're usually pretty high.

I don't recall the specific ones that I used, but I can check tonight if you need some specific part numbers.

The ones I chose have dual (reverse biased) LEDs, so that it picks up both halves of the cycle.

Thanks for the suggestion.  If you have part numbers handy, that would be great, but I'll also scout around on Digikey and see what I can come up with.
 

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #8 on: March 04, 2014, 01:33:49 am »
i wonder if you could put a turn of the mains wiring around a floating ADC input and pickup the 50hz coupling to it.

I guess I should try that and see what happens!
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7597
  • Country: nz
Re: Detecting mains voltage
« Reply #9 on: March 04, 2014, 02:01:03 am »
Digital input should work too but will require more voltage swing to be detectable.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Shock

  • Super Contributor
  • ***
  • Posts: 3280
  • Country: au
Re: Detecting mains voltage
« Reply #10 on: March 04, 2014, 03:05:34 am »
Just in case it hadn't crossed your mind.  If there is just one or two other switches is there any reason why you cannot wire it on a timer like the one you have already?
Programmable light switches run about $40, unless you absolutely need remote control I would take the easier route. Safer as well.
Soldering/Rework: Pace ADS200, Pace MBT350
Multimeters: Fluke 87V, 117, 27/FM       >>> WANTED STUFF <<<
Oszilloskopen: Lecroy 9314, Phillips PM3065, Tektronix 2215a, 314
 

Offline BurtyB

  • Regular Contributor
  • *
  • Posts: 66
  • Country: gb
    • 8086 Consultancy
Re: Detecting mains voltage
« Reply #11 on: March 04, 2014, 12:54:22 pm »
The thread from a couple of weeks ago might give you some other ideas https://www.eevblog.com/forum/beginners/detecting-presence-of-mains/ .
 

Offline ConKbot

  • Super Contributor
  • ***
  • Posts: 1168
Re: Detecting mains voltage
« Reply #12 on: March 04, 2014, 01:27:03 pm »
i wonder if you could put a turn of the mains wiring around a floating ADC input and pickup the 50hz coupling to it.

IIRC, in one of the teardown videos Dave did, a unit (I forget what) had a wire from the low voltage side heat shrunk to the insulated AC power wires to pick up mains.  Simple, and provides double isolation (cap the end of the pickup wire with small heat shrink before you heat shrink it to the AC wiring, not just a bare cut end) 
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Detecting mains voltage
« Reply #13 on: March 04, 2014, 02:00:28 pm »
I was thinking one of those cheap hardware store volt alert clones. When they buzz or light up, you can detect that.
The larger the government, the smaller the citizen.
 

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #14 on: March 04, 2014, 09:51:46 pm »
Just in case it hadn't crossed your mind.  If there is just one or two other switches is there any reason why you cannot wire it on a timer like the one you have already?
Programmable light switches run about $40, unless you absolutely need remote control I would take the easier route. Safer as well.

This is what I wanted to avoid!  I have several circuits around the property that I'd just like to activate from one timer.  So I don't have to change the on/off times on all the timers and keep them in sync.

 

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #15 on: March 04, 2014, 09:52:25 pm »
The thread from a couple of weeks ago might give you some other ideas https://www.eevblog.com/forum/beginners/detecting-presence-of-mains/ .

Thanks, I missed that one.
 

Offline aroby

  • Regular Contributor
  • *
  • Posts: 207
  • Country: us
Re: Detecting mains voltage
« Reply #16 on: March 04, 2014, 09:53:40 pm »
I was thinking one of those cheap hardware store volt alert clones. When they buzz or light up, you can detect that.

That sounds exactly what I need.  Why didn't I think of that??  I think I need to take mine apart and see what's in there.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9693
  • Country: us
Re: Detecting mains voltage
« Reply #17 on: March 04, 2014, 10:14:38 pm »
That sounds exactly what I need.  Why didn't I think of that??  I think I need to take mine apart and see what's in there.

I think you have to watch out for those detectors, they easily give false alarms. For instance all my non-contact voltage detectors believe my iPhone is live when the charger is plugged in.
I'm not an EE--what am I doing here?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7597
  • Country: nz
Re: Detecting mains voltage
« Reply #18 on: March 05, 2014, 05:13:59 am »
That sounds exactly what I need.  Why didn't I think of that??  I think I need to take mine apart and see what's in there.

I think you have to watch out for those detectors, they easily give false alarms. For instance all my non-contact voltage detectors believe my iPhone is live when the charger is plugged in.

That's because your iPhone is live when the charger is plugged in :P
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf