Help please - Pool Light upgrade to smart / RGB - Page 1
Forum section: electronics / projects

author: pillarama
author_rank: Newbie
timestamp: January 07, 2023, 02:44:17 am
content: Hi Folks,Hoping someone can help me - I'm reaching the limits of my electrical knowledge.I'm trying to build replacement PCBs for my boring blue-only pool lights (Spa Electrics GKRX) with new fancy ESP-01 and WS2812b smart LEDs.The issue I'm running into only occurs when trying to retain the existing Spa Electrics 12v 50VA transformers (LVT50-12 or perhaps now known as LV50-12). The ESP-01 crashes when I switch the 16x WS2812b's up to full brightness.This does not happen and the circuit seems to work perfectly when I power the circuit from my bench PSU at 12v or 15v DC - even through the AC in via the bridge rectifier on my PCB.Other than saving money and not wasting what equipment I already have, I'm pretty sure these transformers would also meet some (safety) standards for pool lighting (which, yes, I do realise might then be somewhat void once I mess with the lights) and they are also outdoor rated so I'm very hesitant to go swapping them with anything else that might just happen to work - If possible I'd rather get to the bottom of why they don't agree with my circuit - chances are I'm doing something dumb anyway.The general circuit is very simple - AC 12v -> 4x M7 diode >>>FULL BRIDGE RECTIFIER!!!<<<<-> LM2596 regulator module (set to 5v) -> WS2812b LEDs and AMS1117-3.3 -> ESP-01.Schematic is attached - it doesn't show the LM2596 which is just an off-the-ebay LM2596 module labelled "dsn2596" adjusted to 5v. Note that the attached schematic has 32x LEDs but I'm only testing with 16 at the moment and I will just populate as many of those 32 on the PCB I can succeed in driving - obviously the more the merrier! But at reportedly 50ma per LED that should be about 1.6A / 19w so I don't see why I shouldn't be able to power all 32 (except maybe heat dissipation!).After some investigation and hair pulling, I know that the voltage at the transformer (12v AC), the LM2596 and the AMS1117 all start to sag at around 75% brightness and this would be why the ESP-01 is crashing.At full brightness:13V AC drops to about 10v5v DC drops to ~4.2v3v DC drops to 2.9v-3vCurrent draw on the 12V AC is about 400ma - but the original lights are > 600ma and the two outputs on the transformer are rated at 25VA each so I don't think there should be any issue there.Current capability of the LM2596 is suppose to be 3A and the AMS1117 which is suppose to be capable of 1A should be drawing only what's required for the ESP-01 - about <100ma or something.I've swapped the M7 diode rectifier out for a 6A KBPC604 in case the rectifier was the issue and that didn't help.The original circuit and my circuit (photo attached) doesn''t look *too* dissimilar to me - they are using some other sort of diode I can't ID just labelled 9349 - interestingly their rectifier results in 17V DC where mine is 13V.... From my limited experience I would have expected more like 17V from rectified 12V AC.... but I get the same with both my rectifiers so unsure what's the deal there. Clutching at straws here - their circuit has a choke on it - I tried adding one to mine but it made no difference....At this point I'm out of ideas. Like I said - if I drive it from my bench power supply it doesn't sag at all and only draws about 450ma @ 15VDC.... I get out of depth pretty quick with AC so maybe that's where I'm going wrong... hoping someone can please help!Also - assuming I ever succeed with this I'd love to share the circuit and PCB with the community so others can do the same upgrade - pool shops want like AU$300-AU$400 EACH for new RGB lights (and I have 4 of them) which even at that laughable price, would still be boring compared to what these can do - so $1200 - stuff that for a joke...Thanks

author: Someone
author_rank: Super Contributor
timestamp: January 07, 2023, 03:01:10 am
content: Quote from: pillarama on January 07, 2023, 02:44:17 amSo test that assumption on its own, because it sure sounds like that is not working.

author: pillarama
author_rank: Newbie
timestamp: January 07, 2023, 03:36:42 am
content: Thanks for the suggestion - I would have thought the fact that the circuit works fine with the LM2596 in place when powered from the bench PSU suggests it's not the LM2956 that's the issue - but just to be sure I just grabbed a spare cordless drill motor I had laying around and confirmed that I can hit the 2.5A current limit set on my bench power supply using the LM2596 to step 18V down to 12V and can also hit 1.5A at 5v when stepping 12V down to 5V....

