10/18/2023 Map Stopped Working?
Visit this post for the fix
I have two maps, one of the LA basin (50 LEDs, 24 lit), and one in San Francisco (100 LEDs, 53 lit, the unused 20-odd pins are at the far end from the first LED). The LA map works fine, but the SF map dies at random times. At first, I thought it was the software, but it was the bug in the METAR debug code that we identified. I started having random freezes - the lights would go dark, and the Pi wouldn't respond to network traffic. There was nothing in either the LiveSectional log or the system log with a hint.
I did some work on the debug log, and when I was working, I observed the problem. The screen would flash, go dark (and then into power save mode). It was not connected with network traffic - it appeared to occur when the LED was being updated with existing blink patterns. In my setup, I have the LEDs connected with a JST connector, so I simply unplugged the LED to see what would happen. The map has been running for two days without issue, so I've concluded that the problem is having my system drive the LEDs.
Here's what it looks like - I've labeled a few parts, but since I know that the LEDs cause problems, I'm zeroing in on what could be wrong with them.
For reference, power comes in to the top rails through a quick disconnect connector like this one, a JST SM connector. One of the halves of the connector is soldered into the board, the other connector is held in place by the barrel-to-screw terminal interface.
My breadboard-to-LED extension is stranded wire (it crimps better, though it doesn't carry as much current as solid wire), hooked up to a JST-SM 3-pin connector because that's what the LEDs use.
The ideas I have about what's going on are:
- My power supply (10A @ 5V) can't deliver the current to power a 100-LED string with 53 lit.
- The JST-SM 2-pin connector doesn't have enough current carrying capacity to my breadboard, or the jumper wires from the top rail to the bottom rail are cannot carry enough current.
- My LED string is too long and needs power injected in the middle somewhere.
Possible solutions to try are:
- Try a new power supply. From what I can tell, 53 lit LEDs should draw about 3A if they were all white at full brightness. I'm using brightness of 100, and various colors that are one LED only, so my current draw should be substantially less. The other 47 will draw something, but the rest of the build, which is the Pi (maybe 120 mA, according to some measurements) and the digital light sensor are barely anything. The 47 black LEDs draw something, but Google says its about 3-4 mA per dark pixel (another 200 mA). So I'm well under the current spec of the power supply. Still, I could swap it for a higher quality model.
- Improve current delivery of the power supply to the board. Since the LEDs pull from the lower power rail, I could move the power connector to the lower rail to avoid the jumper wires. I could also switch from the thin JST-SM connector pictured above to a pair of solid wires. I'd originally used the JST connector so the entire system was quick-disconnectable, but my power supply has a barrel-adapter to screw-terminal connector, and I could use that as my quick disconnect point.
- Inject power in the middle of the string. There's a natural point to inject power in the middle of the string: I connect two 50 LEDs strings between LED 49 and LED 50. There are free wires hanging out, pre-tinned, that I could use to inject power. Heck, I could even use a screw terminal on my hardboard to take the LED power and have power injection go to multiple points on the string.
- I could add a second set of wires to complete the LED circuit as a loop back to the 5V and ground rails.
- As a test, just disconnect the second half of the LED string. The disconnect would temporarily turn my 100 LED string with 53 lit into a 50 LED string with 31 lit - much more in line with what seems to work on my smaller LA map. If this test works, it pretty clearly indicates that the length of my LED string is the problem.
- Turn the brightness way down and see if the setup is stable. The full string should draw well under an amp if I set all the airports to NULL as a test.
What else could i do? I have a multimeter, though the circuit doesn't have a great place to put the multimeter in-line to measure the current draw.
Any other suggestions I missed are welcome.
Good recap of the situation. Based on the other builds I'm hard pressed to believe the power supply isn't large enough unless it is a bad power supply. There are plenty of boards with 100+ lights in them running fine on that supply.
The idea of putting power at the end or middle is worth trying, but again I don't think that would keep them from working, although their brightness might diminish a bit as you get further from the power source.
You might bypass the breadboard altogether for the pwr and grd for the LED string and just connect directly to the power supply lines as a test. This would eliminate the possibility of something going on with the breadboard, although I really like the one you are using.
I guess its possible that one of the strings is malfunctioning as well, so separating them and running them independently would help determine that.
If I think of anything else, I'll edit this post. - Mark
Looks like I spoke too soon. The Pi locked up this morning with the LEDs disconnected, so that 10A Alitove power supply would have needed to supply at most half an amp. I'm strongly suspecting it's the problem right now. After this morning's freeze, I disconnected the light sensor just in case there was a problem with it, and I ran the Pi connected to the breadboard with none of the other accessories attached. It still lasted less than an hour.
So, as my next test (thank goodness I didn't do any of the crazy stuff in the first post in the thread!), I've replaced the power supply with an Apple USB wall wart (because without the LEDs it can supply enough current to run them) and if it works for a couple of days, I'll assume that my power supply is bad and get a replacement power supply. I might also swap in the power supply from my LA map, which is solid, and if that's stable, it's more evidence.
So, maybe this doesn't belong in the LED thread after all!
(Interesting note - this is the same map where I had the weird short on the Pi that put the rotary encoder in position 4. Now I'm wondering if the power supply did something to the first Pi I had in the circuit.)
Interesting observation. Can't wait to hear the outcome. - Mark
Tiny update: the SF map has run for almost 3 days on the Apple wall wart. I didn't attempt to power the LED string off the wall wart because it delivers at most 2 amps and I expect the LEDs draw about 3. Since I only had a couple of days before my Amazon return period on the power supply expired, I just ordered a replacement.
Normally, I'd have swapped in the power supply from my other map, but I'm testing the time-of-day software fix on it and didn't want to turn the script off before it had run for a week.