sensing mains switch position - Page 1
Forum section: electronics / projects

author: freda
author_rank: Regular Contributor
timestamp: June 23, 2022, 11:02:12 pm
content: 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 needaccuracy.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 withdim 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 threadhttps://www.eevblog.com/forum/projects/optocoupler-with-floating-wire/msg4249036/#msg4249036mostly not the easiest thing to ask google for either.....

author: Benta
author_rank: Super Contributor
timestamp: June 23, 2022, 11:18:04 pm
content: Just use a small neon bulb and optically detect whether it's on or off. Power consumption is totally negligible.

author: freda
author_rank: Regular Contributor
timestamp: June 23, 2022, 11:36:23 pm
content: 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)

author: mag_therm
author_rank: Frequent Contributor
timestamp: June 24, 2022, 12:16:46 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: June 24, 2022, 12:47:31 pm
content: 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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 25, 2022, 03:06:02 pm
content: Have you considered a small current transformer?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 25, 2022, 04:59:45 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: June 25, 2022, 06:38:08 pm
content: Quote from: Doctorandus_P on June 25, 2022, 04:59:45 pmAny 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.