PWM with 595 and arduino, 9 RGB LEDs.

Hi, I am basically trying to recreate this project.

What I am confused about is how to PWM all these LEDs. In the video the lights fade so obviously they are PWM. He mentions an amplifier circuit as well as the ShiftOut register. I will be using similar high power (1w per channel) LEDs so if anyone can give me insight to that as well I would appreciate it.

So how do you PWM with a ShiftRegister and how do you drive high power LEDs?

Sorry if this is a stupid question, but so far I am stuck.

Just to get you started. This will need to be adapted for high current as the 595 can not handle the current. This does not do PWM yet.

You can use a mosfet and/or transistor plus a resistor to do the current limiting it will eat a lot of power as heat.

You can use active current limiting and reduce the power consumption to not much more than the device requires. This link is to an active current limiting curcuit with in input compatible with digitial or PWM input.

Since you only have six real PWMs, you can hammer the arduino I/O and create a pseudo PWM that can be 'good enough', the 595 can take it and can be switched fast enough to do it.

The critical item is your arduino code. I dimly recall there may be a matrix library for 595 chips.

Could also try controlling the gain of the cathode transistor with a D/A converter.
Maybe a mosfet there instead as the D/As are basically just voltage out.

or even better - an 8-output DAC!

Those are very nice Crossroads, they are persnickety about timing but I only know this because of an issue using them in place of another manufactures product that went obsolete. The datasheet claimed compatibility and it was not.

IIRC keep all the digital signals timing tightly to what they state in the datasheet, their max/min values mean squat without testing in your application. You may still need to tweak them.

I'd hope someone had already worked out how to use this with the Arduino but no so Rothgar may be the first.

I ordered a couple of sample, supposed to ship 11/29 - tomorrow! Should be here ~12/8.

Crossroads I inquired and managed to get a little more info. You can't be sloppy with communications but there is a function that will allow the chip to hold the value while the microcontroller staggers drunkenly along in trying to send an new value to the device.

I think they meant you have to actively control the LDAC pin, not tie it low as the datasheet says.

The engineer is probably more quirky than the device. Prying code out of them would require a team

I will attempt to get them to a scifi con and ply them with rum and legal otaku. This may take a while. ;)

That would have been my plan - serially load the data in to the register, than LDAC to get it into the output stage. Otherwise the output will be all jittery while the data is loaded up.
Seems like a pretty simple otherface - looks like SPI to me.

// start up SPI to talk to the MAX7221
SPI.begin(); // nothing in () because we are the master
pinMode(SS, OUTPUT); // Slave Select for SPI <— Need this here before any SPI writes?

// MAX7221: write shutdown register
digitalWrite(SS,LOW); // take the SS pin low to select the chip: << SYNC signal
SPI.transfer(SHUTDOWN_ADDRESS); // select the Address,
SPI.transfer(0x00); // select the data, 0x00 = Outputs turned off
digitalWrite(SS,HIGH); // take the SS pin high to de-select the chip:

add this
digitalWrite (LDAC, HIGH);
digitalWrite (LDAC, LOW);
digitalWrite (LDAC, HIGH);