PWM shield with external power AND USB

Hi there,

Having partial success with this PWM shield for the Arduino, but I think now I have fried it.

Could someone please clarify whether I can leave the USB cable plugged into the computer when using this shield? Does the position of the VCC Select switch (Vin versus 5V) make any difference to this answer?

I’m hoping to use this to PWM control the vibe motor boards in response to serial data from a PC. I had it ‘working’ with the TLC5940 library example and was playing around with the current limiting resistor (while monitoring current through a multimeter). At 50mA the current dropped immediately to 0mA and, since then, the shield has been unresponsive.

Now, whenever I plug in external power to the PWM shield, the TLC5940 chip just gets super hot, no matter whether I switch VCC Select to Vin or 5V.

Some help please? :slight_smile:

Looking at the schematic, S1 selects whether the output connectors get powered from the 5V regulator fed by the power connectors or from Vin of the Arduino. The Arduino in never powered from this shield; it needs to be powered some other way (USB connector, it’s DC in jack, another shield). The TLC5940 is always powered by the 5V from the regulator on the shield, so you must feed power to the shield’s power connectors even if you are using the Arduino’s Vin to power the LEDs.

Sounds like you somehow managed to damage the TLC5940

/mike

n1ist:
The Arduino in never powered from this shield; it needs to be powered some other way (USB connector, it’s DC in jack, another shield).

… so you must feed power to the shield’s power connectors even if you are using the Arduino’s Vin to power the LEDs.

I would agree with the prior post except for this part. When the shield is powered from some external source (Vin), that source is also sent to the Arduino’s Vin pin (same a the barrel jack input). The Arduino (R3) has a power switching scheme and from what I can tell, if both Vin and the USB power are available, it chooses the Vin path if Vin > 7.2v. Otherwise the USB power (5v) is used to run the Arduino.

When external power is applied to the Arduino’s Vin pin, it’s also sent to the shield’s Vin and thus to the shield’s regulator. And, depending on S1, to the PWM connectors. So the barrel jack on the Arduino will also power the shield.

In any case the answer is the same as already given … you should be able to have an external Vin to the shield and USB plugged into the Arduino w/o any problems. The 5v from the shield’s regulator is kept separate from the Arduino’s 5v no matter what. The only thing you need to avoid is having external, separate Vin sources to both the Arduino (barrel jack) and shield.

Thank you both for your fine answers. That all makes sense to me, but does not explain how I burnt out this TLC5940 chip. I haven’t applied power to the Arduino barrel jack.

One other question that springs to mind - are there any precautions to be taken if I’m not using all the TLC5940 output pins? Should I avoid sending any particular PWM commands (e.g. 100% on, or 100% off) to output pins with no loads?

I’m wanting to be particularly cautious, because I don’t think I was doing anything wrong, and I want to avoid destroying any more chips!

drmattp:
One other question that springs to mind - are there any precautions to be taken if I’m not using all the TLC5940 output pins? Should I avoid sending any particular PWM commands (e.g. 100% on, or 100% off) to output pins with no loads?

It shouldn't make any difference. What were you running off the PWM outputs ? Was it (they) the vibe motors ? If so did you take the precaution of having a reversed biased diode to clamp the inductive spikes ?

If so did you take the precaution of having a reversed biased diode to clamp the inductive spikes ?

Thanks for your quick reply. I’m using the pre-mounted “LilyPad Vibe Board” from SparkFun. That has a diode across the motor - is that sufficient?

The chip failed while the motor was already running (i.e. - not during the motor startup phase). Output just dropped to 0mA while I was fiddling with the Iref resistor value.

The Arduino (R3) has a power switching scheme and from what I can tell, if both Vin and the USB power are available, it chooses the Vin path if Vin > 7.2v. Otherwise the USB power (5v) is used to run the Arduino.

Thinking about it, I think this is what blew my TLC5940 chip. The power-supply I plugged into the PWM shield was set to 6V. This (<7.2V) would mean that the Arduino would keep powered by USB, and potentially cause power mismatch issues between the Arduino and PWM shield.

I think when I solder up my replacement PWM shield that I will set the power supply to 9V, to avoid this potential issue.

Thanks!

drmattp:
Thinking about it, I think this is what blew my TLC5940 chip. The power-supply I plugged into the PWM shield was set to 6V. This (<7.2V) would mean that the Arduino would keep powered by USB, and potentially cause power mismatch issues between the Arduino and PWM shield.

That shouldn’t be a problem. The Arduino talks to the TLC5940 and only has to share a ground to do so. That both are running off separate and perhaps slightly differing 5v supplies can’t be a problem.

The TLC5940 is made to drive LEDs but the LP vibe motor with it’s diode and 33 ohm series resistor shouldn’t be that bad a load for it. I wonder if opening the path for the current setting while the IC is powered might induce some odd latchup ? Other than that all I can suggest is next time use a resistor inlieu of the LP motor to get things working initially. Then swap in the vibe. How many of these are you intending to drive (eventually) ?

How many of these are you intending to drive (eventually) ?

We intend to have 8 vibe motors, but the design only calls for 2 of those to be on at any one time.

I’ve got an oscilloscope and multimeter set to monitor current. I’ll remember to check if the chip is warming up during my initial testing.

Thanks for your help. Much appreciated. I think I can fumble through from here…

One last thought. Others have had similar problems. That is it worked OK until they ran the TLC and Arduino off separate supplies. One user opined that you had to power up the TLC first and then the Arduino. Sounds a little odd to me (not that power sequencing is odd, just in this case) but give that a try.