I have a basic set of battery powered LED fairy lights for a project. I need to have each LED controlled by a switch, I'm having an issue..
For simplicity let's say I have 5 LEDs, each has a switch wired into it. I need it so that each LED can be switched on and off, regardless of the LED either side of it being on or off.
At the moment, if the LED closest to the battery is off, there is no power to the other four. I thought the LED lights were wired in parallel so this wouldn't happen, but evidently I was wrong!
I've done this before years ago and had no issues, so I'm not sure what's up with this circuit. How do I wire the switches and LEDs in parallel instead of the series circuit they appear to be in at the moment? I've attached some pictures but not sure how useful they'll be!
So probably, some of the LEDs are in series and some are in parallel or some combination thereof.
However, even if they were all in parallel, if you cut power to the one closest to the battery, you cut power to them all.
Yes there is. (Assuming the leds are connected in parallel).
Keep one wire connected to power all leds. Connect each of the other wires to one side of their switch. Connect the other side of each switch together and then connect that side to the power.5
VCC ----L----L----L---...
| | |
Sw. S S S
| | |
GND ----o----o----o---...
So assuming originally the leds are connected with double wires, then one wire is VCC and the other is GND. Each led has two wires going to the next led.
Then if you cut one wire right after the led, going to the next led, this leaves you with every led having one loose wire and one wire going to the next led. Those loose wires each get a switch. The other side of each switch gets connected to the next switch. This woild leave you with a string of leds and switches where each switch would allow its led to be switched on/off.
Hi! Thanks so much for this. I've wired some test bits in what seemed like the right arrangement, but it's not quite worked. Somehow, both switches are controlling the one LED, and I can't get any of the others to light at all. Any ideas what I've done wrong?
In those pictures I see the wires to the leds being twisted, making it hard to see if you properly connected the same wire to the switch. You cannot just cut an arbitrary wire. Choose which pole you want to connect to the switches (either VCC/+ or GND/-). In my ascii-art-schematic I choose to cut the minus/GND wire.
Once chosen figure out which wire of each led is plus and which wire is minus. Then cut all those wires and connect the chosen pole of the led to one side of the switch and connect the other side of each switch to that same pole of the power supply.
Finally I advise you to use a multimeter to check all connections and measure voltages on every connection and on the power supply.
I think I may have discovered the issue.. These LEDs are wired in such a way that just passing a straight current through them lights up every other LED, and this alternates depending on which wire is connected to the positive and negative of the battery. I think this means that the gnd and VCC wires will alternate between the LEDs, making my life much more fun!
Good find. Sounds like the power supply then does a bit more than just lighting each led. Does it have some blinking function?
If you just want to reuse some found string of leds, you're indeed in for some fun. Enjoy!
It does have a blinking function. I've managed to get this working with a different set of lights without a blink function, so that's something! Getting the blinking ones wired in this way is so far unsuccessful though. This one could take a while, I've got a lot of different switches/strings to wire up and I didn't realise that some were wired differently from others!
I'm guessing that blinking function was your only hint. Such wiring allows the blinking to alternate between even and odd leds. It makes reusing them for your purpose a nice weekend puzzle. Good luck with that!
(I had my own fun when some time ago I decided to convert two 10 meter strings into a 16x8 ledmatrix (about 1m50 x 0m70) using a TM1640 led driver. It gave me many days cutting, soldering and isolating sturdy wires that mostly want to entangle themselves)
Just a thought.. If I took a different string of LEDs that's just wired for on/off, like the ones that I've been able to wire into the switches successfully, could I then just swap them over onto the power supply from the blinking ones and keep the blinking function?
I think so, but you could perhaps better try to use your current string. It may take some time, but shouldn't be much different, as long as one wire is kept intact and the other is cut to go to the switches. I would start marking the wires and leds to make their polarity clear. Your multimeter could be helpful to figure out what goes where.
Using a regular string would allow blinking all leds simultaneously, i.e. not alternating. You don't mention it, but in theory your blinking power now may have several functions: all on, all off, blink odd leds, blink even leds, alternating blink odd/even leds.
Note that for "All on", the power is probably just switching polarity really fast.
The current blinking string only has three positions (off, all blinking, all on). If it's supposed to have more functions than that, then nobody told the people who designed the power supply circuit! I'll have another crack at the blinking string, but for the sake of simplicity I might just use a normal string and the blinking power supply. With the time limits and quantity of lights I have to wire for my project, the quicker and easier option is definitely the best!
Yep. Just do some experimenting and make sure to keep one wire connected to all leds and use the other to connect to the switches that are connected to the power. Have a good time!