Stepping switch for LED lights

Discussion in 'The Projects Forum' started by Dinocrus500, Mar 13, 2016.

  1. Dinocrus500

    Thread Starter New Member

    Mar 13, 2016
    2
    0
    I am replacing t12 lamp bulbs with LED tubes. The LED tubes are the type that bypass the ballast and wire directly into the mounting lug at one end of the tube.
    I have four 2 tube Fluorescent fixtures that I am using for the LED conversion. What I want to do is switch on one tube of each fixture with the action of a standard wall switch. Then if more light is required, I would like to flip the switch back to off and then on quickly and energize the second row of lamp tubes and have the first row also be energized. I am thinking a time delay relay could do the trick, but have not attempted to wire it yet. Any thoughts or ideas would be helpful. Of course, the entire circuit would go off when the switch is opened and the circuit would reset to only the first row coming on the next time light is needed.

    Thanks so much,
     
  2. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    Looks doable at first glance. Assume that you have already tried out the 120 V AC LED T 12 substitute?
    Would use 4 solid state relays to switch LED lamps.. Use 2 low V power supplies switched , one 6V DC with large filter cap., 1000 uF. other with light filtering for rapid rise & fast decay. Use a Schmitt trigger to monitor fast PS giving a square logic signal every tine power switch is turned of & back on advancing a counter at each flip. Counter a 4022-8 bit or 4017 10 bit. A OR gate on output of 4017 arranges output like a bar graph so that at each SW flick another light is added. At 5th flick , back to 1 light.
    Past my bed time, wish you luck.
     
  3. Dinocrus500

    Thread Starter New Member

    Mar 13, 2016
    2
    0
    Thank you Bernard, seems like it is a more complex circuit than I had in mind. It does not have to work with exactly the input that I described if it would simplify the circuit. Or, I can simply run another wire from the switch box to run the second row of lights.
    Could you elaborate on your comment about me having already tried the 120vac LED t12 substitute, Do you have some concern there?
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,539
    1,251
    Restating the question:
    Tube #1 comes on every time the switch is turned on.
    If the switch has been off for more than 1 second, tube #2 stays off.
    If the switch is toggled again within one second, tube #2 comes on.
    Further toggling of the switch follows these rules: shorter than 1 s, T1 + T2; longer than 1 s, T1 only.

    Yes / No ?

    If yes, then each lamp needs 1 SSR to control the power to T2, and a small timer circuit and gate to drive the SSR. And (the tricky part) a small offline power supply to run the timer circuit for exactly 1 second. The "right" way is to build a small but traditional AC to DC power supply - transformer, rectifier, filter, regulator. That's a lot of work for something that needs to make 10 milliwatts for 1 second, but the rules of this forum do not allow discussing transformerless offline power supplies. The power supply is powering only the timer, which can be a CMOS R-C circuit and very low power. The timer drives the SSR only when its logic conditions are met, and that happens only when power is on. When power is off, the supply holdup runs the timer and logic waiting to see if power comes back soon enough to allow turning on T2.

    Actually, this is a great idea. I have no idea if this is available as a commercial product, but it should be. I'd put 10 of them in my basement and garage. If you are so inclined, you should write up this idea and give it to your attorney. I'm gonna putter around with the circuit. There goes my day job...

    ak
     
  5. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    It would be cheaper just to use 4 switches, just not as much fun.
     
  6. dannyf

    Well-Known Member

    Sep 13, 2015
    1,810
    362
    What about just two separate switches or 1 switch with two separate settings?
     
  7. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    I have to agree, this is a genuinely useful device. It makes it relatively easy to extend or add zoning to existing lighting schemes without adding extra switches and cables. There is even the possibility of controlling more than one extra zone or controlling two zones with the following options from a single switch: Z1, Z1+Z2, Z2, All Off.

    Here's the updated schematic:
     
    Last edited: Mar 20, 2016
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,539
    1,251
    What is the relationship between the two ground nets? If they are the same net, couldn't Q1 be replaced by another section of the 40106?

    ak
     
  9. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    The ground nets are the same. The control voltage could go straight into one of the schmitt inverters but I felt that a bipolar transistor provided a more robust interface (it also appeared on an earlier version of the circuit and it worked well so I left it in) :). Conversely, both of the schmitt inverters could be regarded as unnecessary but I wanted to provide nice clean logic levels to the 4017, although in practice it will probably work perfectly well without them.
     
    Last edited: Mar 20, 2016
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,539
    1,251
    I've been chipping away at this for a week, and have it trimmed down a bit. Basically, the original problem is a race between two timers. If we set an arbitrary decision point at 1 second, then the first light comes on every time, and the second light comes on if the switch is turned off and on again within one second. So every time the switch is turned off, two timers start.

    This is a pulse width discriminator. If the pulse created directly from the state of the on-off switch is shorter than a longer, reference pulse, the 2nd lamp is enabled.

    ak
     
  11. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    I'm not sure I understand what you're saying, but I think it is simpler than that. The first light is always wired directly to the switch as normal and the controlled light toggles with each off-on switch cycle. The only "timer" is created by size of the PSU capacitors and the current draw of the circuit which determines how long the controller can keep running after mains power is removed, which I would set at between 3-5 seconds. So, for switch off-on cycles less than, let's say, 4 seconds, the controlled light toggles. For switch off-on cycles greater than 4 seconds the controlled light remains off.

    I simply saw this as a black box that toggled an output every time its power supply is interrupted and it can store just enough energy for a few seconds of autonomous operation. But, the use of the 4017 decade counter expands the possibilities beyond controlling just a single additional lamp or lighting zone.
     
    Last edited: Mar 21, 2016
    Bernard likes this.
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,539
    1,251
    I understand what you're saying, and I got that from your schematic. My approach is slightly different. For both your approach and mine, all lights go out every time the switch is turned off, and the internal power supply holdup capacitor keeps the logic alive to determine how many lights come on the next time the switch is turned on.

    However, rather than get into a toggle FF or counter, I chose a simple latch. If the second turn-on edge comes within a certain time frame (yours is "3-5 seconds", mine is 1 second), the second lamp is latched on. For me, additional fast cycling of the switch does not alternate the lamps between 1 on and 2 on, or step through some other pattern. If you want to go back to 1 lamp, leave the switch off for 1 second. The holdup capacitor depletes, and the circuit power-on resets to 1 lamp. I can fit all of this in one 40106.

    As for the 4017 - I'm already playing around with a stepped lamp dimmer for my wife's bedside lamp. I can buy a module from china for $3, but that's no fun. My idea is to increment a 4017 through a 4-step cycle with a touch pad. Each step passes 1, 2, or 4 half-cycles of powerline in a two-cycle frame. The output will be two power MOSFETs rather than a TRIAC, for lower heat generation and because I have a few tubes of them left over from something else. Also, integral complete half-cycles rather than phase-chopped half-cycles should make less RF and acoustic noise. I don't know what has changed over the last few years, but all of my incandescent bulbs now sing constantly when dimmed.

    ak
     
  13. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    Might modify output of 4017, Post # 7, to act more like a bar graph. Electro mechanical relays might be less expensive & for 4 lights transistor drivers instead of ULN---.
    Believe the OP has left us.
    Drawing is old, but might convey the idea. Stacker 00000.png
     
Loading...