Best setup

Jblight32
Posts: 4
Joined: Fri Jun 16, 2023 4:54 pm

Best setup

Postby Jblight32 » Fri Jun 16, 2023 5:50 pm

So I am brand new to the ESP32, I have mainly been programming with the parallax propeller but does not suit my needs for this project.
The propeller is very neat but power consumption and programming are limiting factors.
I am making an outdoor light-up display from cnc carved plexiglass and either SK6812 or WS2812 LED strips on the edges.

Here are my goals:
Control of WS2812 & SK6812 LED strips.
iPhone & Android remote control (need as wide of compatibility possible, new phones especially)
Time keeping for on/off schedules, need this to be semi-accurate over 6-months (few seconds drift ok)
Powered from rechargeable 21700 battery... I'm reading 4.2v output

What chipset supports all these needs with the lowest power consumption?
I see the ESP32 max Vin = 3.6v, so I should use probably something like an LM2937 to reduce 4.2v battery input to 3.3v?
I would like to use BLE so that while a phone app isnt in use, it can conserve as much battery power as possible.
Do I need to add an RTC for timekeeping, or can the ESP32 do this?

I ordered a pair of these to experiment with https://www.ebay.com/itm/354713596846

Eventually I have in mind another project which uses the same capabilities but with an accelerometer/gyro for interactive LED effects.
Can the ESP work with an accel/gyro?

MicroController
Posts: 1734
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Best setup

Postby MicroController » Sat Jun 17, 2023 3:28 pm

a) "Control of WS2812 & SK6812 LED strips." - Check. ESPs with the RMT peripheral (incl. ESP32) can do that pretty well.

b) "iPhone & Android remote control (need as wide of compatibility possible, new phones especially)" - Check. Bluetooth/BLE and WiFi built-in.

c) "Time keeping for on/off schedules, need this to be semi-accurate over 6-months (few seconds drift ok)" - Check. You can use the integral RTC peripheral, and supply an external 32kHz crystal for accuracy if needed.

d) "Powered from rechargeable 21700 battery..." - Depends. The ESPs are not really very low-power while active (sleep modes and ULP to the rescue) and BLE/WiFi RF consumes a lot. With BLE this can be significantly reduced by sleeping most of the time and only briefly turning on BLE (advertisement) every so often. It all depends on what's an acceptable average power consumption for you, and you can freely adjust the trade-offs, e.g. sleep duration vs. speedy connecting from a phone.
If you're running a couple of WS2812 from the same battery, the ESP's consumption should not matter much. Just to give some order of magnitude (refer to datasheets for details), on an ESP32 you may expect ~0.1A while active, ~0.15-0.2A active+Bluetooth/WiFi, and less than 1mA during sleep/ULP co-processor running.

As you may be aware, there are several very different ESP32 SoCs, with the (dual-core) "ESP32" being the oldest, ESP32-C2/-C3 and ESP32-S2/-S3 being more modern ones with likely better performance per Watt. Personally, I prefer the -C3 a.t.m. for things which don't need external RAM or a large number of IO pins. (measured 0.02A active, 0.08A active+BLE, sleep < 1mA, but has no ULP co-processor)
The newer ESPs also have a built-in USB connection, obviating the need for and power consumption of the external USB<->serial converter chip present on many of the original ESP32's boards.

Btw, in case it's not obvious, to handle one or a few BLE or WiFi connections simultaneously, keep time, and control some WS2812 you don't need a dual-core model, or a lot of MHz; the single-core ones will easily handle that, even at reduced clock speed, and a single-core naturally consumes less power than a dual-core.
Last edited by MicroController on Mon Jun 19, 2023 8:12 pm, edited 2 times in total.

ESP_Sprite
Posts: 9765
Joined: Thu Nov 26, 2015 4:08 am

Re: Best setup

Postby ESP_Sprite » Sun Jun 18, 2023 1:48 am

Note that the quiescent power use of those WS2812 LEDs isn't too low either. Depending on how many LEDs you drive, you may need to use a mosfet to hard-cut power to them.

MicroController
Posts: 1734
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Best setup

Postby MicroController » Sun Jun 18, 2023 1:32 pm

On another note:
over 6-months (few seconds drift ok)
6 months ~ 15 million seconds(!). 60 seconds drift over that period is 4 ppm. Probably not realistic with a simple 32kHz crystal; an external precision RTC/TCXO (e.g. DS3231) may be the better option.

Who is online

Users browsing this forum: No registered users and 73 guests