I have a 12V Neopixel strip. I was connecting it to an external power source during development and put the ground wires together, which worked great. Now I want to put this in a box with just one power supply. I do have a tranformer from 7-20V to 5V.
The pixels are getting constant power and so does the ESP. (4.9V transformed)
However the Neopixels are 60% of the time in the right color and 40% of the time white (fastly flickering).
I did check the ground wire and it is connected properly. The weird thing is that it will sometimes work if you just put a measurement wire on the ground pin of the esp with nothing connected on the other end.
That is possible. add 1000uF on the ledstrip. And i would add a 1N4001 (or 1N4007 whichever you have) between the power supply and the 7805 and put a 100uF on the 7805 Vin and GND. and a 10uF on the 5v rail.
74HCT04 does the trick just as well, power from the 5v rail.
Also if you intent to use WiFi, using a bit-banged method will not provide you with a stabile wifi connection, due to interrupts being turned off. Switch to Makuna Neopixelbus which has a DMA mode and which does provide stabile wifi.
Yes a big ass capacitor on the 12v Rail of the strip.
a 1N4001 is a multipurpose diode rated up to 100v the 1N4007 is it's 700v version, which is commonly used for rectifier bridges in mains power applications. They are easy to come by handle a fair amount of current and voltage. A 7805 is a 5v regulator which i thought you were using, anyway it looks a lot like the regulator in your drawing. 7805 comes in different packages, but the to-220 package that is in your drawing is the easiest, it handles the current demand of the ESP without any extra heatsink. It may not perform properly without capacitors on the output, but there is one on the D1, and for more stable power supply it is good to have an input capacitor, which you can separate with a diode from the rest of the 12v DC.
I do when i connect it straight to a MCU to protect the output pin. People will argue that it is to protect the strip, but as far as i can tell, the strip has a logical input, and the output should be protected against overcurrent or bounce.
The ledstrip should have the input protected against accidental 12v, cause that does break them.
Which brings me to something i realized after i turned of my laptop last night.
That applies to WS2812B's, which run ideally on 5v. (apparently they can run on something as low as 3.5v but i have yet to try that) 12v strip uses WS2811's which can run at a voltage of 12v as well (and probably something in between) as long as you increase the value of the current limiting resistor, from the 100R for 5v. Check the datasheet (or measure on the strip) for the 12v spec. The WS2811 handles 3 LED's in series at 12v, where for the RED there is another current limiting resistor (less voltage drop on those 3 reds.) Most strips have 2 0 Ohms resistors for the Green & Blue. So i would say the cutoff is really close the 3.3v anyway, and timing is very important.
No. The Data wire is a signal wire, not a power wire. The current flowing in that wire is tiny. So the power is also tiny. That's not a problem. What's important is the voltage. The resistor will not reduce that voltage because the current is tiny. V=IR. I is tiny, so V (the voltage across the resistor) is also tiny.
What the resistor is for is to protect the Arduino/esp and the chip inside the first led in case the 5V power is connected before the 12V power. It also helps to filter out reflections of the data signal which bounce around at the speed of light in the wire like echoes. Those echoes can corrupt the original data signal. It's like railway station announcements where you cannot tell what the announcer is saying because of all the echoes.
Luck. It was probably only just working, in terms of the signal levels from the esp being acceptable to the first chip on the led strip. Now it is only just not working. Any slight change could cause it to start or stop working right now. The level shifter will fix that, moving the signal away from the danger region into the safe region.