Introduction: Easy CAT4101 LED Driver

As part of a larger home automation project in my small apartment, I wanted to make a LED lamp. This required making some LED drivers for the high-power LEDs I am going to use. These are my first custom manufactured PCBs, and also my first time doing SMD soldering. There are some great resources online to help people get started, so I won't go over everything in this instructable.

Overall, it was very easy to design and build these drivers. It was also a good learning experience.

These LED drivers are based on the CAT4101 LED driver from On Semiconductor. They can handle up to 25V and 1A, so they are perfect for many high-power LEDs. The 3W LEDs that I bought off eBay have a forward voltage of 3.4 to 3.8V, and a max. current of 700mA. Based on these specs, one of these drivers can power up to 6 LEDs each!

Step 1: Parts and Tools

Here is a list of the parts and tools I used. More information on how and why to use certain things are explained later.

I designed the PCBs with Eagle. This is probably the hardest part of making these LED drivers. I have included the schematic and PCB files with this instructable.

I had the PCB boards made by Seeedstudio. They offer five 5cm x 5cm board for a low price. They took a few weeks to arrive here in North America. The quality, as far as I can tell, is excellent.

Tools:

  • Soldering Iron - I can't stress this enough: don't buy a cheap one! From my own experience, cheap irons don't last, and will end up doing a bad quality job, no matter how good you are.
  • Tweezers - I used 1206 SMD parts. They are small, and impossible to hold using your fingers, not to mention soldering them too.
  • Magnifying glass - A magnifying glass - especially one that's part of a light with an arm - is handy to inspect soldering.
  • Solder wick - It's very easy to use too much solder on small SMD parts. Solder wick will help remove the excess.

All of the parts were purchased from Newark. Delivery was prompt, even if they sent three separate packages from the same warehouse. They only charged shipping for one. Digikey is where I usually purchase parts, however, I found that Newark had cheaper prices. Buying more than needed can make the price even cheaper, and parts like capacitors and resistors can often be used again in other projects easily.

Parts (per board):

  • CAT4101 - the most expensive part. I got them for about $3.30 each
    • Newark SKU 08R52564
    • Manufacturer part# CAT4101TV-T75
    • Datasheet: CAT4101
  • (1-3) 0.1uF ceramic capacitors - two of the three are optional, but at less than 4 cents each, price shouldn't be a factor.
    • Newark SKU 70K9167
    • Manufacturer part# C1206C104K5RACTU

  • 1uF ceramic capacitor
    • Newark SKU 06R4217
    • MC1206B105K500CT
  • 180 Ohm resistor - for current limiting the on-board LED
    • Newark SKU 98K2692
    • Manufacturer part# WCR1206-180RFI

  • 510 Ohm resistor - for setting LED current
    • Newark SKU 59M7004
    • Manufacturer part# CRCW1206510RJNEA

  • (optional) 10K Ohm resistor - pullup for PWM, or for permanent EN
    • Newark SKU 39K0872
    • Manufacturer part# MC0125W1206110K

  • SMD LED, Green, 2.2V, 20mA
    • Newark SKU 77K7035
    • Manufacturer part# SML-LX1206GW-TR
  • 5K Ohm through-hole trimmer - for variable LED current
    • These had a picture of the trimpots with the correct pin alignment, but when they came, they were different
  • 3-Position screw terminal - 5.08mm pin spacing
  • 2-Position screw terminal - 5.08mm pin spacing
  • male pin header - 0.1" pin spacing

All the SMD parts are 1206 (32mm x 16mm metric) size. The PCB board has big pads for the SMD parts, so 1208, 1006, 1406 and 1408 sizes may work, although those sizes are rare and generally cost more than 1206.

Testing equipment:

  • Arduino - this is handy for testing the on-board LED and the PWM function
  • Digital Multi Meter - preferably with continuity test (but a low Ohm setting works as well)
  • High-power LED - any LED that can handle >100mA of current. It is not recommended to use paralleled LEDs to get a current capability of >100mA
  • Appropriate power supply - this needs to have a voltage rating of 0.5V more than the LED forward voltage, and be able to provide equal or more than the LED current. In my testing, using a voltage even +5V more than needed is perfectly acceptable

Step 2: Circuit

These drivers are designed to handle LED voltages up to 25V, and current up to 1A. Exceeding these is strongly not recommended!

Schematic:

The schematic for this LED driver is similar to many that can be found on the web. I designed a few optional features into the schematic and PCB, purely for adaptability to different situations. For example, I plan on using a TLC5940 to provide 12-bit PWM. The TLC5940 has constant-current sink pins, which are different than an Arduinos TTL pins. Adding an optional 10K Ohm pullup resistor to the board, and some sort of inverting logic (not on this board) makes it compatible with the TLC5940.

