1
\$\begingroup\$

I do colorful led light near my table. I have 5 common anode led rgb strips, glued to a different places.
I'm trying to develop my own rgb controller based on ESP8266, with WIFI and USB, and met a problem: all solution to have more pwm pins, than chip hardware pwm pins, uses too low frequency.
Before that i used custom pcb with atmega328p and 6 mosfet's, but it can control only two rgb strips.
I'm shoot a video for YouTube, and use rgb led strips as part of background. If frequency are too low, all picture are flickering, and it's unacceptable for me.
I know about pca9685 witch have 16 pwm outputs, but it's max frequency too low(~1kHz), so all picture flickering too. Software pwm have too low frequency and uses took many resources, too.
In addition, ESP8266 doesn't have hardware pwm pins. So my question is: How to have 16 pwm outputs in ESP8266, working at ~4kHz or more?

P.S. Sorry for my bad english, I'm not native speaker.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

I'm on a very similar project.

ESP32 has 16 high resolution PWM timers that will do exactly what you want. They run at 80MHz so you can get fast PWM to get good looking videos, and excellent PWM accuracy (lots of bits). For example with 11 bits (2048 steps) you can run the PWM at 39kHz.

So you should really consider switching to ESP32 instead of ESP8266. Besides, your code should be very easy to port from one chip to the other.

If you need source code for that timer peripheral, ask in the comments.

\$\endgroup\$
1
  • \$\begingroup\$ I checked out datasheet, looks great. I think that if ESP8266 doesn't have hardware pwm, then ESP32 too. Thanks you very much, ESP32 should fit for my purposes \$\endgroup\$ Commented Oct 22, 2021 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.