Questions?

Skills

SparkFun PWM Shield

Description: This is the Arduino shield version of our TLC5940 Breakout. The SparkFun PWM Shield will allow you to generate up to 16 PWM signals from your Arduino by utilizing the power of the TLC5940 IC. All 16 PWM channels are broken out to standard 0.1" headers, which run alongside convenient voltage and ground rails. Because the IC can be daisy-chained, output headers are broken out on one side of the shield and can be connected to our TLC5940 Breakout to further expand your PWM capabilities.

Use this board to increase the number of PWM pins available to your microcontroller for applications such as monocolor, multicolor or full-color LED displays, LED signboards, display backlighting, servo control, or any other project where a large number of PWM drivers are necessary.

Note: While each 3-pin PWM header is 0.1" spaced, the space between each header is slightly larger in order to accommodate servo connections. In order to make this board suitable for use with servos, 2.2k pull-up resistors have been included on each output as well. Finally, the 2.2k resistor on the Iref pin sets the output current to 17.8mA but a parallel through-hole connection is provided for an additional resistor to increase the current if necessary. To determine the resistor value you need for a given output check the equations provided on the schematic below.

Customer Comments

I’ve been using this board with my Arduino for a couple of years now and am generally happy with it. I added in a few breakout boards now too. I have the outputs connected to relays (both mechanical and SSR) running some light strings (LED and incandescent). But all along I have had an issue with it. I occasionally get a “flash” from most of the channels, meaning that all of the channels light up for a brief instant. This occurred when using the single board without the breakout boards. I am using the Rugged Audio Shield and another shield holding a micro SD card. I tried checking if I was sending a command to the shield to turn on all the lights, but nope. I also did a get at each step to see if something was getting set, but nothing showed up there. Still some more work I plan to do to try to figure out what is going on, but am hoping that someone might have some thoughts.

Does this shield have a total current limitation? Can it be used with an external power supply? I’d like to be able to use >1A at the same time or more (120 mA per PWM channel x 12 channels). Sorry if this is answered somewhere in the manuals. I’m quite new to electronics. Thanks for the advice!

I am trying to use this shield to control some some relay boards to control some 120v LED Christmas lights. This board is hooked up to the SainSmart 8-Channel 5V Solid State Relay Module Board and also SainSmart 8-Channel 5V Relay Module. I can’t get the lights to fade. It appears that I am getting some PWM going as the LED’s on the relay boards are acting as I expect. But the 120v Christmas light LED strings blink instead of fading. Any ideas? I believe that it is a zero crossing issue, but not sure how to fix it. Not sure if the relay module could support this as they are physical relays. But the SSR is advertised as supporting zero crossing. Thanks

I was disappointed to see that this controller doesn’t have a “slave select” line for using multiple controllers together. They can be daisy-chained (forming a larger shift register) but there’s no built-in provision for having multiple controllers sharing the serial bus with other SPI stuff, or with other controllers in a non-linear topology… Otherwise it looks pretty cool. I guess I could share the serial line by gating the clock… Eh…
Also, are those pull-ups on the outputs necessary? I couldn’t find anything in the datasheet about it…

I noticed that this board has a place on it for screw terminals for power. It shows “6.5-16V” in the pictures above. Does anyone know which size screw terminals fits it? Do either of the ones below fit?

I’m guessing that the selector switch on this board does not like excessive current. I have 15 servos connected to it, I made a 90 degree offset mistake in my program which caused all 15 to stall simultaneously on my robot and next thing smoke pours out of the switch and it all stops.

Yeah I bought a second one because of an issue like this.
I tried changing the switch voltage to 7v for the servo pins by removing the switch and putting a voltage regulator in its place.

The second one I took extra precaution to try and isolate the voltage, I reinforced the power and ground lines on the servo pins…
But… I accidentally left the voltage switch in tact which likely caused a problem. This time, I kept it to 5v… but I smelled a little smoke.

After poking around a bit, I realized the pull up resistors. Which means the chip is grounding the signal lines to produce it’s servo signal. I’m not sure if this is good for heavier duty servos or not. I’m not sure how much current the “SIGNAL” line draws for a servo…

I’m weary about ordering a third just to bust it too… I’m thinking about just making one that kinda does what I was trying to do, but just uses the arduino’s Digital IO lines instead…

I need to drive 12+ servos now. Mine are higher current as well.
I tried the pololu, but the examples really sucked and it only does 8.

Yeah, I just unsoldered the switch and replaced it with a piece of wire. I will let you know if the traces survive the maximum current of 4.8A.

I’m sure that the 5V regulator will not like 4.8A being drawn, besides I have a Programmable BEC that can source up 20A @ 6.0V. If I melt the traces I’m soldering a thick piece of wire over all the VCC and GND pins and connecting them to the BEC directly.
As for the servo signal, it shouldn’t take “any current” as far as I’m aware their circuitry is CMOS based. It has to be if the idle current is rated to be 8.8mA.

I have great performance with 2 “big” servos, but when I add a third servo they start acting really funny…
I’ve tested two servo’s on many pins, so it’s not a signal issue.

The only thing I can think it might be is the Current.
I’m driving some:
http://servocity.com/html/hs-7980th_servo.html
Servos… Unfortunately they are not updated with current requirements.
Though I would expect them to be similar to:
http://servocity.com/html/hsr-5990tg_servo.html
servos at around 360mA each.

Any ideas about the limitations here?
I’m running the source through the Ethernet Arduino.

The next thing to try would be to reinforce the traces on the power rail for the servo’s and then plug the servo rail in directly to the source with my voltage regulator.

Funny enough, the rows are 0.1" apart. But the columns are still some odd length. This is going to be ugly if I want this board to be reusable. I highly suggest anyone interested in this shield to get themselves a ProtoBoard and the TLC5940 DIP instead. Much easier to work with.

The reasoning behind this is to accommodate servo connectors. Some connectors are too big to fit if the rows are .1" spaced, so we padded them a bit to allow for the board to be fully populated with servo connectors if need be.

HMMMM. It’s worth noting that the signal you get from using this with the Arduino library might not be what you expect. As a constant current sink, this chip will generate a LOWER duty cycle as the value is increased in the code. Applying a value of 4096 will turn it into ESSENTIALLY an open drain. Sending 1 will make it have almost a 100% duty cycle. This can be addressed in code easily by mapping 0,4096,4096,0 etc, but should be remembered. You can also throw a hex inverter in between this unit and your target if you’re looking to JUST generate pulses and constant current is unimportant.

This can be addressed in code easily by mapping 0,4096,4096,0 etc
That surprised the heck out of me, I thought I did something wrong. A better fix may just be 4095 - value. I’m not sure how intensive mapping is. Isn’t this a big issue? calling clear sets everything wide open?

The issue is that the output will never be fully “off” in this instance. A version using a hex inverter to properly invert the signal would be very useful. I’m working on a high power LED project using external drivers, and having this all nicely packaged up would be delightful.

Customer Reviews

SparkFun is an online retail store that sells the bits and pieces to
make your electronics projects possible. Whether it's a robot that can
cook your breakfast or a GPS cat tracking device, our products and
resources are designed to make the world of electronics more accessible.

In addition to products, SparkFun also offers
classes and online tutorials to help educate
individuals in the wonderful world of embedded electronics.