CAT4101:

The CAT4101 is a very easy chip to design with. Unlike most switching drivers (buck, boost, etc), the CAT4101 needs a low external parts count, no inductor, and requirements for trace length and placement of external components are much more lax. This also means that the cost to build them are also lower.

Two of the largest trade-off of not using a switching driver are efficiency and flexibility. This is not to say that the CAT4101 can not be efficient. Later in this instructable, power supply considerations will be looked at.

  • VIN - This pin supplies the CAT4101 with power for the internal regulators and other circuits. From the datasheet, the minimum and maximum voltages are 3.0V and 6V, respectively.
  • PWM/EN - This pin is used for dimming. If you aren't going to dim using PWM, this pin should be tied to the VIN pin. Alternatively, you can use a simple on/off switch for control. This pin uses a small amount of power. If you don't have other 5V or 3.3V circuits in your design, the datasheet provides a simple circuit for producing 5V - much better than an inefficient linear regulator. For PWM control, you need to know if your controller is a current source, sink, or push-pull. Only the current sink (like the TLC5940) needs special treatment: a 10K pullup resistor between VIN and PWM/EN, as well as an inverted PWM signal.
  • RSET - This pin uses resistors tied to ground to set the maximum LED current. The following is from the datasheet, and lists resistor values for specific LED currents. Figure 11 on the datasheet shows a graph of RSET vs LED current as well.

LED Current [mA]---->RSET [Ohms]

100---->4990

200---->2490

300---->1690

400---->1270

500---->1050

600---->866

700---->768

800---->680

900---->604

1000---->549

In my design, I used a fixed 510 Ohm resistor in series with a 5K trimpot. The trimpot allows me to dial in a specific LED current from <100mA to just over 1A. The fixed resistor protects against accidentally setting zero ohms on the trimpot, and potentially destroying the CAT4101 and your LEDs. The preferred method is to set the maximum LED current you want (and that your LED can handle indefinitely), and then forget it! Dimming should then be done using PWM/EN.

  • LED - This pin sinks the LEDs current, as well as regulates it. The LEDs should be set up in series (more on this later), with each LEDs cathode (-) towards the LED pin. This is called low side control, as the control device is on the lower voltage side.
  • GND/TAB - This is pin connects to ground, as well as the CAT4101s tab.

Step 3: PCB

There is not a lot of special considerations when designing the PCB. I have included my gerber files and Eagle files. The zipped gerber files are the exact ones I sent to Seeedstudio, so there should be no problem with them, and should come back without problems. The silkscreen on the board that says "18.5V max" was something I put on as part of my larger project. This can, in fact, handle 25V.

Heat:

The CAT4101 has to drop all the excess voltage that the LEDs do not At high current, this mean a lot of power. The CAT4101 comes in one package called a D2PAK5. It is specially designed to dispose of heat through the pad, and into the PCB. The PCB therefore must have a thermal capacity to handle the heat from the CAT4101.

In my testing of the driver, the CAT4101 never even got warm. The PCB is designed so that there is an exposed area of copper below the CAT4101. This pad can be soldered to the copper to create interface for heat to go from the CAT4101 to the PCB. (see photo)

Soldering the pad to the PCB is easier said than done! In all four attempts, the result was not good! I am still not sure why - it could have been the vias that I placed under the pad, or that my soldering iron just wasn't hot enough - but the solder refused to flow under the CAT4101. As well, the exposed copper pad was not large enough, and soldering on the left and right edges was impossible. I did, however, heat the vias under the pad and apply solder. It flowed through to the other side, but since I could not see the other side between the CAT4101 and the pad, I'm not sure if this helped or not. The bottom line is: when testing each driver with up to 12V and 600mA, there was a noticeable change in temperature of both the CAT4101 or the PCB, but they never got too hot to touch. Always test the temperature of the CAT4101 under normal operating conditions to make sure. Symptoms of an overheating CAT4101, besides the heat, is the LED(s) flashing as the IC goes in and out of thermal protection.

Ground:

Creating a ground plane(s) on PCBs is a good practice. This allows easy access to ground, as well as creates a slight capacitance between ground and power rail traces. The capacitance is like a decoupling capacitor, reducing noise and transients. The extra vias are to help spread heat from the top layer plane to the bottom layer plane.

However, this can have negative effects. The capacitance between the PWM trace and the ground plane can destroy a high resolution PWM signal. Using the TLC5940 (12-bit resolution, 240Hz PWM) as an example, the signal can have a period of microsecond:

