Connect with us

Help designing a circuit to flip polarity to LEDS

Discussion in 'LEDs and Optoelectronics' started by AshSplash, Dec 9, 2015.

  1. AshSplash

    AshSplash

    10
    1
    Dec 9, 2015
    Hi Everyone,

    I'm looking for some help designing a circuit, I've got a string of LEDs (Christmas lights) and every other wire is connected in reverse. The supply is DC 32V 0.19A (see below).

    [​IMG]

    So when I connect the power one way round all the even lights come on, when I connect it the other way around all the odd lights come one.

    I'm looking to make an oscillator circuit (probably with a 555 timer, 4017 and some transistors) that will flip the positive and negative supply to the LEDs with sufficient speed that they appear on contantly (60Hz?) something like the below, however much faster and instead of an LED on each step all the even steps would go to one transistor and the odd steps to another. These transistors would then deliver the 32V straight to the LEDs.

    [​IMG]

    The following is not strictly accurate but is effectively the situation in terms of the final output:

    [​IMG]

    I'm not certain on how to link up the transistors and what resistors and capacitors etc I need for that supply and speed so any help is much appreciated.

    Thanks!
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    You cannot apply power in reverse to the circuit. This will destroy the ICs.

    Have a look at this proposal:
    upload_2015-12-9_12-41-33.png

    When Itop is positive vs. Ibottom, D5 and R3 turn on Q1. The base of Q2 is at ~200mV, Q2 is off. Only uneven LEDs will light.
    When Itop is negative vs. Ibottom, D5 is reverse biased, R5 will turn off Q1. R4 then biases Q2 to turn on. Only even LED will light.

    You may have to elaborate component values a bit.
     

    Attached Files:

    Martaine2005 likes this.
  3. AshSplash

    AshSplash

    10
    1
    Dec 9, 2015
    Thanks very much Harald,

    Just to confirm I understand correctly, in that proposal, the LEDs coming from the 4017 could be switched out for standard diodes (or removed entirely)? The 4017 circuit I posted was just an example, I don't need LEDs there. "To other LEDs" these are the 2 wires leading to the Christmas lights.

    I'm lost as to what itop and ibottom represent though sorry.
     
  4. Martaine2005

    Martaine2005

    2,381
    627
    May 12, 2015
    Itop and Ibottom are your wires from the power supply.

    I have a couple of questions, if you don't mind..
    It appears that your power source already has an oscillator circuit, because of the way the LEDs are wired. Are there ONLY 2 wires? As your second diagram suggests...
    And how many LEDs on each "odd" and "even" (your words)...

    Martin
     
  5. AshSplash

    AshSplash

    10
    1
    Dec 9, 2015
    Hi Martin,

    Ah ok that make sense thanks.

    Yep only 2 wires going into the lights. It doesn't have 3 like the older types of lights sadly otherwise it would all be much easier :)

    The supply is DC but there was a controller on the wire (now removed) that allowed you to cycle through a range of different flash sequences / speeds. The lights are going outside and will be plugged in inside the garage via a timer plug (so they're on in the morning and evening). The problem is that the original controller defaulted to demo mode (cycling through the different lighting effects) but we just want them on constant and I wanted to avoid going into the garage twice a day to change it.

    In terms of total lights there's 360, I haven't counted which are wired each way but I'm assuming 50/50 as it seems to be every other one.

    Just for completeness I've attached an image of the original controller but I'm pretty sure it's not modifiable.
     

    Attached Files:

  6. Martaine2005

    Martaine2005

    2,381
    627
    May 12, 2015
    I doubt the controller can be modified as the chip is programmed to default demo pattern.
    Maybe @Harald Kapp can alter/edit the circuit to control the string via R1 and R2 only.Omitting the 4017?

    Martin
     
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    For some reason I didn't see the last image in your original post. I'm afraid my circuit is designed to work with the 4017 circuit.

    You can use a DPDT relay to revert the connection of the wires:
    upload_2015-12-9_18-0-13.png

    The relay can be controlled e.g. by an oscillator or even by a DC source: add a diode in series with the relay coil and it will be active only for pne polarity of the voltage. Nte that a relay is not suitable for contunously switching operation. A semiconductor solution would be required in that case.
    On re-reading your original post I doubt the relay is suitable.

    On the other hand: why bother switching the LEDs at all? If you alternate between two sets of 180 LEDs, the may seem to be on all at the same time due to the eye's inertia, but they are on only about half the time. Therefore the effective brightness of each LED wil be 50%, too.
    When you operate the string at constant DC voltage with only 50% of the LEDs being fully on, the brightness is the same as before. And in case an LED burnsout, just reverse the polarity to activate the second set of LEDs.
    Remember that you need to limit the current into the string. LEDS cannot be operated from a constant voltage source.
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    If you still want to alternate the polarity b y fast switching, an H-bridge is the circuit of choice.
     
  9. cjdelphi

    cjdelphi

    1,098
    104
    Oct 26, 2011
    Yup you need a h-bridge, buy one or build one, then you can do this easy...
     
  10. AshSplash

    AshSplash

    10
    1
    Dec 9, 2015
  11. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    If the ratings (voltage, current) match your light string: yes.

    This is only the H-bridge driver. You'll have to add a circuit that alternately turns on and off the right transistors on this driver board. A 555 and an inverter make for a simple oscillator with opposite phases to drive the bridge. However, with such a simple arrangement during switching there will be a short moment when all tarnsistors of the H-bridge are on (see the linked article, 4th figure from top). This will create a short circuit and destroy your H-bridge in short time.

    You'll have to add a dead-band to avoid this short circuit.

    If you use an arduino, as the H-bridge board is designed to be used with, you can set the dead-band in software. If you use plain hardware, you'll have to resort to some additional circuitry as shown in the article linked above.
     
  12. cjdelphi

    cjdelphi

    1,098
    104
    Oct 26, 2011
    Edit

    Totally miss read....

    That 5v jumper enables the 5v regulator but without closely looking, not sure if that then sets the input or one or more outputs to 5v... it would make more sense to regulate the input (but 12v may make it too hot!) 50hz!
     
  13. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    It probably only enables an on-board 5V regulator to provide power for the logic side while still allowing higher voltage on the H-bridge. One can only hope that a kind of "datasheet" acompanies the delivery.
     
  14. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    The simple solution is just to power the string with AC.

    Edited: 24V would be ideal and transformers are readily available.

    Bob
     
    Last edited: Dec 10, 2015
    CDRIVE likes this.
  15. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    Good point, Bob.
    Plus current limiting - if not alreadybuilt into the strip.
     
  16. AshSplash

    AshSplash

    10
    1
    Dec 9, 2015
    Genius! so simple.
     
  17. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Bravo to Bob! That post left me with a "DUH!" moment.

    I think there's a forest-trees analogy there! :)

    Chris
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-