fjw / node-leddriver

a node.js library to control a SPI led driver (p.e adafruit leddriver) with your Raspberry Pi
MIT License
5 stars 0 forks source link

12-channel PWM #1

Closed jnovack closed 4 years ago

jnovack commented 11 years ago

This works PERFECTLY for my 24-Channel PWM (the one you purchased). However, the 12-channel PWM only has GND, VCC, V+, CI and DI (clock in, data in) whereas the 24-channel PWM has DIN, CLK, and LAT for control.

I'm struggling to figure out how to use the 12-channel (16-bit) PWM and which cables to use. Would you kindly help me figure out how to pin it out?

fjw commented 11 years ago

I am not really sure but I would try it like that

MOSI -> DI SCLK -> CI V+ -> 5V or 3.3V (or external)

and VCC is the current output I think. Is this module a common anode? Do you have a datasheet?

jnovack commented 11 years ago

http://www.adafruit.com/products/1455

The datasheet on the chip is here: http://www.adafruit.com/datasheets/tlc59711.pdf

I tried: MOSI -> DI SCLK -> CI GND -> GND 3v3 -> V+

with this chip (swapping it out with working code from the 24-chan) and it does not appear to work. :/

fjw commented 11 years ago

Hi.

i looked into the datasheet. This chip should also work with node-leddriver. Did you try to also connect VCC to 3.3V? Do you drive the LEDs with 5V or 3V?

V+ and VCC should both be connected but I am not really sure which one is the power for the chip and which one for the leds. But you should be able to see this on the board. Is V+ directly connected to the V+ output pins of the leds?

If it works please write me, because I have another user who wrote me per mail and has exactly the same problem. :(

jnovack commented 11 years ago

The Adafruit forums confirmed a schematic that works with the 24-channel PWM with your driver (see note below). Now that I have a working setup downstream from a PWM, I'll work on wiring the 12-channel PWM.

Large Image: http://i.imgur.com/kxdTt4K.png

Note Below: As discussed in the diagram and on that same thread, when the PWM wants to turn the LEDs on, it drops the voltage to LOW; but the MOSFET drains the Source when the Gate is HIGH. Thus, this can be corrected within software by inverting the setRGB() function.

You could probably fix it within minutes, but if you would kindly wait, I'd like to officially submit a pull-request within the next day or two.

fjw commented 11 years ago

thx. I updated the documentation and published the new version into npm.

jnovack commented 4 years ago

abandoned.