Go Down

Topic: Is there a PWM Solution that is NOT a constant current sink unit?  (Read 465 times) previous topic - next topic

TobiasRipper

This is in regards to my project that drives 24x individual LED strips using mosfets. I need to use PWM in order to control the brightness of the led strips (yes, each LED strip need it's own Individual PWM control).

Now when I was testing this on an Uno, it was fantastic, the PWM pins ran fine, controlled the mosfet and everything worked as it should. But the Uno doesn't have enough PWM pins. I need 24 PWM pins. I can't really use a Duo or a Mega because even Software PWM can't handle running all these pins in  PWM constantly AND also run my code reliably. So - I need something that offers 24 PWM pins BUT there is a BIT requirement. And this is important - I need a positive PWM line signal, NOT a ground (sink) signal.

I've looked into the TLC5947 which is a 24 PWM LED driver. Great, but it works by controlling the ground lines, NOT the positive line. So essentially the TLC5947 is a chip with 24 PWM Ground connections. Now one of the biggest issues I have with TLC5947 is also that it's not meant for rapid refresh applications - like fast moving "displays" (LED signs) It's meant to be refreshed once in a while (like changing the sign every 5 seconds) The chip does a lot of weird hanky panky when you continuously send data to it 30 times a second. It's just not meant for that application.

When googling, I see a lot of Constant Current Sink solutions. So all the "outputs" are actually varying the connection to ground. The Arduino worked great since it's not sinking the PWM but outputting PWM.
Habeeb!!! Clean up on aisle four!!!

Wawa

Two PCA9685 breakout boards (Adafruit, ebay).
I2C (two Arduino pins) and hardware PWM.
Leo..

TobiasRipper

Two PCA9685 breakout boards (Adafruit, ebay).
I2C (two Arduino pins) and hardware PWM.
Leo..
So any Servo Driver essentially HAS to have PWM pins as positive pis, am I right?
Habeeb!!! Clean up on aisle four!!!

Wawa

The PCA9685 is usually used for servos, but is in fact a common I2C controlled PWM chip.
The outputs are totempole by default (<=10mA source, <=25mA sink), but that can be changed with code.
I use those chips to drive CC LED drivers, but I don't see why you can't drive mosfets with them.
Leo..

TobiasRipper

The PCA9685 is usually used for servos, but is in fact a common I2C controlled PWM chip.
The outputs are totempole by default (<=10mA source, <=25mA sink), but that can be changed with code.
I use those chips to drive CC LED drivers, but I don't see why you can't drive mosfets with them.
Leo..
So the driving pins can not only drive but also sink current? Interesting
Habeeb!!! Clean up on aisle four!!!

wvmarle

How can you drive something if you can't sink or source current?

10-25 mA is very common for driver ICs, logic ICs, OpAmps, etc. Good for 1-2 LEDs or a MOSFET or BJT transistor, just like an Arduino pin. Some such ICs can hardly source any current (the PCF8574 port expander is one) but those can still sink a reasonable current.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

TobiasRipper

How can you drive something if you can't sink or source current?

10-25 mA is very common for driver ICs, logic ICs, OpAmps, etc. Good for 1-2 LEDs or a MOSFET or BJT transistor, just like an Arduino pin. Some such ICs can hardly source any current (the PCF8574 port expander is one) but those can still sink a reasonable current.
This terminology: Source is Powering, as in being the source of current, and Sink is Grounding, as in receiving current and sinking it into the ground rail?
Habeeb!!! Clean up on aisle four!!!

Wawa

Yes.
In your case it's about charging and discharging the gate capacitance of the fet that's switching the LED strip.
Leo..

MorganS

Use a P type MOSFET to invert the signal and drive the positive output to the LEDs.
"The problem is in the code you didn't post."

TobiasRipper

Use a P type MOSFET to invert the signal and drive the positive output to the LEDs.
I was... I was also using a 24 channel LED driver that was not designed to be frequently refreshed, and I ended up having flickers. I figured, screw it. I'll just look for a driver that can source current instead of sinking it.
Habeeb!!! Clean up on aisle four!!!

Go Up