- Sun Sep 05, 2021 4:07 am
#92200
Use ESP32F (or E or S, whichever you please). It's both small and does not have the issues of the ESP01.
Yes, it can be done, no problem, I have something similar.
For most stable power supply use a DC/DC converter and a linear regulator. One DC/DC for 12V to 4.5V (that's sufficient to run the WS2812 or imitations and will impose less load on the regulator inside the "led") and one linear regulator from 4.5V to 3.3V (like LM3940), which will straighten out the PWM "hum" of the DC/DC converter.
Also don't forget to add a TVS to the DC/DC converter's input. If the power leads are long (and they probably will, from your story) the leads can act as a coil, interacting with the main power supply, creating a situation where the tension may rise up to far beyond 12 V for a short while during power up and the DC/DC converter may not like that (trust me, I've experienced it...)
Last but not least, the WS2812 need to be adressed using the same voltage as it's supply voltage (4.5 V in this case). The 3.3 V from the ESP won't work. There are various ways to resolve this, I found the most easy one is to use a MOSFET gate driver. I nearly always have one of them in the circuit. The IR4427 has two independent channels, so you can use one to drive a MOSFET and the other for driving the WS2812 string. It is very well suited for this task because it can take nearly any voltage as select input (as long as it's below the power supply voltage) and also it will drive the output very "hard" (low impedance) which is good if the distance between the control circuit and the first WS2812 may be more than a few centimeters.
And don't forget to decouple the power supply of the WS2812's suitably. Some of them are very sensitive to a stable DC supply. Repeat a capacitor every few "led"'s.