Author Topic: sensing mains switch position  (Read 1525 times)

0 Members and 2 Guests are viewing this topic.

Offline fredaTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: au
sensing mains switch position
« on: June 23, 2022, 11:02:12 pm »
want to cheaply detect whether a switch to load is on or off, the NEUTRAL line is not available.
 
Current transformer ? too much PCB realestate, expensive component, besides don't need
accuracy.

opto isolator ? those that can work with < 1mA cost $$
can work with cheaper, so 4-5mA, but still ~2W consumed just for sensing, I need a few so adds up.

I got this circuit to work ok....
" alt="" class="bbc_img" /> [ Specified attachment is not available ]

yeah i know,hit me, its not isolated. Probably can add safeguards like a 0.1A fuse or something.
The other trouble is if the source is after a dimmer, then it only works reliably with
dim setting 100%-~75%. Though possibly the dimmer could be wired in after the switches to mitigate that problem.
Note the circuit has access to a 12v supply, though assume it is isolated from earth (or not)

can it be done reliably using capacitors to isolate? ...i am experimenting....

any other idea?

this is a sorta related thread https://www.eevblog.com/forum/projects/optocoupler-with-floating-wire/msg4249036/#msg4249036

mostly not the easiest thing to ask google for either.....
« Last Edit: June 23, 2022, 11:19:14 pm by freda »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7179
  • Country: de
Re: sensing mains switch position
« Reply #1 on: June 23, 2022, 11:18:04 pm »
Just use a small neon bulb and optically detect whether it's on or off. Power consumption is totally negligible.
 

Offline fredaTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: au
Re: sensing mains switch position
« Reply #2 on: June 23, 2022, 11:36:23 pm »
thanks, thats not a bad idea at all.
US $1.71 for 20 from aliexpress....

i should have one somewhere around here......(..100s of boxes..after 10hrs, ah just f@#!$ order more) |O
 

Offline mag_therm

  • Frequent Contributor
  • **
  • Posts: 783
  • Country: us
Re: sensing mains switch position
« Reply #3 on: June 24, 2022, 12:16:46 am »
About 1973, in Australia, the AC grid had not reached some small towns in South Australia and New South Wales.
The traditional 32 Volt DC used in farm houses and small towns was obsolete due to TV and appliances needing 240VAC.
So  mini 240 V Diesel gensets started to be used.
I worked on a small project similar to Freda's, for "On Demand Diesel Starting"
It was a board that detected when a user turned on an appliance or light switch anywhere in the house.
I forget, but it used some op-amps to detect the DC volt drop due switch  downstream of a 50 Hz filter, some optocouplers and some interlock with the starter throw-out. I seem to recall we did not solve the problem of auto shutdown at last switch opened, leaving that to be manual.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22457
  • Country: gb
  • 0999
Re: sensing mains switch position
« Reply #4 on: June 24, 2022, 12:47:31 pm »
Use an opto-coupler with a capacitive dropper. It doesn't have to be anything special, the SHF618 or PC817 will do. Set the forward current to 0.5mA and the transistor current to 50µA for high reliability and low power consumption.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9785
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: sensing mains switch position
« Reply #5 on: June 25, 2022, 03:06:02 pm »
Have you considered a small current transformer?
Cryptocurrency has taught me to love math and at the same time be baffled by it.
Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
BTC: 18813fu8LQEdDwH9YLM1ABed3XwCfeSeFi
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5370
  • Country: nl
Re: sensing mains switch position
« Reply #6 on: June 25, 2022, 04:59:45 pm »
You can turn any toroidal inductor into a current transformer. Just put a thick wire through the center. If you put two layers of shrink tubing around it, it's also more then double insulated and the secondary circuit is free of high voltage worries.

Another possibility is to wrap some wire around the mains wiring behind the switch and then capacitively sense the mains hum simliar to how the non contact voltage sensors in DMM's work.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22457
  • Country: gb
  • 0999
Re: sensing mains switch position
« Reply #7 on: June 25, 2022, 06:38:08 pm »
You can turn any toroidal inductor into a current transformer. Just put a thick wire through the center. If you put two layers of shrink tubing around it, it's also more then double insulated and the secondary circuit is free of high voltage worries.

Another possibility is to wrap some wire around the mains wiring behind the switch and then capacitively sense the mains hum simliar to how the non contact voltage sensors in DMM's work.
Any ordinary transformer run in reverse will do the job. Choose one with an adequate secondary current rating. Wire the secondary in series with the load and connect the burden resistor to the primary. The current through the primary will be equal to the turns ratio, so a 240V:6V transformer will give 40th of the current, so if you have 100mA through your lamp, you'll have 2.5mA through your burden resistor.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->