0
\$\begingroup\$

I'm doing a project involving an LED matrix, and using PWM timers to be able to control the brightness. My microcontroller has 3 timers, and I need 4.

Is there a PWM timer circuit, perhaps using a 555 that I can connect outside the microcontroller to effectively add PWM timer?

I've seen this question, whose answers recommend servo drivers for PWM. However, I'm unsure how to use this to drive my LED's, as their output is for 3-wire servos. Looking at this pinout, would I just attach the signal wire to my LED(s)?

I'm also curious if there's a simpler circuit I could use to do this, if GPIOs are at a minimum (if I want to use one pin instead of the two that i2c would require). Alternatively, could I possible use a SIPO shift register to communicate over i2c with the servo module, using only one GPIO pin?

edit: Sorry, it's late, I just realized that using a shift register would use more pins than just using i2c would. maybe use some kind of i/o expander so that pins are no longer at a premium?

\$\endgroup\$
  • \$\begingroup\$ Which MCU are you using? \$\endgroup\$ – Dejvid_no1 Nov 26 '15 at 7:14
  • 1
    \$\begingroup\$ 1: try PCA9685/pca9635. 2: a RC servo control signal is just a pulse width modulated signal at a given frequency. In the case of the servo the duty cycle wont go all the way to 0 or 100, thats all \$\endgroup\$ – Wesley Lee Nov 26 '15 at 7:29
  • \$\begingroup\$ @Dejvid_no1 I'm using a Teensy 3.2, with 3 PWM timers onboard. \$\endgroup\$ – evamvid Nov 27 '15 at 3:32
2
\$\begingroup\$

Yes, external PWMs can be added.

In fact, there are I/O expanders intended for LEDs where each output has its own PWM channel. The expander is controller through I2C.

PCA9532, MAX7313, for example. There is no shortage of LED drivers like that. Those datasheets will give you some keywords to find more.

There are also ICs specifically for driving segmented LED displays and matrices. I had some success with AS1115.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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