author: pillarama
author_rank: Newbie
timestamp: January 07, 2023, 03:43:32 am
content: .... and at the risk of blowing the fuse I briefly tried the motor+LM2596 on the Spa Electrics transformer too and measured 2.5+ Amps for a about half a second.... and somehow managed to avoid blowing the 3A fuse

author: Ian.M
author_rank: Super Contributor
timestamp: January 07, 2023, 04:24:06 am
content: Most Ebay LM2596 modules have fake ICs on them. Typically the fakes run at a switching frequency of ~52KHz vs 150KHz for the genuine T.I. IC. Unfortunately most fake modules have inductors and capacitors with values chosen according to the formulae in the genuine datasheet not the three times greater value ones that are required for the three times lower switching frequency. Typically such modules cant deliver over 1A without seriously overheating and aren't reliable over 500mA. However your module can deliver over 1A so odds are its either a better grade of fake that runs at 150KHz or has appropriate value passives for the lower switching frequency. I still wouldn't trust it to deliver 1.5A reliably, so you are going to have to redesign your power supply if you want to fit all 32 LEDs and run them at full brightness.As to why it works on DC from your bench PSU but fails miserably on rectified AC, well the full wave rectified AC drops to zero 100 times a second, and the only thing stopping the LM2596 output voltage also dropping to zero is energy stored in the module's input and output capacitors (typ. 100uF input and 220uF output) and the additional capacitors of 2x 22uF on your board, which is grossly insufficient at higher currents. Try adding 1000uF of reservoir capacitance across the output of the bridge rectifier.

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: January 07, 2023, 04:44:33 am
content: As Ian.M says, you have nowhere near enough capacitance to survive the AC transitioning through zero 50 times a second. If you inject DC before the rectifier and it works then it's proof the zero crossings are your problem.I did a similar mod for my pool light and used 2200uF after the rectifier (because I had them on hand).Quote from: Ian.M on January 07, 2023, 04:24:06 amthis too.

author: pillarama
author_rank: Newbie
timestamp: January 07, 2023, 05:20:51 am
content: Hi Ian (and Geoff) - wow, you're 100% right. I stuck a pair of 470uF 25v caps on the input of the LM2596 and it's working nicely now. Thanks for the clear explanation and excellent guidance, yep AC gets me again. I wish I had asked much sooner - but hopefully having burned the time trying to figure it out myself will at least help me to cement in what you've now explained.The 22uF caps on the 5v rail are perhaps somewhat embarrassing - I'm not even 100% sure why I put them on there, but perhaps it's because they were the biggest SMD caps I currently have on handas I've not been buying SMD components for very long but at some point decided that trying to have an all-SMD board might be a good way to go. Seems a little silly now as you point out the LM2596 board has 100uF on the input and 220uF on the output.Regarding the quality of the LM2596 boards - I'm no stranger to fakes and that they might be was already at the back of my mind - indeed I was surprised when I was able to pull 2.5A+ with the motor earlier today (interestingly I didn't notice any significant heat produced with my thumb either) . Is there a more scientific way for me to grade the ones I have other than to just stick the motor on one and run it for a while at ~2.5A and see how hot it gets? Some way to measure the operating frequency?If running 32 LEDs would required a significant power supply redesign I'd probably just settle for less LEDs - I think might be a shade less bright overall than the originals but probably still enough for now.Interestingly too - I'm reading 16.13v on the output of the rectifier now too. I have some 2200uF 16v caps here - do you think I'd be at risk of popping those and I should stick with the 25v 470uFs?Geoff - do you have any info of your upgrade posted online anywhere? If so I'd be interested to take a gander....Thanks again for your time both of you. I really appreciate it.