1/240Hz = 0.00416667s

0.00416667s/4096 = 0.000001s

1/0.000001s = 1MHz

Other:

As per the datasheet, a 0.1uF capacitor needs to be placed as close as possible to the VIN and GND pins of the CAT4101. This prevents noise and power fluctuations from getting inside and influencing the LED current limit and shutdown mechanisms.

Step 4: Extras

With the right design, one can fit multiple CAT4101s on a single 5cm x 5cm PCB without issue. I designed my drivers to be used in different applications, be it one or four. Having only one CAT4101 per board left quite a bit of room. I used this room in a few different ways. Some, or all of these, can be left out without affecting the core functionality of the CAT4101: driving LEDs at a constant current.

Extra Capacitors:

There are two extra capacitors on my boards that are not needed. After testing, C3 and C4 were found not to be critical.

RSET trimpot:

If you are going to use these is a permanent project, and know exactly what current limit you want, the trimpot connected to RSET can be omitted.

Power LED:

I wanted a visual indicator that my LED driver boards were powered and on. I put a 2.2V LED in series with a 180 Ohm resistor. 180 was chosen because it would work with the range of voltages on VIN: from 3.3V to 5.5V.

I did not put an LED on LED+ because of the wide voltage range this could have. If designing for 12V at 15mA, a 680 Ohm resistor is needed. If the LED+ voltage was then lowered to 5V, the LED would only get 4mA. If raised to 24V, the LED would get 35mA, 15 more than the LED is designed to handle.

Step 5: Power Supply

Special consideration should be given to the LED power supply.

The most important thing to remember when choosing a power supply is that the CAT4101 needs 0.5V more than the LEDs. This means that if you have three LEDs, each with 3.6V forward voltage, you need a power supply that provides at least 11.3V under load.

Efficiency is highest when the supply voltage is as close as possible to the LED voltage. This also minimizes the heat generated.

Series vs Parallel:

When powering multiple high-power LEDs from a single driver, series is always preferred. This is due to the variations that can occur from one LED to the next. While one LED may consume 400mA at 3.8V, another, same spec LED may consume 400mA at 4V. Due to the laws of electricity, current is divided between parallel connections through resistive loads. Voltage, however, stays the same. Thinking of the LEDs as resistors with equal values, and using Ohms law (V = I x R), if the voltage is not the same through each LED, then the current must be different as well. This extra current through one LED could cause it to fail. If that LED no longer consumes current, and the CAT4101 always regulates to a constant current, the other LEDs must then consume the extra current. This could then cause failure of the remaining LEDs.

The CAT4101, nor the circuit I designed, has any protection from LED failure. For that reason, always put LEDs in series!

It is easier and cheaper to find a higher voltage supply than a higher current one.

Step 6: PWM Dimming

Having had some time to try out these drivers, I wanted to add my observations about PWM dimming this LED driver. There are many different solutions to PWM dimming. Arduinos have a number of 8-bit PWM capable pins, and 555 timers allow for cheap and easy PWM circuits. Another solution - and the one I intended to use with these drivers - is the TLC5940. It has 16 channels capable of 12-bit PWM resolution.

Arduino

Arduinos 8-bit PWM is a simple way of dimming these drivers. Connecting the Arduino ground pin and a PWM pin to the driver boards is all that is needed! The key to this simplicity is the Arduinos pins, which are capable of both sinking and sourcing current.

TLC5940

In some situations, one might want to have greater resolution. 8-bit PWM can lead to very noticeable 'steps' between adjacent PWM values. This is especially evident at low values (close to off).

The TLC5940 provides 12-bit resolution, which is 16 times greater than the Arduinos 8-bit! (4096 vs 256)

The hardware and software setup for controlling the TLC5940 with an Arduino can be found here

The most important thing about the TLC5940 is that the output pins can only sink current. The TLC5940 is actually designed to be a LED driver itself, but only up to 120mA for all channels combined. To connect this to our LED driver boards, we need to add a circuit between the TLC5940 and the board.

Note: it is mentioned in this instructable that to connect a TLC5940 to these boards, a 10k pullup resistor must be added to the board in the provided space. However, this is a mistake. While there may be a circuit that works using a pullup resistor, the method I describe below uses a 10k pulldown resistor instead.

