Actual Ram Usage and Hardware Suggestions

I'm working on a project using 1200-1500 WS2812b LED's per controller, I also need a controller with built-in wifi. I'm trying to figure out which controller has enough UMPH to handle this much using the FastLED library. for simple tracer and flash lighting.

I figure at bare minimum each led needs 3 bytes, so 4.5kb
Maybe 5 times that for program operation? ,so 22.5kb
I'm not sure about the WIFI but maybe, 15kb

So an uneducated guess 42kb..

Ideally I would be able to use a small footprint that will run on the 5v. The Wemo is looking great but is limited to 50kb ram which is not much fudge room. Also I believe I would need to use a logic level shifter from 3.3-5v for the data wire.

So I guess my question is, what is the "heavy hitter" small footprint wifi capable micro-controller that can be programmed in Arduino IDE?

Thank you

What about ESP32, it has more than enough ram and build-in WiFi. It is easy to use with Arduino tools.

HKJ-lygte:
What about ESP32, it has more than enough ram and build-in WiFi. It is easy to use with Arduino tools.

This is a good idea, and I actually started my search with that model but continued looking after I read it is a 3.3v board. I'm going to be deploying ~50 of these in custom enclosures and was trying to not add additional level shifters which would add to assembly time and complexity.

I read the ESP32 can be powered from the same 5v PSU but does the output actually need to be shifted to 5v to work with the WS2812B?

07gtimyfast:
This is a good idea, and I actually started my search with that model but continued looking after I read it is a 3.3v board. I'm going to be deploying ~50 of these in custom enclosures and was trying to not add additional level shifters which would add to assembly time and complexity.

I read the ESP32 can be powered from the same 5v PSU but does the output actually need to be shifted to 5v to work with the WS2812B?

Some ESP32 module contains a 5V regulator and USB interface, this makes the easy to use with Arduino, but you need a HCT buffer (or something else) to convert the output signals to 5V.

HKJ-lygte:
Some ESP32 module contains a 5V regulator and USB interface, this makes the easy to use with Arduino, but you need a HCT buffer (or something else) to convert the output signals to 5V.

I wonder if anyone makes a level shifter already assembled that mounts to the pin header on an ESP32 ? I found a couple stand alone models but would love to have something that mounts directly to the board. Not sure if the qty would be worth having a board made and populated.

I run a LED strip right from an ESP32 pin to the 5V LED strip. No problems.

5V logic triggers around 2.5V so 3.3V is enough to make a 5V high and with using only 3.3V you get an increased slew rate of the signal transition.

Idahowalker:
I run a LED strip right from an ESP32 pin to the 5V LED strip. No problems.

5V logic triggers around 2.5V so 3.3V is enough to make a 5V high and with using only 3.3V you get an increased slew rate of the signal transition.

I have read about increased chance of issues with data loss or buggy lights. This will be an industrial application in a factory which I will need to have as bug-less as possible. I will pick one up and give it a shot to see if it is reliable in my application.

Idahowalker:
5V logic triggers around 2.5V so 3.3V is enough to make a 5V high and with using only 3.3V you get an increased slew rate of the signal transition.

5V CMOS logic often triggers around 2.5V, but it not guaranteed to trigger before 3.5V for high.

I think esp8266/Wemos's ram will be more than adequate. You would have to write some incredibly wasteful code to turn 4.5KB into 10 times that.

07gtimyfast:
Maybe 5 times that for program operation? ,so 22.5kb

What exactly are you expecting to take 22.5kb of ram? That is an incredibly large amount for an arduino-related project.

david_2018:
What exactly are you expecting to take 22.5kb of ram? That is an incredibly large amount for an arduino-related project.

Wifi
String data received and transmitted
FastLED
If it can handle it I might expand to 9000 LED's ~3 strings of 3000 that would be 27kb just in LED holding
Webserver
Lots of data to select which LED's to turn on.

Probably never actually reach the limit on something like the ESP32 but I have indeed reached the limit on Uno and Mega in remote control robotics applications.

loading up

#include "esp_system.h" //This inclusion configures the peripherals in the ESP system.
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/timers.h"
#include "freertos/event_groups.h"
#include <Adafruit_NeoPixel.h>
#include "AudioAnalyzer.h"

With the ESP32 partition set at OTA minimual SPIFFS, I get:

Sketch uses 213368 bytes (10%) of program storage space. Maximum is 1966080 bytes.
Global variables use 13056 bytes (3%) of dynamic memory, leaving 314624 bytes for local variables. Maximum is 327680 bytes.

The "AudioAnalyzer.h" has been modified to use the ESP32 ADC API.

Judging from the number of problems reported here, I think it is worthwhile to add the 74HCT14 buffering level shifter (two of the gates in cascade) to the design to avoid later problems which occur if the 5 V supply is or becomes significantly higher than 5 V.

