can i use TLC5940 to generate 5v pwm with 3.3v digital pin?

trying to figure out if i can add the ability to generate 5v pwm signals with my nodemcu by adding a tlc 5940 IC?

i only ask because the max Vin for this IC says 5.5volt. im thinking i can use the regulated 5 volt rail on the nodemcu to power the tlc5940, then use the 3 volt digital pins to control it. therefore generating a 5v pwm with a 3v arduino board.

mainly i guess im not sure if the tlc uses the voltage from the digital pins as some sort of reference or something, i can read a data-sheet enough to understand how to wire something but not well enough to understand the internal workings of larger more complex ic's yet.

but anyways thanks for any help you can give i really appreciate it.

well i read somewhere that a logic level converter is needed to use a shift register if you want it to output 5v while being driven by 3, seems like an easy solution for my problem as well, it may work without one but it seems like if it doesnt then a logic level converter is what i need to make it work, also i read somewhere its hard to get the clock frequency running right between an esp8266 and this chip, anyone with any advice on this second problem is again greatly appreciated

The TLC5940 is a 5V chip, so all those output signals from it are 5V and they will need to be cut down in order to safely read them. The signals from your esp8266 are 3V3 and they will need to be boosted to 5V for the TLC5940 to read.

The biggest problem is that the TLC5940 is not a PWM generator it is a LED driver. So do you need a PWM generator like you said?

a logic level converter is what i need to make it work,

Yes but not one that is designed to shift logic levels for an I2C bus, which is mainly the ones you will see on line.

Grumpy_Mike:
The TLC5940 is a 5V chip, so all those output signals from it are 5V and they will need to be cut down in order to safely read them. The signals from your esp8266 are 3V3 and they will need to be boosted to 5V for the TLC5940 to read.

The biggest problem is that the TLC5940 is not a PWM generator it is a LED driver. So do you need a PWM generator like you said?
Yes but not one that is designed to shift logic levels for an I2C bus, which is mainly the ones you will see on line.

The TLC5940 is a LED driver which controls brightness using PWM. It can work with VCC = 3 V to 5.5 V . So you can power it from 3.3 V and has no problem with ESP interfacing. Even when Vcc is 5V you can feed SCLK and SIN signals directky from ESP without boosting and use simple voltage divider if you need to feed data from TLC5940 to ESP.

dlayman11:
trying to figure out if i can add the ability to generate 5v pwm signals with my nodemcu by adding a tlc 5940 IC?

The TLC provide not a constant voltage but a constant current on its output pins, so if you load not an LED you will need to use a load resistors or some other circuits.

This is sounding like a classic X-Y problem.

@dlayman11, why do you want to create a 5V pwm signal?

alesam:
The TLC5940 is a LED driver which controls brightness using PWM.

Sure it is BUT it is not a PWM generator because it cannot produce all the duty cycles of a PWM signal. Specifically it can’t produce a duty cycle of 0% or 100% depending on which way you look at the signal.

could it be used to switch a logic level n-mosfet to feed a pwm signal to a DC motor? if the datasheet says it could be driven with 5v anyways.

@Grumpy_mike if it cant generate either a 0% or 100% duty cycle wouldnt that mean for this application i wouldnt have the absolute highest speed or absolute lowest speed essentially.

if it cant generate either a 0% or 100% duty cycle wouldnt that mean for this application i wouldnt have the absolute highest speed or absolute lowest speed essentially.

Yes correct.
Basically this is the wrong device to do what you want. This device needs to be constantly fed with pulses to produce the PWM. A much better device is the PCA9685 which is a set and forget device. That is you see a PWM signal going and it continues to produce that value until you tell it to do something else.

If you can't handle surface mount devices the there is a board with one on:- Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface [PCA9685] : ID 815 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits

youve got me lost now mike, so your telling me for example a nodemcu cant provide the appropriate pwm signal to the TLC5940 so that the TLC5940 can provide the proper PWM signal to the N-channel mosfet.

or is it that i will just miss out on either full speed or full slow speed.

ok you said maybe wont be able to achive 0% gate, would that mean mosfet gets stuck on, or would my mosfets pulldown resistor stop that?

i just pulled up a datasheet for the chip you recommended, does have i2c, and after some digging i cant really find too many through hole equivalents, this is interesting.

i guess i could slave my mega to my node and do it that way but idk, i really wanted to reduce the amount of boards as much as i can.

Tlc5940 is an awkward beast. It's a specialist chip meant for driving LEDs and it may not be ideal for driving MOSFETs that drive motors. That's why Mike suggested the pca9685. It's more general purpose and better suited to your MOSFETs/motors. Tlc5940 also needs an external clock provided to it, whereas the PCA chip has that built in.

Was that helpful? If so, would you mind answering my question from post #5? We know you want to drive at least one motor but that's all we know.

ok you said maybe wont be able to achive 0% gate, would that mean mosfet gets stuck on,

No. It means what I say, the signal can never go to full off, it always has a duty cycle of at least 254:1 and not 255:0.

It is simply the wrong chip to use, forget it.