I'm trying to put together a breadboard solution involving an 18650 cell (routed through a LiPo charging board) that powers both an ATTiny85 and two NeoPixel sticks. Two buttons trigger interrupts that sequentially light up or turn off the individual LEDs on the sticks. (I'm a software guy, that was the easy part!) Trouble is, if only one or two LEDs are on, all 16 LEDs go berserk, flashing various random colors and flickering. I measure the voltage at the GND and 5v pins going into the first stick and was surprised to see roughly 3.3v, not ~4.0v (which is what the battery supplies directly if I measure the voltage right on the battery terminals). On a whim I put the multimeter inline to measure the current and found that when it was flickering it was drawing nearly 100ma. I'm guessing that the boards aren't getting enough voltage and the laws of physics are compensating by drawing more current. It could also be my breadboard, potentially, because when I fiddle around with either the battery leads going into the power rails or with the data line, the flicker goes away and the current drops to something like 4ma (for just a single LED).
First question then - is that a plausible analysis of the problem (that the strip is flickering because of low voltage/high current)? The NeoPixel docs state that you can power a strip directly from a LiPo cell. (In addition to the docs I found I had to drop a small, like 100ohm or less, resistor directly on the ground line for the strip or all three diodes on each LED would turn on full brightness.)
Second question if the first is plausible: is it possible that because the ATTiny85 outputs 3.3v and the strip is sharing a ground with the ATTiny, the strip is only receiving that 3.3v?
Third question if the second is true: how can I ensure that the strips get the full 3.7+ volts from the battery rather than the 3.3v or less from the MCU? Is it simply a matter of breaking out a dedicated ground line from the battery right into the strip? Do I need to isolate just the ground or both the ground and positive signals?
Edit - might have solved it
I went back to some of the docs around using a Raspberry Pi which I thought might be helpful since it's another 3.3v system. Those docs recommended powering the Neos via 5v directly (though other docs on Adafruit's site say you can use a 3.7v LiPo and just have to work around the 3.3v data signal) and warn that very likely you can't just plug it in and have it run; you need either a 74AHCT125 level converter or a 1N4001 diode. I don't have any level converters laying around but I do have a few 1N4007s and so I ripped out all the resistors and put the diode on the battery+ line. Instant relief! As soon as the system gets power, the first pixel lights like it should with no flicker.
I also went back and looked at the stick closer - they already supplied a 475ohm resistor right on the data line. If I put another resistor on the data line I ended up getting the same flickering happening on the first LED. So for now, I'm just using the diode on its own, with the power and ground running right from the battery before going anywhere else, and no extra resistors anywhere.
So to the first question, I think the answer might be that the flickering was caused by the data signal voltage being out of range for the sticks unless most of the 16 were lit up enough to drop the voltage to the point where the data signal was back in range? The docs say it needs to be around \$0.7 * Vcc\$, and I imagine by adding the diode I lowered the voltage enough that the signal was more to the liking of the LEDs.
Does that make sense? Am I thinking about this right?