CAT3626 RGB LED Driver + Qt Embedded 4.6 on the Mini2440

The CAT3626 is a nice little I2C device from ON Semiconductor. It comes in a 14 pin TQFN package which is probably the most difficult thing i’ve ever soldered! Each pad is separated from it’s neighbour by about 100 micrometers! To make matters even more difficult there’s a ground pad right in the middle for sinking heat away. Really you should get some sort of breakout board or reflow it but that would be boring! Here’s a picture of the device before soldering:

…and here’s the finished product! The LED is 10mm diffuse with a common anode and a maximum current rating of 20mA per channel.  As soon as i’d soldered the wires to the CAT3626 i glued it to the board with epoxy, threaded the wires through the holes and then glued those down with more epoxy. After that i realised i’d forgotten where pin 1 had gone so i had to scrape the glue off the top of the chip!

The wire coming through the hole in the middle of this picture is soldered to the CAT3626 and acts as a crude heat sink. In practice it seems to work well enough although i probably should have used copper. I pulled the ceramics from an old projector i had lying around. Not the neatest job but it works fine!

After I’d built that i tested it quickly using I2C tools and then wrote a kernel driver.  The CAT3626 allows a maximum of 32mA per channel regulated in steps of 0.5mA. Unfortunately because my LED can take a maximum of 20mA per channel i can only generate ~64,000 colours. To make matters worse the light intensity is not in general a linear function of the input current so the achievable fade sequences are not as nice as those done with PWM but they still look pretty good. Here’s a video!

httpv://www.youtube.com/watch?v=RfRiZrhLVVM

Update: The kernel driver for the CAT3626 is now available for free on github!

10 Replies to “CAT3626 RGB LED Driver + Qt Embedded 4.6 on the Mini2440”

  1. Thanks Jack 🙂 I would start by getting OpenEmbedded working. Set yourself the target of getting the Qt examples cross compiled because you’ll need Qt to make the control interface (unless of course you want to do it some other way!).

    There are so many ways to control the LED. This one obviously relies on the CAT3626 which you might find hard to get hold of. I would start by playing with the PWM channels on the mini2440, from memory i think there are only 2 free and when you understand that move onto something else.

    If you solely want to control an RGB LED i’d look at a microcontroller like the ATtiny. You could start from there and if you really need a touchscreen hook it up via the TWI inteface.

  2. Thanks Doug!
    I’ve created interface and run on board with simple example(calculatorform,hello…).However I don’t know how to link between interface and code C to control led.Can u show me how to do it?
    Thanks in advance!

  3. For the cat3626 i wrote a character driver to control the LED current etc. I simply echoed the required levels to the device. For example my Qt interface used the following for the red brightness:

    QFile file(“/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0066/red_level”);
    if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
    return;
    QTextStream out(&file);
    out << red_current << "n"; Obviously this will depend on the driver you should have written!

  4. Hi,
    I have to connect the mini2440 with a PIC via i2c bus, and I’ve to write the driver.
    Could you send me by email (bonetti.luca.88@gmail.com) your driver, just as a starting point.
    Thanks
    bone88

  5. @Diego
    Hi Diego, i used Openembedded for building the operating system (see earlier posts) which is Angstrom, and Qt for the GUI.

    @bone88
    Hi Bone, i modelled the driver on one from hwmon, the ds1621 because i had the chip. I will email you the driver in a second. It will be hosted for all sooner or later. If anyone else wants it just ask. Cheers, Doug

  6. Hi,

    thank you for sharing your work on the mini2440.

    I’m astonished by you soldering skills: would you be so kind
    to share with us the techniques you use to weld SMD
    components that small?

    A couple of questions just come to my mind:
    which solder tips do you use (shape and thickness)?
    which wires?

    And, of course, you should post videos on youtube!

  7. Hi Francesco, sorry for the slow reply and thanks for the comments! I used standard stuff for the soldering. It requires patience, but i’ve soldered quite a few chips this way with good results.

    As for equipment I’ve got a Xytronic LF-1000 iron with the standard 2-3mm wide chisel style tip. It would be nice to have something a bit smaller, but i can get away with using the corner on this. I’ve used some standard enamelled wire from Maplin. I don’t remember the thickness, but it’s pretty thin, probably about 0.2mm diameter. If it’s too thick you can easily pull pads off the components which happened to me the first time i tried. Finally i think this is with leaded solder, although i have used unleaded as well (not so easy).

    I start by stripping the end of the wire with a knife. I then lightly tin the wire and the pad, clean the iron tip and press them together. A gentle tug ensures it’s stuck properly. After doing all the wires i check continuity between all the pads. Normally there aren’t any problems, but sometimes you’ll need to touch things up a bit. Finally i thread the wires into the veroboard, epoxy the chip in place to protect the wires, crank the iron up to about 330 and solder the other ends to the board. With the iron set a bit higher you can normally get away without stripping the enamel off. If everythings fine i’ll then use a bit more epoxy to protect it.

    I’ll put a video up next time! My personal record is the Infineon TVS diode, although for this i did have to use a very fine pointed tip. Here’s a picture of it next to an ant!

    http://de.sitestat.com/infineon/infineon/s?infineon.media.press.Image.press_photo.TVS_diode_ant.jpg&ns_type=clickin&ns_url=http://www.infineon.com/export/sites/default/media/press/Image/press_photo/TVS_diode_ant.jpg

Leave a Reply

Your email address will not be published. Required fields are marked *