Questions:

  • How close to the display do you propose to mount the ESP32? If it is more than a few inches, all the more reason for buffering. The output capability of the ESP is nowhere near that of the ATmega328.
  • Are you considering a custom PCB - in which case adding the 74HCT14 (or whichever form) is a no-brainer. In any case, you can get mounting boards for one or two ICs.Please do not even consider trying the "bidirectional level shifter" modules!

Paul__B:
Please do not even consider trying the "bidirectional level shifter" modules!

+1 for that tip. Those modules are right on the limit for this purpose. You might get one and find it works with one strip and one power supply. But that would be just good luck. With another strip or another power supply, or another converter, chances of being lucky again would be... 50:50.. maybe.

Paul__B:
Judging from the number of problems reported here, I think it is worthwhile to add the 74HCT14 buffering level shifter (two of the gates in cascade) to the design to avoid later problems which occur if the 5 V supply is or becomes significantly higher than 5 V.

Questions:

  • How close to the display do you propose to mount the ESP32? If it is more than a few inches, all the more reason for buffering. The output capability of the ESP is nowhere near that of the ATmega328.
  • Are you considering a custom PCB - in which case adding the 74HCT14 (or whichever form) is a no-brainer. In any case, you can get mounting boards for one or two ICs.Please do not even consider trying the "bidirectional level shifter" modules!

A1: These will be linear strips stretching over about 25 meters, the distance from the ESP32 to the First LED will be between 0.5 meter and 2 meter depending on the elevation.

A2: Yes I will be using industrial "M12" pcb mounted connectors and cabling, I'm going to have a simple PCB made for hand soldering the connectors and the ESP32 Dev board.

I've never done a custom PCB before so I would like to keep it as simple as possible. (not a lot of Diodes, resistors, caps, etc) that would need to be soldered on. I will go through the data sheet on the 74HCT14 and see what I would need to add to make it work.

I've also read people have used an intermediate LED close to the controller to "boost" the output and actually shift the logic level that way. 3.3v signal---> Led --->5v signal out of the first Led.

I've used the "logic level Shifters" before for simple I/O opto-isolation and 24v to 3.3 or 5v stuff but would not consider them for data transfer.

Just quickly, ...

07gtimyfast:
I've never done a custom PCB before so I would like to keep it as simple as possible. (not a lot of Diodes, resistors, caps, etc) that would need to be soldered on. I will go through the data sheet on the 74HCT14 and see what I would need to add to make it work.

For the 74HCT14, just a 0.1 µF bypass capacitor. Ground the unused inputs, do not connect the unused outputs. Perhaps a 22k pull-down on the input from the ESP to prevent any spurious activation of the first LED during boot-up.

07gtimyfast:
I've also read people have used an intermediate LED close to the controller to "boost" the output and actually shift the logic level that way. 3.3v signal---> Led --->5v signal out of the first Led.

May compensate for some losses in the cable but the logic levels will still be marginal. And it does not have the drive capability of the 74HCT14 (which can in fact, even be boosted by paralleling gates).

I picked up an ESP-32 NodeMcu board and got it going, I'm able to use it on a 300 LED strip using FastLed, AsyncTCP, and ESPasyncWebServer utilizing 56% of program storage space, and 12% dynamic.

Did not need the level shifter with this particular setup but will implement before the pcb gets made.

discovered the ESP32 is dual core and loops can be assigned to cores (mind blown) (see's doors opening).

Since this is still in the LED sub-forum I have a second question:

I have one Cylon type "chaser" setup to run down the line and stop at the user selected LED, then flash the next 8 LED's and repeat.

I would like to be able to run 2 different color Cylon type "chaser" down the same LED strip (offset from each other and stopping at different locations).

My first idea was to use freeRTOS and run each color/loaction on it's own loop in separate cores and use a semephore to coordinate the output to the LED's.
However I think one would overwrite the other unless I hand data back and forth on which LED's to exclude, since they would be using the same string of LED's and one loop would say turn off led's 4-10 and 19-300, if the other loop was trying to turn on any of those LED's it would be a conflict.

Is there an easier way to accomplish using the FastLed library?

The visual would be:

Green------------------->>>>>>>------------------------------------------------------------------------
yellow----------------------------------------------------------------------------------->>>>>>----------
But on the same strip of LED's

One way would be to have a couple of memory buffers:

  1. Actual led data (Full length)
  2. Background pattern (Length of pattern)
  3. Chaser 1 (Length of chaser)
  4. Chaser 2 (Length of chaser)

The before each update move background to actual led data, and then replace data for chaser 1 & 2. The location of chaser 1 & 2 is controlled with a index.

The first part can be optimized to only rewrite the sections where there chasers was during last update.