In order to get the proper PWM signal, a PNP bjt transistor is needed. I used a 2n3906. Because the TLC5940 has current sinking pins, it cannot provide current needed to turn on a NPN bjt transistor. Instead, we use a PNP bjt transistor, so that the TLC5940 can source current from the base of the transistor. Basically, when the TLC5940 sends a 'high', it sinks current, turning on the PNP transistor, and sending a high to the LED driver. When the TLC5940 send a 'low', no current flows in or out of the pin, turning the PNP transistor off. A NPN transistor will not work, as it requires current at the base to turn on, and the TLC5940 cannot source current.

Since the TLC5940 regulates the current on each pin, no base resistor is needed. For the 2n3906, I found that a 3k3 resistor on the TLC5940 current set pin provides enough current. However, having a 100 ohm resistor on the base of the PNP would not hurt.

The TLC5940 library for Arduino has a default PWM frequency of about 1kHz. While the CAT4101 is a linear LED driver, I found that there is an audible, high-pitched whine coming from the driver. This whine is usually a product of an inductor vibrating at frequency, but since there is no inductor used in this LED driver, I'm at a loss to explain it. Decreasing the PWM frequency down below ~244Hz lessens the noise, but also introduces flickering at low PWM values. Increasing the PWM frequency seems to affect how dim the LED can go before turning off. The average person should not notice the whine beyond about half a meter, and an enclosure should mask it completely.

While testing the PWM dimming, I noticed that there is quite a significant difference between off and a PWM value of 1. At this value, there should be an average of ~0.1456mA = (1/4095)*600mA. Yet, the LEDs show that there is at least a few milliamps through the LED. Substituting a 3mm LED shows a very smooth transition between off and 1, so I think it is my LED that is at fault.

Remember: always connect grounds together. Each device - Arduino, LED driver, etc - may have a different ground potential, and connecting them together will create a common ground. Not doing so may cause damage.

Step 7: Conclusion

I have embedded a short video of the CAT4101 driving two 3W LEDs at ~500mA. A TLC5940, controlled by an Arduino Uno, provides 12-bit PWM dimming.

I hope this instructable was informative! Please remember that I am not an electrical engineer, and have only a little bit of formal education.

Please feel free to leave comments, suggestions, corrections, criticisms and questions! Not only will other people benefit, but I may learn something new as well!

Comments

author
hirani89 (author)2017-02-27

I am using WS2811 to drive 10W RGBs. but WS2811 has current sinking PWM. How did you manage to convert current sink to source. I did a simulation with 2N3906 using http://www.falstad.com/circuit/circuitjs.html and http://everycircuit.com/app as well but with no luck. Can you please help me.

author
bigwcharly (author)2014-10-15

Hi Hengy, thanks a lot for this very interesting instructable!! I'm planning to use the CAT4101 for driving RGB leds, you helped me on track :)

Just for reference, which power LED's do you use? As you say that they didn't behave as expected at a PWM value of 1, did you find others that work better? And can you recommend some good RGB power LED's?

Many thanks!!

author
Hengy (author)bigwcharly2014-10-15

After doing a bit of research, I now believe that it is indeed the transistors that are at fault for the poor transition from a PWM value of 1 to off. The reason is the transistor's switching characteristics. Storage time, delay, and rise/fall times could all play a part. I have not tried it myself, but using a Baker Clamp, or replacing the 2n3906s with transistors that have shorter switching times may help.

Hengy

author
Hengy (author)bigwcharly2014-10-15

Hi bigwcharly,

I'm glad my Instructable helped you!

My LEDs that I used for the video were 3W LEDs with "star" heatsinks bought from Ebay. They were quoted as requiring 3.4-3.8V, with a max. current of 700mA. (0.7A * 3.8 = 2.66W) The math obviously doesn't add up, and I don't know what I was expecting when I bought them. They ended up needing almost 5V each! I later purchased some 3W "COB" LEDs, with 9-11V forward voltage, and 300mA max. current. These turned out to be much closer to spec when tested with my drivers. My advice is to buy some LEDs that other people have verified as good, or from a reputable retailer.

As for the PWM problem, I think it has to do with the transistors. The TLC5940 may output a clean, 1MHz PWM signal at the lowest setting, but factors such as stray capacitance, transistor switching times, or even the CAT4101 itself may change the signal, and result in a noticeable difference between completely off and a PWM value of 1. I did notice, however, that the "COB" LEDs I bought, which take less current, have a much better transition from 1 to off.

Hope this helps.

Hengy

author
craftclarity (author)2014-06-05

Sometimes it helps to see pictures of how the soldering went...schematics are useful but it's nice to fill in the blanks a little with a good image or two. Nice 'ible though!

About This Instructable

10,785views

37favorites

More by Hengy:Easy CAT4101 LED Driver
Add instructable to: