Maker Pro
Maker Pro

Help designing a circuit to flip polarity to LEDS

AshSplash

Dec 9, 2015
10
Joined
Dec 9, 2015
Messages
10
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).

DSC_0136.jpg


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.

555+4017Anim.gif


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

https_www_circuitlab_com_editor_id_7pq5wm.png


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!
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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.
 

Attachments

  • upload_2015-12-9_12-39-34.png
    upload_2015-12-9_12-39-34.png
    74.7 KB · Views: 123

AshSplash

Dec 9, 2015
10
Joined
Dec 9, 2015
Messages
10
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.
 

Martaine2005

May 12, 2015
4,932
Joined
May 12, 2015
Messages
4,932
I'm lost as to what itop and ibottom represent though sorry.
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
 

AshSplash

Dec 9, 2015
10
Joined
Dec 9, 2015
Messages
10
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.
 

Attachments

  • DSC_0135.JPG
    DSC_0135.JPG
    174.8 KB · Views: 125

Martaine2005

May 12, 2015
4,932
Joined
May 12, 2015
Messages
4,932
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
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The 4017 circuit I posted was just an example, I don't need LEDs there.
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.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
If you still want to alternate the polarity b y fast switching, an H-bridge is the circuit of choice.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
Yup you need a h-bridge, buy one or build one, then you can do this easy...
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
would this be suitable?
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.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
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!
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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 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.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The simple solution is just to power the string with AC.

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

Bob
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The simple solution is just to power the string with AC.

Edited: 24V would be ideal and transformers are readily available.
Good point, Bob.
Plus current limiting - if not alreadybuilt into the strip.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Bravo to Bob! That post left me with a "DUH!" moment.

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

Chris
 
Top