Need an analogue "if" switch for LED lighting. Does one exist?

Thread Starter

Edward Pattillo

Joined Jan 6, 2019
7
I'm fairly new to electronics but am really enjoying 12v that I'm putting into our new home.

I've got some really nice 12V downlights that are dimmable. I've got them working from a rotary knob and am happy with this.

Some of the LED strips I'm running include a WIFI adaptor that allow me to group lights together and lots of other cool stuff.

I can plug the LED downlights into the WIFI controller and I can dim via an app on my phone. But then I lose the rotary knob potentiometer control.

Is there a way I could have my cake and eat it too? For example, if power is detected from the rotary knob, the power going to the WIFI control would switch off. Conversely, if power were detected coming from the WIFI control, the rotary knob would disengage?

That would be awesome.
 

crutschow

Joined Mar 14, 2008
38,526
Okay.
What do you want to happen if you already have power from the rotary knob and then get power from the WiFi control?
Or vice-versa.
 

Thread Starter

Edward Pattillo

Joined Jan 6, 2019
7
Thanks for the reply.

Say the WIFI controller was the most recently used then someone turns the dimmer knob. The control would then exclusively be from the knob and the WIFI controller settings would be ignored.

Similarly, if the knob was the most recently used, then someone modified a setting with the WIFI control, the knob would then be overridden and ignored.
 

crutschow

Joined Mar 14, 2008
38,526
What is the voltage range of the signals from the knob and the WiFi controller?

There's no single analog device that can do that, but a single microprocessor could.
It could also likely be done with one comparator IC, a digital latch, and two MOSFET switches.
Which approach would you like to pursue?
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
It sounds like you need to detect a CHANGE in the signal level from each control source. If you feed the signal from each analogue control source via a capacitor to two comparators you could detect a positive or negative pulse created by the change in signal level. The pulse (From either comparator.) would set a flipflop from say the knob and reset it from the from the comparators connected to the signal from the Wi Fi control. The output of the flipflop could be fed to the control select input of an analogue multiplexer such as a CD4053. The multiplexer would control which analogue signal was used to control the lighting.

Les.
 

crutschow

Joined Mar 14, 2008
38,526
Les and I are on the same page.
Below is the LTspice simulation of a circuit that should do what you what.
It uses one LM339 quad comparator package, one CD4011 NAND gate package to do the latch, and one MOSFET to drive the relay which switches the source of the voltage to the lights.
I used a relay instead of an analog switch, due to the high control voltages.

Edit: The series capacitors and associated resistors to ground act as high-pass filters (differentiators) to block the signal DC level but couple the AC change to the comparator inputs.
This causes one of the comparators to output a negative going pulse to set (Knob) or reset (WiFi) the latch with pulse width determined by the differentiator RC time constant, the Ref trigger level, and the magnitude and rate of input voltage change.
The top comparator on each input detect a positive going change, and the bottom comparators detect a negative going change.


The simulation shows the relay switching the Lights output to the source that last changed its voltage, either the Knob or the WiFi.
The shown change for each is 100mV, but it will trigger at a lower change value.
The voltage change required to switch input is determined by the Ref voltage value and how rapidly the voltage changes.

You need a source for the 5V supply.
It can be a different voltage up to 15V, but the value for R6 must be increased proportionally to keep the Ref voltage at the same value.

Note that the power and ground pins for the CD4011 are not shown but must be connected.
Also all unused inputs (not outputs) on the CD4011 must be connected to ground.

upload_2019-1-7_12-39-37.png
 
Last edited:

LesJones

Joined Jan 8, 2017
4,511
Hi crutschow,
Once again I did not read the post properly. I had not noticed that the control signal went up to 24 volts. I don't know of any analogue multiplexers that will work with 24 volts so you relay suggestion solves that problem.

Les.
 
Top