0
\$\begingroup\$

In my bathroom, I would like to install some 24v LED tape, some in a warm-white and some in a cool-white, that I can switch between at will. IE: I will turn on the circuit from the wall-mounted dimmer outside the bathroom and then select either the warm or cool LEDs via another switch. I then want the ability to switch from one to the other at will. This, I realise will be easy - Install a switch after the 24v transformer to alternate between the two.

However, I am curious whether a switch exists that will default to the warm-white circuit. So, for example, when I turn on the circuit at the wall the warm-white LEDs will be powered by default. I can then switch to the cool white however, when I turn off the power to the whole circuit at the wall the switch will automatically switch back to the default warm-white circuit so that next time I turn on the lights they are on the warm-white. Maybe some kind of self-powered relay? Electro-magnetic switch?

To add more complexity this will be after the 24v transformer that will be dimmable by PWM. If I have to I suppose it could be done on the mains supply with one transformer for each of the circuits.

So, to summarise: Default to circuit 'A' at power ON, switch to circuit 'B' after switch press, revert to circuit 'A' after power OFF.

Thank you in advance to anyone who may be able to help!

\$\endgroup\$
4
  • \$\begingroup\$ For complex controlling tasks like this I would recommend using a bus system. DALI would be a good fit for that. If you have a money printer you also can use KNX ;) \$\endgroup\$
    – jwsc
    Commented Dec 4, 2015 at 9:16
  • \$\begingroup\$ For safety it would probably be best to use something with galvanic isolation as although this is a low voltage it can still pose as a risk. I think this would be a cool little project for something like an arduino as you can always alter the settings after the fact. Use the dimmer button as the on off, have another button for changing which fixture is on and use an output driving a 24v rail though a transistor to the lights. Or alternatively use the transistor to turn on a isolated switch (relay) on a separate 24v circuit \$\endgroup\$
    – ed-wright
    Commented Dec 4, 2015 at 9:20
  • \$\begingroup\$ Could use a simple 24v relay that latches itself on. The relay output powers the other LEDs, but also connects back to the coil, (or shorts out the momentary switch). Then when power is removed the relay opens, the next power on sequence starts with the relay off. \$\endgroup\$
    – Nedd
    Commented Dec 4, 2015 at 9:22
  • \$\begingroup\$ I don't think what you have is a transformer, but rather a 24 volt DC supply which you can PWM in order to dim the LED tapes. If so, I assume you're going to use one switch to turn the supply ON and OFF by connecting it to, and disconnecting it from, the mains, and another control to adjust the brightness of the LEDs. Am I right? Also, do you have a data sheet or a link to the supply and the LEDs, please? \$\endgroup\$
    – EM Fields
    Commented Dec 5, 2015 at 11:23

3 Answers 3

2
\$\begingroup\$

How about this?:

schematic

simulate this circuit – Schematic created using CircuitLab

Your post mentions transformer but it must be more than that to power the LEDs. I'm assuming it's a PWM supply of some sort. If that's the case each pulse will be full voltage and we can 'steal' some of that to charge a capacitor to make our power supply. C1 is charged up by the PWM pulses via D3 (to prevent discharge) and R1 (to limit current draw). You'll need to calculate the values of these components to suit your relay coil.

Pressing S1 will energise the relay and latch itself on while turning on the cool LEDs. When the PWM source is switched off C1 will discharge through the relay coil and reset the circuit.

If the external switch is a regular dimmer switch then this circuit is unlikely to work as the LED power supply is, more than likely, a simple transformer and rectifier.

\$\endgroup\$
1
  • \$\begingroup\$ You have to hope there is enough power available to pull in the relay when the dimmer is, for example, at a 5-10% level. Less of a problem when the relay is already energized since hold current requirements are usually way lower than pull-in current. \$\endgroup\$
    – tcrosley
    Commented Dec 5, 2015 at 19:20
1
\$\begingroup\$

The following circuit should do everything you asked for, and here's how it works:

U1 is a "D" type flip-flop, and when the 5 volt supply is turned on, R2 and C2 integrate the supply's rising edge and present it as a momentary signal starting at zero volts, to U1-S, which forces U1Q high, to +5 volts, and U1Qbar and U1D low, to 0 volts (ground).

U1Q going high turns on Q1 which energizes K1, causing the LED supply to be connected to the warm-white LED string, turning that LED string ON.

S1 is a normally-open momentary switch and, in conjunction with R1C1 (a switch debouncer), is used to send clock pulses to U1>

A "D" type flip-flop works by transferring whatever's on its D input to its Q output as soon as it sees a high-going edge on its clock input, so since D is low, Q will go low when S1 is pressed.

That'll cause the transistor to turn OFF which, which will de-energize K1, disconnecting the LED supply from the warm-white string and and connecting it to the cool white string through the relay's normally-closed contact.

