Electronic – Arduino PWM shield with npn transistors


I'm using a PWM shield (http://www.practicalmaker.com/products/arduino-shields/pwm-shield-assembled) which allows to extend the number of PWM pins for an Arduino.

In my project I'm using NPN TIP120 transistors to control more than 5 motors.

So when I try my circuit without the shield, everything works fine, I connect the Arduino pwm pins to control de transistor (external power source with 20 A)

Then If I try the PWM shield directly powering a simple led it works fine as well, the problem is the PWM as I understand is very led-oriented and has a negative and positive pin for each PWM terminal which Arduino doesn't have. And my problem is where I connect the negative pin of the PWM shield? I tried just connecting it to the ground pin in Arduino but the motors just run, not responding to the different speeds I'm trying to achieve.

Also, I'm using a midi library, which I hope doesn't interfere on this since as I said, the PWM shield works fine when using a led directly on negative-positive pins on the shield.

Best Answer

Your setup is quite different from the standard TLC5940 use, but can be done. The key points are that the TCL5940 is open-drain, and that the actual current and high voltage will be driven by the TIP120.

enter image description here

Logic will be reversed, from the TLC5940's standpoint. Motor will be On, when the TLC Out is OFF. When the OUTx is set to Off, the line will be brought up to 5V through the R Pullup, which also limits the current to 2.4mA (5V - TIP120's 1.4v drop = 3.6V through the resistor, 3.6 / 1500 = 2.4mA). Based on the TIP120's gain, this should (2.4mA * 1000) 2.4 Amps. You can adjust the resistor for the needed gain. When the OUTx is set to On, the line is shorted to ground, turning off the Tip120.

I.E. Setting the TLC5940 to 65% ON, will result in an actual 35% ON, at the motor. Setting it to 25% ON will result in 75% ON at the motor.