RGBW Stairs

Hello!

So I am somewhat familiar with ESP-s and so on, but my brain just can seem to figure this one out.

  • I have 18 stairs
    – Each stair has 5 wires coming out of it ( R, G, B, W, GND)
  • I have 2 motion sensors
  • A lot of MOSFETs
  • Power supply

My question here is, that all of those LED-s will take up ~72 pins + motion sensor, power etc, is it possible to sync two ESPs up with WLED, or is it smarter to extend GPIO pins and does WLED support that… is this project even possible? The LEDs were attached to the stairs like 5 years ago and it would be quite a hassle to replace them with addressable LEDs so that is out of the question for now.

Thanks in advance for the help of your brain computing power!

Sounds like you have analog LEDs on the stairs.
Connecting each tread to a WLED instance will definitely take 72 GPIOs to drive all the strips.
One ESP32 board can provide 16 GPIOs for sure and 20 if you can live with some possible “boot flicker” from GPIOs that output debug info on boot. That means 4-5 ESP32’s would be able to drive every step independently.

Probably the easiest way to control all those devices would be to add a 6th (or use the 5th?) “control” unit and attach the other devices as Virtual LEDs.

One approach would be to make each stair a pixel, that would give a 18 pixel string getting data over 1 pin, just as usual. You’d use a WS2811 IC, the same IC used on each LED of a WS2812B strip, for each stair. You’d use the WS2811’s R,G,B channels (PWM) to switch the power to each of the color lines on the strips.
There are designs on the Web for doing exactly this kind of mega-pixel project using NPN transistors for the power switching, but I don’t know anything about MOSFETs. If you can do your own PCB design (say on free EasyEDA), the boards and the chips should be under $20.

Ah, the W channel. There is a 4-channel driver for RGBW, the WS2814. I have no experience with it, but its the same manufacturer as the WS2811, and the datasheet looks very similar, so the above should apply, with 4 channels instead of 3.

That’s likely a good alternative, quick search turned up at least one:
Analog driver board

That one is only RGB, but I’ll bet there are 4 channel versions out there.
Failing that, a crude fix would be to use two boards for each step and then each step would appear as 2 pixels. One would have full colour and the other would chose a single colour for the white brightness.
Not perfect, but presets could handle much of the playing about.

You end up with 18 (4 channel) or 36 (3 channel) boards at or near the steps, but the controller can be where you’d like.

As you say, a DIY PCB could make this very feasible (if you’re willing to go that far).

The questions I would have are about the switching requirements: how much power, and is brightness control required (via PWM usually). It’s not clear what the driver on the link provides.

FYI: on the WS2811 (and I assume the WS2814), the PWM duty depends on the pixel’s color level, e.g. a sent RGB(255,128,0) results in OutR with 100% duty PWM, OutG with about 50%, and OutB of 0%. However, looking at the signal with a scope, 0% is 0% (0 V), but 100% is full voltage ALMOST all the time - there is a short drop at the PWM cycle speed (around 2KHz), so 100% is not quite that. Still, someone on Youtube is using the WS2811 to drive relays.

Have fun.

Specs are pretty clear, its based on a P9813 which is one of the standard SPI driver chips.
Similar to AP102 and explicitly available in WLED.

Downside for that board would be the need for a CLK and a DATA line, but that’s still only 2 GPIOs rather than 72 to handle all 18 steps.
The upside is you could config WLED for 18 addressable LEDs each one representing 1 step. If you end up using a separate board for White, you config 36 LEDs, in pairs (if you wish) of colour and white.

The PWM issues are handled by the chip just as for the WS281x series.
All the usual addressable LED capabilities/issues apply.

1 Like

Nice. I was looking for the P9813 IC, but most distributors don’t have them, although AliExpress does.