D is now high because it's connected to Qbar, so if S1 is pressed again, the transistor will will turn ON again and...

Thus, on power-up, the default state will be warm-white and, after that, every time the switch is pressed, the LED strings will change states.

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ How does this switch back to the warm LEDs when the user turns the dimmer off? The OP said "when I turn off the power to the whole circuit at the wall the switch will automatically switch back to the default warm-white circuit" \$\endgroup\$
    – tcrosley
    Commented Dec 4, 2015 at 18:28
  • \$\begingroup\$ Turning the dimmer down to zero % PWM (turning the dimmer to "OFF", if you will, which only affects the brightness of the LEDs) is different from turning the power off at the wall switch, which will kill everything (including the logic supply) and force a default into the warm-white mode on the next power-up. \$\endgroup\$
    – EM Fields
    Commented Dec 4, 2015 at 21:04
  • \$\begingroup\$ If the wall switch and dimmer are combined into one unit (as they are in my house, you just the dimmer turn it all the way counterclockwise) then you won't be able to get power for your +5v power supply from the PWM output of the combined wall switch/dimmer and would need a separate switch. I don't think that's want he wants. \$\endgroup\$
    – tcrosley
    Commented Dec 5, 2015 at 1:40
  • \$\begingroup\$ BTW, no big deal, but you've got the LED CW and LED WW reversed. The warm LEDs are the default. Not worth changing the drawing, but worth noting if the OP wants to use your circuit. \$\endgroup\$
    – tcrosley
    Commented Dec 6, 2015 at 16:33
  • \$\begingroup\$ @tcrosley: On power-up, U1A-\$ \overline{\text{S}}\$ is held low for a little while, which will force U1A-Q high, which will turn Q1 ON. That'll energize K1, which will connect its COMMON and NORMALLY OPEN contacts, sending power from the LED supply to the WW array. So, since the WW array will be turned ON on power-up, that's the default state. Thereafter, each make of S1 will toggle the LED supply between the two arrays. \$\endgroup\$
    – EM Fields
    Commented Dec 6, 2015 at 20:57
0
\$\begingroup\$

The circuit below makes no assumptions about whether a separate switch is used to turn off the LED PWM (meaning one could run the +5 supply off the same switch), or it is part of the dimmer circuit itself, as it uses a missing pulse detector to determine when the PWM signal has quit rather than using a loss of power. It also doesn't try to "harvest" power from the PWM source, since at very low light levels (a few % on), I don't think there would be enough to pull in a relay coil.

The PWM is fed into a voltage divider that cuts the 24V down to 5V (signal conditioning or other circuitry be be needed, since I don't know what that signal really looks like).

The output of the retriggerable one-shot 74LS123 stays high as long as there is a PWM pulse train. The keeps the \$\small \overline{\text{CL}}\$ input of the 74LS74 flip-flop (being used as a simple latch) high, so the flip-flop is not being cleared.

The period of the one-shot just needs to be longer than 1/frequency of the PWM; I set it arbitrarily to 500 ms since I have no idea what it looks like. The formula for the time is T (in ms) = 0.33 * R (in K) * C (in µF). In this case, T = 0.33 * 150K * 10 µF = 495 ms.

If the pushbutton is pushed, this places a low on the \$\small\overline{\text{PR}}\$ input of the 74LS74, setting it and turning on the relay, switching the output from the warm LEDs to the cool ones. The relay will not turn off until the one-shot times out meaning the PWM train of pulses has ended.

enter image description here

To see a larger version, right-click and click on View Image.

\$\endgroup\$
13
  • \$\begingroup\$ Nice circuit, but... If IC1A is operating with Vcc = 5V, then, when the 24 volt PWM input goes high, IC1A-1 will go to $$ V = \frac {V \text_{PWM}input \times R5 }{R4+R5} $$ \$\endgroup\$
    – EM Fields
    Commented Dec 6, 2015 at 4:33
  • \$\begingroup\$ @EMFields yes, V = 5v when the input is 24V. What's the problem? \$\endgroup\$
    – tcrosley
    Commented Dec 6, 2015 at 6:58
  • \$\begingroup\$ $$ V= \frac{24V\times12.1k\Omega}{45.3\Omega+12.1k\Omega} =23.9 \text{ volts}$$ Plus, where does your 5 volt supply come from? \$\endgroup\$
    – EM Fields
    Commented Dec 6, 2015 at 14:47
  • \$\begingroup\$ @EMFields Look at your first equation, which was correct. The top is V_PWM x R5, not R4. The +5V could come from any ol' USB charger lying around. Most people have spares. \$\endgroup\$
    – tcrosley
    Commented Dec 6, 2015 at 16:29
  • \$\begingroup\$ @EMFields R4 is supposed to be 45.3K, not 45.3Ω. Corrected. \$\endgroup\$
    – tcrosley
    Commented Dec 6, 2015 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.