WLED Phone App | Control Addressable LEDs with an ESP32 or ESP8266

I’ve just finished up a new tutorial "WLED Phone App | Control Fully Addressable LEDs with an ESP32 or ESP8266"

This is all about controlling Fully Addressable LED Lights using any Espressif ESP32 or ESP8266 Development Board and your mobile Phone all through WIFI! Code Free! All possible by the Open-Source WLED Project.

When it comes to a single addressable LED strip that you want to be good to go 24/7 but not necessarily be shining LED light everywhere all the time ESP32 are perfect for this application in regards to the low current draw (particularly when dormant), ease of power-cycling and significantly cheaper installation. Plus it will work with any NeoPixel or GlowBit Matrix Module.

WLED is filled to the brim with customisable light shows and fully open-source, it really feels like magic so come jump in!

Read more

4 Likes

Hi, thank you for this tutorial. It is certainly something I would like to try out but I do have some niggling questions as an electronics noob. The ESP32 boards run at 3.3V but the LED strip you have used runs on 5V. I have read elsewhere about level shifting when using ESP32 boards with similar LED strips. So, I’m wondering:

  1. Why have you been able to wire it up so simply without needing to include level shifting?
  2. Is it anything to do with the specific brand of ESP32 board you used, the LED strip or perhaps the relatively small number of LEDs in your tutorial?
  3. Finally, by not including a level shifter, is there a risk of damage or just lack of performance?

Happy for you to refer to something specifically in How to Use a Logic Level Shifter/Converter - Tutorial Australia that might help explain this.

5 Likes

Hi Grant,

Great question, 3.3 sits right on the cusp of minimum verified working logic voltage of the WS2812b

Datasheet

If there’s a bit of droop in the supply voltage (depends on the circuit powering the strip) that 0.7*Vdd can easily get low enough for 3.3V to be acceptable 3.3 = 0.7 * 4.7

I think that’s #1 addressed
#2 is a bit more complex, its really a culmination of things, some ESP32 boards have some form of level shifting on them now to allow for a single strip of LED’s to be run. but as long as the first LED receives a clear signal it will repeat it the string at a logic level of 5V.
#3 There isn’t a massive risk of damage, absolute best practice is to include a resistor after the pin feeding into a logic level converter into the LED’s this makes sure the pin isn’t having to push too much current (there is some stray capacitances from the wires that might cause damage

The WS2812bV5 chips have a confirmed logic voltage of less than 3.3v so will definitely work(the same chips used in the GlowBits)

5 Likes

Thanks for this. I think I understand that. So, being on the cusp, it is possible that similar but different components might not quite fit in tolerance which would result in the first LED not receiving a strong enough signal. If this happens, this would then mean that the subsequent LEDs would not receive any signals so it would either all work or all not work. Is that right?

So, the reason why the tutorial had a reduced number of LEDs was to simplify the power supply to just use the USB. I probably only want to use 30 LEDs to start with on a mid brightness so I can follow what was done in the tutorial. However, I think I will have more questions if I want to go beyond this.

2 Likes

Hi Grant,

When the device is right on the limit of the logic levels the signal will sometimes not be detected which for these LEDs means they will freeze and hold their current colour, or turn off.
You are correct in that the ideal solution is to add a Logic Level Converter between the microcontroller and the LED strip so that the 3.3V logic of your microcontroller is translated to the 5V logic of the LED strip, removing any ambiguity completely.

That’s correct, our guides will show the simplest possible circuit that will work with a known combination of components so that everything needed is included in the one tutorial with minimal cross-referencing.

If you were to add a longer LED strip then it’s best to add a Logic Level Converter and use a separate power supply for the LED strip. Keep in mind both power supplies will need to share the same ground reference.
Projects with longer LED strips would also benefit from the addition of bypass capacitors located at each end of the LED strip to help smooth out high frequency spikes on the supply rails.

2 Likes

I have tried installing WLED via the website on the WRL18035, and on the WRL13804, and both of them aren’t working. On the 8266 it says MD5 of file doesn’t match data in flash. The 32 doesn’t work at all on the web site, not compatible apparently, so when trying esphome flasher just crashes the software as it goes over and over trying to download.

I have tried it on 3 different PC’s and my Raspberry Pi and can’t get them to work. I am pretty frustrated because I have about 10 Pico’s running a lot of LED Strips and I am generally pretty comfortable with getting things working, but here I can’t get past first base. Does anyone have any suggestions, or is there a different chip i should buy to be more successful?

Noel

3 Likes

Hi Noel,

The WRL18035( ESP32-C3 WROOM dev board) is a different ESP32 chip and is relatively new comparent to the other ESP32 boards so most likely will be a bit harder to get working - I found some rumors that it works if you flash the firmware using some other tool but haven’t used WLED (Arduino has a working flashing tool if you can find the compatible firmware).

2 Likes

Hi Liam,

