Main Menu

Tip jar

If you like CaB and wish to support it, you can use PayPal or KoFi. Thank you, and I hope you continue to enjoy the site - Neil.

Buy Me a Coffee at ko-fi.com

Support CaB

Recent

Welcome to Cook'd and Bomb'd. Please login or sign up.

March 29, 2024, 01:06:25 PM

Login with username, password and session length

ESP8266 and ESP32

Started by peanutbutter, February 20, 2021, 09:13:08 PM

Previous topic - Next topic

peanutbutter

Anyone do anything interesting with either of these?

Moving flats soon and there's a decent chance I'm gonna go to town in one room with WS2812B LED strips with WLED powering them. Seems like there's quite a bit of potential to make things with them on the cheap that'll stay powered for absolutely ages with a battery pack, haven't dug into it too deep yet though.

Sonny_Jim

Depends.  Why battery power them if you are fitting them to a room?  Ball park figure is about 1A/5M meters so at full whack a battery isn't going to last all that long, especially if you have a wifi microcontroller running at the same time.

If you get your gear from AliExpress you should get them for about $25/5 Meters.  For general room illumination you can get away with less LEDs/Meter.  Also the esps output 3v logic level, so you might need a logic level convertor for some strips.  Most I've used work fine on 3V though.

When powering them, you'll need to feed in power every 5 Meters or so, otherwise you'll get a voltage drop and they'll look a bit dim.  Also the data line needs a LED/buffer every 2M or so otherwise you'll start to get noise.  Personally I'd go for the 5V versions over the 12V unless you are doing monster lines

I've been doing LED Christmas shows with a Pi, but the basics are the same.  Feel free to ask any questions.

https://youtu.be/dF762-ontZU

peanutbutter

Quote from: Sonny_Jim on February 20, 2021, 10:45:47 PM
Depends.  Why battery power them if you are fitting them to a room?  Ball park figure is about 1A/5M meters so at full whack a battery isn't going to last all that long, especially if you have a wifi microcontroller running at the same time.

If you get your gear from AliExpress you should get them for about $25/5 Meters.  For general room illumination you can get away with less LEDs/Meter.  Also the esps output 3v logic level, so you might need a logic level convertor for some strips.  Most I've used work fine on 3V though.

When powering them, you'll need to feed in power every 5 Meters or so, otherwise you'll get a voltage drop and they'll look a bit dim.  Also the data line needs a LED/buffer every 2M or so otherwise you'll start to get noise.  Personally I'd go for the 5V versions over the 12V unless you are doing monster lines

I've been doing LED Christmas shows with a Pi, but the basics are the same.  Feel free to ask any questions.

https://youtu.be/dF762-ontZU
Oh yeah the LED strips in that room would be mains powered. I meant the general potential of the device on a battery seems like it has a lot of potential (e.g. something that collects data in intervals but is asleep the bulk of the time).


How long would 4 2500mah rechargeable AA batteries last for a 150 WS2812B strip though? When I was looking it up I just kept getting "won't last very long", but could you get 2-3 hours or so out of it doing running at <50% max power (seems to never come close to max power when doing mood lighting and patterns)?
WLED _seems_ to be pretty good at letting you control this stuff, the default settings seem to assume you're powering the lights directly off the board even, but I'm not sure how much of it it actually has control over

At the moment for LED stuff I've a 5m SK6812 RGBW 300 led strip running around my window, both it and the controller (SP107E) are powered via separate USB to 5V cables both capable of 2A (4A power supply), full power white definitely reaches the strips limits but for patterns to and dimmer settings it's fine.
SP107E is really neat for the price point tbh, but some the limitations were starting to get annoying (150 LED limit then it starts repeating, in particular) so I remembered I had an ESP32 and dug it out.

I _think_ my plan will be to just have some 50 per meter strips in two corners and an A3 sheet of perspex with a matrix behind it for some patterns

Sonny_Jim

With regard to battery life time, there's two sure fire ways to work it out.  One is to just run them until they die, the other is to chuck an ammeter on the supply and do the simple calculation.  Also knowing the max current draw means you can fit a reasonable sized fuse, which I'd definitely recommend.  Nothing like coming back to your Christmas display only to find out you nearly set the house on fire due to one of the LEDs failing short.

Not sure what WLED is, I've always written my own patterns using the FastLED library or used Xlights to generate the pattern data.

Again, I've never used the controller boxes, I've always built my own.  If you want to go full fancy pants, you can load up the ESPs with ESPHome and run a Home Automation server which lets you do all kinds of crazy things, like have them switch on at sunset, activated by a movement sensor, Google home integration etc.

The limit for the ESPs is about 400 LEDs iirc, before you need to start splitting up the strings.  Definitely play around with the distance between the Perspex and the LEDs to find the sweet spot so it diffuses nicely.

Sebastian Cobb

#4
Your best bet for batteries are some 18650 cells in a cheap usb powerbank enclosure as it'll charge and already provide you with the 5v out for the led strips, just need to find some that give the higher current outputs. Then you can use an ams 1117 regulator to step down to for 3.3v boards.

I've got a few esp01's and relay boards and 5v power modules to fit to some ikea lights to run with homeassistant, and also some to put in powerbank enclosures as iot buttons.

I've not quite set up homeassistant properly yet though to get going, I've got a test circuit that can control the led via a http endpoint on one of the boards connected to a relay.

MojoJojo

This is a 18650 holder that has both 3.3V and 5V output - 3 amps at 5V. https://smile.amazon.co.uk/diymore-Battery-Shield-Type-C-Raspberry/dp/B08B852L32/ref=sr_1_5?dchild=1&keywords=esp32+battery&qid=1614000956&sr=8-5

Probably get it for a few quid off alibaba or similar.
If what you're connecting to is 5v, I'd look at an arduino instead of an 8266/esp32, and needing only 1 supply voltage might simplify things a bit.

The RaspberryPI foundation have released some sort of mini esp32 type thing, which I haven't looked at much but would be worth investigating.