Detecting closed switch in galvanic insulated circuit without power supply - Page 1
Forum section: electronics / projects

author: eneuro
author_rank: Super Contributor
timestamp: October 21, 2014, 06:47:37 pm
content: Hello,Maybe someone will have some idea howto... detect closed switch in galvanic insulated circuit... without any power source (no supply)Below there is some attempt using transformer (230VAC->3VAC) and as we can see using for example current sensor (Hall efect sensor works fine for me) on trafo secondary.However, without this current sensor on trafo secondary optocoupler (eg. PC817) looks like it might work, but 1.2V voltage drop on optocoupler internal diode might be too high while secondary voltage can fall below 1V....10mA @ 1.2Vf means about only 10mW power needed on trafo secondary, so maybe?Best idea so far is add resistor and diode in series with zener diode and capacitor as simply power supply on trafo secondary, then in the event of closed switch in parallel to PC817 input diode it will switch it off and this way I could get quite good insulated switch pulse.Maybe other way to detect closed circuit by switch with galvanic insulation without power supply ?

author: SeanB
author_rank: Super Contributor
timestamp: October 21, 2014, 06:57:11 pm
content: Use a current transformer to get the drive to the optoisolator. A small iron powder toroid ( those yellow ones in a PC power supply) with the secondary wire threaded through it, and wound with 30 turns or so of thin 18AWG wire with the optoisolator diode and a reverse polarity diode, and with a series resistor of 100R or so will detect the 12A current. no voltage drop, and isolated to whatever the insulation on the single turn is.

author: eneuro
author_rank: Super Contributor
timestamp: October 22, 2014, 07:31:00 am
content: Quote from: SeanB on October 21, 2014, 06:57:11 pmDo you mean white-yellow like this form old PC power supply teardown I guess?I haven't got its specs, but it is quite heavy so maybe it could work, but there is a problem-in the case of detection closed switch of spot welder electrodes touched together its conductor wires diameter is twice the inside size of this tiny white-yellow coreI have another bigger toroid core with cross section of about 60mm2, but random material - ferrite I guess, but I could be able put inside at least one smaller blue wire conductor inside.Cheap CT could be fine there , while I do not want to put another Hall current sensor there, while I needed at least additional comparator to detect those 10A or so and I do not like to use another MCU pin for this detection, so small PCB with PC817 optocoupler and this bigger ferrite toroid maybe will be fine.I can add fast diode, resistor, capacitors and zeners to provide current not higher than 10mA to optocoupler input, while when switch will be trigered ON there can be 1kA currents in pulses inside this CT, so I'm not sure, maybe it will be better put Hall current sensor and forget about CT and possible transients issues in huge current pulses ?

author: eurofox
author_rank: Unknown
timestamp: October 22, 2014, 07:55:57 am
content: Quote from: eneuro on October 21, 2014, 06:47:37 pmIf you use a switch with an extra contact you solve your problem, you will have a full isolated circuit.

author: tszaboo
author_rank: Super Contributor
timestamp: October 22, 2014, 11:39:48 am
content: I would just make a resonator with the transformer by putiing a capacitor series with it, and driving with something simple like logic gates. If the secondary side is shorted, the resonance frequency changes. Of course, you will need a different transformer than the standard mains isolator transformer, something like a pulse transformer. Than even a simple 555 can decide what is the frequency (maybe two 555).

author: cosmos
author_rank: Regular Contributor
timestamp: October 22, 2014, 12:05:38 pm
content: Quote from: NANDBlog on October 22, 2014, 11:39:48 am+1 for thatI did something like this long time ago, worked very nicely (but too long ago for me to have details still, sorry).Used a mains common mode choke as transformer, nice since they are relative small and cheap, and also designed and tested for mains isolation.something like this:http://media.digikey.com/Photos/Taiyo%20Yuden%20Photos/TLF9UA102W0R8K1.jpgThe powerless side simply shorted the winding with a small mosfet.The powered side had a simple oscillator and a detect circuit (possibly load sensitive, shorting the secondary increased power loss or something in this direction), just a few logic gates and a transistor.

author: eneuro
author_rank: Super Contributor
timestamp: October 22, 2014, 01:29:34 pm
content: Quote from: NANDBlog on October 22, 2014, 11:39:48 amIt might be good for read or classic switchNeed to investigate it later, while need make tricky open door detection (with reed switch probably) and I do lot like any 230VAC wires there and any power supply, but galvanic insulation from control circuit powered from 230VAC.However, in recent spot welder project I have already huge trafo 230VAC -> 3VAC/1.5VAC open secondary like in concept simulation from picture in my first post, so probably CT or Hall current sensor in this case, while I can short current close to 10A easy on its secondary while putting 20W halogen light bulb in series with transformer primary should give currents at this rangeFor the moment will be testing this quickly build CT (glued and polished with hot air) and I will see if this thing will be able to power up PC817 optocoupler input at current levels about 10A.I can increase this current but it would be nice not to go above 10A.There is 30 turns 50Hz and random toroid so it will be fun if it works and powered this way PC817 survive a few kA current pulsesQuote from: eurofox on October 22, 2014, 07:55:57 amNo way since I want use such detector with reed switch for open door detectionas well as classic fire button in other projectand in spot welder switch is very different while I need first detect that electrodes mounted there shorts huge transformer secondary at small current in the range of 10A and then more than 1kA in pulse can be there after a few seconds when controler detects that someone wants spot weld something

author: eneuro
author_rank: Super Contributor
timestamp: October 22, 2014, 08:10:57 pm
content: Quote from: SeanB on October 21, 2014, 06:57:11 pmEasier to say than make one working at 50 Hz 1VAC open circuit -when shorted goes to 0VAC and a few ampsOk, tested this one, but with unknown core (ferrite) and no way to get at 30 turns >1VHowever, there is 1/2 current and I hope this second wire which does not fit inside this CT does not cancel all magnetic field created by this inside one?While I want put additional two wires to have four on secondary, current in one wire will be 1/4, so much more turns needed to power PC817 input diode and better toroid core I guess.For the moment, I will try this Hall effect current sensor on transformer primary to detect closed secondary, while it looks like 20W halogen bulb goes bright when electrodes are shorted on secondary, so maybe I will be able to detect this small current change in this case simply by adjusting MCU software reading this Hall sensor .For other classic switches like reed etc, making simply 3V-5V 10mA 100kHz-500kHz PSU and shorting secondary using switch in parallel to PC817 input diode should do the trick I think

author: eneuro
author_rank: Super Contributor
timestamp: October 23, 2014, 05:05:01 pm
content: Using Hall effect current sensor with a few turns shown in the post above and a few moving averages on AVR ATTiny85 8MHz with ADC clock set to 250kHz and 10kHz timer for current sampling and computing moving averages it was quite easy to detect 230VAC 50Hz mains <20W load with transformer in series with a few lines of C codeXscopeshows nice detected current edges rising above & falling below its average zero current at 10ms intervals while 50Hz mains is used.Now, with such sophisticated AVR library, maybe it will be possible easy detect also higher power consumption (bigger current area) when transformer secondary is shorted