Thanks for that, that is helpful, I will focus my efforts on the 8266’s I bought, whcih are the Sparkfun Thing. These are the ones with the main error message that I have also tried across a number of softwares and a number of hardwares.

They don’t seem to have a boot button, so i have only been plugging them in and turning them on (or various versions of that, I have tried all types of timing), it all seems to download, then an error message at the end and no joy!

Is there a board I could buy that is more likely to work? I just want it working so happy to buy sometheing else that makes it easier.

Cheers

Noel

3 Likes

Hi Noel,

Sorry to hear you are having trouble!

On the 8266 Thing are you able to program the blink sketch? (The onboard USB is just to power the board - the data pins arent connected) to program the 8266 thing you’ll need an FTDI programmer
Sparkfun have an excellent guide for programming the board here: ESP8266 Thing Hookup Guide - learn.sparkfun.com

If the instructions above don’t work I’d use the ESP32 Thing Plus, it features an onboard USB-Serial programming chip so it makes programming easy: SparkFun Thing Plus - ESP32 WROOM | WRL-15663 | Core Electronics Australia
Or the Thing Plus C which Tim used (as of today its unfortunately out of stock)

Liam

2 Likes

will this board work with this project ? https://www.aliexpress.us/item/2255800894560801.html?gatewayAdapt=glo2usa4itemAdapt&_randl_shipto=US

it looks like a direct close of this one that is no longer made Thing Plus C - ESP32 WROOM | Sparkfun SPX-18018 | Core Electronics Australia

1 Like

Hey Joeseph,

Not sure about that board but I have been having great success with the Adafruit Feather Huzzah32. Even better it has all the BMS stuff you need to make it plug and play with a LiPo Battery for a really easy way to turn it into a portable device - Adafruit HUZZAH32 – ESP32 Feather Board | ADA3405 | Core Electronics Australia.

Also here is a very big list of all the compatible hardware - Compatible Hardware - WLED Project

Kind regards,
Tim

1 Like

Hello, I am setup one esp32 with one led strip and the strip is power by stand alone 12v power. Everything works. I connected a second strip to the end of the first one ( colors match and can’t go wrong because BTs led connectors are made to mate with keyed connectors. I increased the led count in wled to double the number of leds. The second strip won’t light up. All voltages are measured and are correct. I know the second strip will light up a few leds but skipping six led on the first strip and six led on the second strip comes on. But it will not light up the second strip beyond the first strip led count . Appreciate any insights you may have.
aaron

2 Likes

Hey Aaron,

Come pop some images of your hardware setup as well. That’ll help me troubleshoot better. At the moment double check for me that you have set up inside the WLED APP that you have told it you are using two strips and that you have the right GPIO number set up in the system.

Wierd LED lights can happen when the Data Line is connected to a floating GPIO Pin (floating means unassigned) which could be an explanation for why your LEDs are lighting up in weird places.

Kind regards,
Tim

2 Likes

Hello Tim,

Thank you for reaching out.

I am cascading strip one to strip two and only use gpio 4 .

esp32 is power by usb adapter, and led strips are powered by a dc 12v adapter (12v 4.5A). As mentioned, I can tell esp to skip half of leds in strip one and all the remainder led will span both strip one and two as if it was only one.



1 Like

Hey mate,

I think it comes down to either making sure all the arrows point the same direction away from the ESP32 for the Data Line, double-checking that both LED Strips are working properly (and none of the connections are loose), and failing that boosting the Data Wire Line Voltage to a higher value.

Start by checking that the second LED Strip is fully operational. If you can swap the position of the first LED strip with the second one and see if you get the same result. If you do that means the Data line is what we need to fix.

The ESP32 operates at 5V but its pins only send out signals at 0-3.3V. So currently the Data Line has a range of 0-3.3V deciding what the LEDs are to do when it would rather have a range of 0-5V. The smaller range is perfectly fine for medium lengths of 12 Volt Fully Addressable LEDs but when the length increases that signal fades in strength. A 3.3V to 5V Data Level Shifter would be the solution in that case, hooked between the ESP32 and LED Strip Lights. See that Logic Level Converter in the image below.

Kind regards,
Tim

Hi, what is the maximum leds that could be run from this board, assuming sufficient additional power is supplied directly to the led strip. thanks

1 Like

Hi Nathan,

For WS2812s there isn’t really a ‘limit’. As the length of the strip increases the refresh rate will decrease.
I’ve run lengths of about 2000, how many were you thinking?

Probably about that. Would you reccomend just running the data wire constant through all the connected strips from the conteoller, and running +/— direct to each strip from separate power supplies?

1 Like

Hi Nathan,

That 2000 was set to low power as a test for data and voltage drop, if I were to run it seriously each strip would have their own power supply with the data and gnd connected between each.

I’d also check out the Uberguide: The Magic of NeoPixels | Adafruit NeoPixel Überguide | Adafruit Learning System.

A post was split to a new topic: Adding LEDs to 3D printed Camera