Multiple light Dimmings with only one PWM channel?

Hello, I have a ESP82 D1-mini. I only have 1 channel that has PWM on it. My problem is I have 12 lights that was 12v which I can switch on and off with the D1-mini. Only 1 out of that 12 I can PWM and bring the brightness down. Is there something out there I can use to have multiple lights that I can control from the D1 mini? My other problem is The SPI and I2c pins are being used.

Joseph

I'm not sure what you're asking for, but as I2C is a bus, if you use any I2C addressable LED strip/matrix, no other pins are required (each device has its own address, and contorlled via I2C commands).

If other PWM channels are occupied by some other loads, and there is shortage of I/O pins, get a full fledged ESP32 instead of D1-mini.

@docdoc I have 12 white led strips. Is there something I can use on i2c that will let me open multiple led strips?

I can’t because of the size of the on. The case it’s going in has a limit on space. D1-mini is the only one I can use.

Just an update. Everything I found was mostly an io expander. Only one I can find for own is PCA9685. This might do the trick.

Which led strips? do you have a link?

Anyway, see if this video (one of the many I found googling around a bit...) can help you somehow:

One channel or one pin?

Why is that a problem? The idea of a "bus" like i2c or SPI is that pins are shared by several components.

Did you mean those pins are being used but for other purposes?

If so...

It won't.

Why not...
I have several ESP8266 modules with PCA9685 PWM expanders running multiple downlights.
Leo..

Because @josephchrzempiec said

If those pins were being used as SPI and i2c bus, there would be no problem because many devices can be connected to a bus. So the implication of this statement is that they are being used for some other purpose and so not available to use as SPI or i2c bus.

And if they're being used as GPIO, guess what? You can get GPIO port expanders too.

You could get them, but you can't use them, if your SPI and i2c are being used for other purposes.

If you can move some of the external components to use GPIO expander pins, freeing up the SPI or i2c pins, then the problem can be solved. But not all components can use GPIO expander pins, some have to use Arduino pins. For example ultrasonic distance sensors, which need to timed precisely. Also the libraries that are needed for some components may work only with Arduino pins, not GPIO expander pins, like many Stepper motor libraries.

We don't know what @josephchrzempiec is using the Arduino pins for.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.