1
\$\begingroup\$

Goal is to be able to use standard wall 2 gang light switch to:

a) provide line connection with either of two / both hot wires coming from the same 230VAC phase to the ceiling for AC-DC 48V PSU powering DC-DC buck driver, LED array.

b) be able to differentiate with MCU which one / both of hot wires is powering the lamp for setting one of 3 brightness levels according to the active combination of switches' states:

right switch - left switch - brightness
ON - OFF - minimal
OFF - ON - medium
ON - ON - maximum

So how do I design a circuit to know which of two switches is powering my lamp or whether both of them are ON?

MCU and other logic could be powered with a separate low power AC-DC module. Delay up to a second for detecting current state is acceptable.

Only ideas that I have involve shunt resistors, differential amplifiers, and etc. to measure and/or compare voltage drop that should be present only across resistors on active wire(s). This seems overall complicated and hard to account for 0-1A input current range.


UPD1: My case is not a planned installation, but rather conversion of 2x 150W incandescent lamps (thus existing 2 gang switch and 2 wires in the wall) to a single LED array. It is possible to change that wall switch with an alternative that fits existing 68mm cylindrical electrical box, but chances that I will find anything as fancy as DPDT switch are pretty low. I will take a look though.

My existing PSU is Meanwell LRS-200-48.


UPD2: I tried solution with relays (see finalized schematic below) and it works as intended. I do not have 230VAC relays at hand so I tried it with 3x SRD-05VDC-SL-C general purpose ones and NA05-T2S05-V AC-DC units (pdf) as a proof of concept. As expected there was ~1 second load brownout (while turning off SW2), which is acceptable IMO. I could buy something like 230VAC rated RTE24730 to lower the switching time, but I decided against it for 2 reasons. Firstly, it would consume ~1.6W per coil, instead I can operate 12V relay at 9V with 0.23W per coil. Secondly, it means waiting delivery from Mouser and spending 6-9 USD per relay, while I can buy 12VDC RTE24012 locally for 2-3 USD. And I still have to provide my MCU with power, so either this or a dedicated DC-DC converted from 48V that I'll probably would have to make myself. So buying couple of AP09N05-Zero is well worth $8. I tested these PSUs, they have great specs even without input&output filters and manufacturer is pretty ensuring comparing to something like HLK-PM09 / HLK-5M09 which floods the market.

enter image description here

D3, D5 are to ensure that MCU absolute maximum requirement for digital input of VCC+0.2V is not exceeded. This was for 5v AC-DC modules, so read a proper voltage divider here..

R2, R3 placed near input pins is to make sure there would be no 50hz noise (somehow I was reading up to 2VAC measured with 10MOhm DMM unless I loaded it with a simple 1.5mA LED).

\$\endgroup\$
4
  • \$\begingroup\$ are you actually allowed to run two separate hot circuits to one lamp fixture? \$\endgroup\$
    – jsotola
    Apr 25, 2020 at 2:57
  • \$\begingroup\$ Are those switches going to be used to switch on that dc power supply or you just want to use those switches as inputs to an MCU? If your PSU runs off 230VAC, then it definitely uses both hot wires not just one. If your using your switches to control brightness by signaling MCU, then use input pins to look at stage of each switch. Connect a pull-up or pull down resistor. \$\endgroup\$
    – Leoman12
    Apr 25, 2020 at 3:11
  • \$\begingroup\$ You know, I can't even tell if you are planning to switch the 230V or the 48V. \$\endgroup\$ Apr 25, 2020 at 3:38
  • \$\begingroup\$ What are your constraints on switch choice? I can get 250V DPDT switches that fit a 2 gang plate eaily here. \$\endgroup\$ Apr 25, 2020 at 8:57

3 Answers 3

0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

This solution requires two mains voltage relays, one with at least two contacts NO contacts and one with two NO and one NC contact.

How it works:

  1. With SW1 and SW2 off LED PSU has no power.
  2. With SW1 on RLY1 is energised and power is passed to LED PSU.
  3. When SW2 is on RLY2 is energised and power is passed to LED PSU. At the same time RLY2b is energised disconnecting the supply from RLY1 and preventing a backfeed from holding on RLY1 if SW1 is switched off.
  4. The tricky part is ensuring that going from both on to only one on always unlatches the other relay. We've already seen in 3 above that switching off SW1 will work because RLY2b has broken the backfeed. If instead we switch off SW2 then RLY2 will drop out and RLY2a NO contact will open before RLY2b's NC contact will close. RLY1 will then supply power to LED PSU. Note that there will be a very brief interruption in power but the LED PSU's internal capacitance should bridge that without noticeable flicker.
  5. RLY1c and RLY2c contacts can be fed to your logic controller to determine the four switch combinations.

You need to be very choosy about the relay as you require guaranteed isolation between the mains contacts and the low-voltage control circuits.

\$\endgroup\$
1
  • \$\begingroup\$ you could use two relays in parallel one to switch mains and the other for low voltage. \$\endgroup\$ Apr 26, 2020 at 0:03
0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. An unusual approach.

I offer this solution more as a puzzle answer than as a solution that I would recommend. How it works:

  • Almost certainly the 48 V supply you are using for your LEDs is an SMPS (switched-mode power supply) has a full-wave rectifier on the input so it can be run on full-wave rectified mains. While the current through the internal bridge will be the same only two of the four diodes will be employed so there is a risk that they may be stressed.
  • Zero-cross detection circuits provide a simple and opto-isolated means of monitoring the switches' on/off status. You're not interested in the zero-cross but rather that the mains turns on. There are plenty of examples on this and other sites but bear in mind that a peak detector will suffice for you so you may be able to design for minimum power dissipation in the zero-cross circuits.
  • BR1 and BR2 rectify the AC coming from SW1 and SW2 and prevent backfeed from one circuit to the other.

It gets around the relay back-feed problems and avoids current-sensing solutions which might not work if the current isn't shared equally when SW1 and SW2 are both on.

\$\endgroup\$
4
  • \$\begingroup\$ how does this handle the capacitance between the two signal lines? \$\endgroup\$ Apr 25, 2020 at 9:18
  • \$\begingroup\$ If that's a problem then add some loading to the zero-cross inputs. \$\endgroup\$
    – Transistor
    Apr 25, 2020 at 11:43
  • \$\begingroup\$ Though about zero-crossing detection at first but not to feed PSU with DC. Makes sense, I can see advantages of this route, but is there anything else to look out for apart from brigde ratings. How do I treat input filter in that case? Updated my question with datasheet for my model. \$\endgroup\$
    – Leeroy
    Apr 25, 2020 at 15:37
  • \$\begingroup\$ Good point about the filter. It will have a little more work to do on the sudden reversal of the voltage at the zero-cross. I don't have a good answer for that. As I explained, it's just a theoretical answer. \$\endgroup\$
    – Transistor
    Apr 25, 2020 at 17:45
0
\$\begingroup\$

gangable douple pole double throw 230V switches are available such as Clipsal 30MD2 this greatly simplifies the signalling.

schematic

simulate this circuit – Schematic created using CircuitLab

here X2 gets the power to run the lamps and X1 carries the signal - either open-circuit (SW1 only) with resistance (SW2 only) or with no resistance (both)

the resistor could be instead a diode or a capacitor whatever simplifies the analogue end most.

assuming 10V signalling the other end of the wire could something like:

schematic

simulate this circuit

I'm running the 10V signalling at mains potential as the signalling is galvanically isolated from ground and from the mains will be fine, but all the resistors used will need to be treated as live and need good insulation.

\$\endgroup\$
3
  • \$\begingroup\$ Your top diagram has two X1 points and no X2 point. The lack of correct sentence capitalisation still detracts from all your posts. \$\endgroup\$
    – Transistor
    Apr 25, 2020 at 11:46
  • \$\begingroup\$ I'll have to wrap my head around this.. even if it may be not achievable in my case. Fixing X2 label on that 1st image would be nice. \$\endgroup\$
    – Leeroy
    Apr 25, 2020 at 15:41
  • \$\begingroup\$ sorry about that misplaced label \$\endgroup\$ Apr 26, 2020 at 0:01

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .