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!

Watch this video on YouTube.

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

Chameleon 135 for the Mini2440

Thanks to www.andahammer.com both Will and I now have the Chameleon 135 enclosure for the Mini2440.  I’ve been working on a li-ion charger and once that’s finished we should be ready for some field testing. It takes a little while to get the holes drilled in the right place but once it’s screwed together the case is extremely sturdy. There’s loads of room inside for additional wiring 🙂

You can get the Chameleon from www.andahammer.com.

Fix the lacking vosao database indexes from a vanilla 0.8 install

Certain database queries made using the Google app engine (GAE) require a set indexes to be created before they can be executed successfully. There appears to be a bug in the vanilla installation of vosao where the datastore indexes for the PageEntity are not automatically created.

Screen shot of database indexes in the GAE control panel

A symptom to look out for is the archive page not returning any results when you click on a month in which you have blog entries. As there is no indication from the CMS itself, this can be rather difficult to diagnose.

However, if you look deeper you will likely see an array of warning messages in the log section of the GAE dashboard.

The messages will likely contain something cryptic like this:

AbstractService BeanImpl - -no matching index found..

Along with info about the offending entry:

    <datastore-index kind="PageEntity" ancestor="false" source="manual">

        <property name="parentUrl" direction="asc"/>

        <property name="publishDate" direction="asc"/>

    </datastore-index>

</datastore-indexes>

Fortunately the solution is a simple one.

If you uploaded vosao to the app engine yourself, Simply create a file called datastore-indexes.xml in the WEB-INF directory of the extracted vosao archive archive, and paste in the following text:

<?xml version="1.0" encoding="utf-8"?>

<datastore-indexes

  autoGenerate="true">

    <datastore-index kind="PageEntity" ancestor="false" source="manual">

        <property name="parentUrl" direction="asc"/>

        <property name="publishDate" direction="asc"/>

    </datastore-index>

</datastore-indexes>

The path to this file should be something like the following:

<path to extracted vosaocms-0.8.war>/WEB-INF/datastore-indexes.xml

Rerun the appcfg.sh in your app engine bin directory:

<path to app engine sdk>/bin/appcfg.sh update <path to extracted vosaocms-0.8.war>

Next in the configuration section of the CMS control panel, browse to the “Site Configuration” tab and click on “Export” . Perform a full export, and save the resulting file to some where safe.

After the exporting has completed, making sure you are still on the same page, click cache reset.

Wait for this to complete before finally pressing “Create Search Index”.

If you browse back to the database indexes section in your GAE dashboard , you should find a page similar to this:

Screen shot of database indexes in the GAE control panel

Please note there may be some delay before your PageEntity is ready to serve.

Check that everything is ok by visiting the archives page, or using a statement such as:

${service.findPageChildrenMonth("/blog", $year, $yearMonth)})

with the velocity engine. Here, $year and $yearMonth are a year and month or one of your blog entries. If all goes well this should return non-empty list ( an empty list will display [ ] ).

Useful Information:

Google indexes FAQ

Google help page on database indexes with an example datastore-indexes.xml

Vosao setup help page