I'm building a laser kaleidoscope by using three instances of three spinning mirrors and a laser pointer. Halted had some nice inexpensive DC motors that seem to run fine from 5v up to 12v. I tested using the onboard arduino PWM pins to send voltage to TIP120 darlington transistors which controlled the higher voltage for the DC motors. All seems to be fine and dandy so far. I've also had great success using TI's TLC5940 constant current PWM chip for LEDs, but it didn't seem like it would be a problem to use them to manage the PWM signal to the TIP120. Basically, I had three motors running, and I want 9 motors, and there aren't 9 PWM pins on this arduino I'm using. Is there any logical error I'm making in assuming the tlc5940 should be able to handle this task?
In addition, I'm using a small ATX power supply to power up the arduino at 5v, the motors at 12v, and the laser diodes at 3.3v.
The problem, aside from it not working, is that the TLC5940 is getting so hot that it's melting the solderless breadboard I'm using. :-\ so I've obviously miswired something, or don't have a solid grasp of the concepts.
And, an update anyway, I was able to swap the modern device bare bones board with a seeeduino mega, and just used 9 of the 16 PWM channels on it, and was able to get my project up and running as I wanted. But I would love to know if I had made a logical error in thinking i could use the TLC5940 to control current through a tip120.
Yes you have. The TLC5940 is a current sink not a source so you can't drive your transistor like that. You need a pull up resistor from the TLC's output to the supply voltage.
Why did it melt the... oh. because it's trying to sink 12V coming back from the motor? (...at whatever amperage the ATX box can do, I forget. Quite a bit, anyway.)
As Mike says, to make that work at all you need to add pullup resistors from the TLC outputs. But that doesn't explain why your TLC's overheated when in the breadboard.
Also, driving TIP120s from TLC5940s will cause the PWM to work in reverse. I have a recollection that the TLCs allow you to select PWM values from 0 to just under 100%, which when you reverse it translates to from just above 0 up to 100%. That means you will not be able to turn off the LEDs completely. To get normal PWM (and turn the LEDs off completely), you would need to use high side switching with PNP transistors such as TIP125 instead of low-side switching with TIP120s.
PS - also your 1N4004 diode is in the wrong place - it needs to be in parallel with the motor, not the transistor.
Ok, well the tip120 circuit already had 1k resistor in front of the input, so connect 5v behind that and in front of the tlc5940 output... then should be good to go?