author: Ian.M
author_rank: Super Contributor
timestamp: January 07, 2023, 08:42:28 am
content: See fOin theLM2596 datasheetin table 7.9 on page 7.Got a DMM with a frequency range, or an oscilloscope?If so probe LM2596 pin 2 while the board is under load - say 500mA to be certain it doesn't start cycle skipping (which would lower the frequency) - and measure the switching frequency. Pin 2 is the one that goes to one end of the inductor and to the cathode of the Schottky diode. You'll see roughly 150KHz for a genuine one and much, much lower, typically 52KHz for most of the clones.Its interesting to note that the olderLM2576has the same pinout and a lower switching frequency - typ. 52KHz. I suspect that some Chinese company cloned that first, and now everyone is selling them as the more desirable and profitable LM2596.A properly heatsinked genuine LM2596 should be able to handle 1.6A without issues, so maybe 32 LEDs is still within reach, however an array of smart LEDs is a poor way of achieving a strong coloured light source - you'd be better off with fewer much more powerful 'dumb' LEDs, drivers and an ESP8266 with enough pins to let you PWM control the three colors.Increasing the capacitance will increase the mean output voltage, and overvoltaging caps is never a good idea. You know those 2200uF 16V ones are already going to be over-voltaged before you even connect them, and the voltage is expected to rise a bit - they'll probably work at first, but go bang, leak, or just silently dry up and stop working anywhere between a couple of hours and a couple of thousand hours later - my money is on the low end, but I could be wrongAnother issue that you may not have thought about is that WiFi wont penetrate more than a couple of inches of pool water, and a foot or two of DRY non-reinforced concrete so unless these lights are above the waterline you can forget about controlling them!

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: January 09, 2023, 05:56:27 am
content: Quote from: pillarama on January 07, 2023, 05:20:51 amNot in great detail, sorry.I had an Aquaquip QC halogen pool light, that was corroded inside from water ingress. The Aquaquip QC LED replacements cost about $250 and are renowned for failing after 1.5 to 2 years (and only 1 year warranty). I wasn't interested in paying a $100 a year subscription for a pool light, and figured I could do it cheaper myself.So I took my housing and fitted a bunch of neopixels in it, bridge rectifier, Meanwell PCB mount DC-DC switcher, and an Arduino. Once I was done I potted the entire housing in slow-cure clear epoxy to make sure water never got in. It cost me about $130 in parts and a bunch of hours, so far it's at around 1.5 years submerged and still works.

author: pillarama
author_rank: Newbie
timestamp: January 10, 2023, 05:01:28 am
content: I don't have a scope yet - been on my wish list for a couple of years - hoping to buy one this year. With my DMM set to the Hz setting and probing between GND and pin 2 it reads.... ~ 280 kHz....Maybe my DMM sucks too...The 16x LEDs seems to draw ~350mA at 15v according to my bench supply. If that's correct, then I would expect the 32x should also be <1A.Yeah I'm aware that smart LEDs aren't the most effective way to light a pool - I chose them for the reasons that - firstly, I had a roll of 500 of them, also they are easy to control with only a tiny uC and the available code out there (eg ESPHome etc) makes it really easy to do neat effects with them - although granted not all special effect styles are particularly effective in a pool. I've tried a bunch though and some are quite fun.Regarding controlling them - yep I anticipated that would be the case - Microwave ovens do work pretty well after allI have a half a dozen ESP-01's that I bought ages ago which I recently discovered seem to have faulty WiFi - they only will intermittently discover a given WiFi network and rarely succeed in connecting, even in my house with good WiFi coverage so they are the perfect candidates. I have been experimenting with other control options - such as IR and possibly 300/433 mHz radio (eg to another ESP-01 above the water somewhere near the pool) I gathered from some research that 433mHz might have the chance to at least escape the 30cm or so of water or concrete to get to another radio close by. I have a bunch of generic radio modules but I've never found the cheap RF modules to be very robust either so not sure what I'll do there yet. The fallback option I guess being to just have them cycle through modes with each power cycle...The prototype seems to be running very well now with a 470uF 25v cap in place, so figuring out remote control is the next challenge....Sounds great Geoff! How many neopixels did you use? Do you find that it lights up the pool enough? and how do you control it?Cheers guys!

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: January 10, 2023, 07:18:55 am
content: I used this 93-LED assemblyhttps://www.digikey.com.au/en/products/detail/dfrobot/FIT0676/13166404I used an Arduino Nano to drive the LEDs. I pre-programmed several modes before potting it and have a way to switch between modes by toggling the power off and back on again quickly.It's OK for brightness, a bit more would be nice but the biggest problem is direct glare from the light. Ideally you'd want to angle the LEDs downwards or put a louver in to block/reflect upwards light back down deeper into the pool. Temperature might also be an issue running 96 LEDs at full power, so I put a temperature sensor in there and added brightness backoff if the temperature got too high.