Digital Colour Light Sensor

With the earlier efforts in halving the size of Lightlog also came a need to change the components used for sampling light. The previous designs using four light dependent resistors (LDRs) behind coloured filters, one for each red, green, blue, and a clear filter for white, takes up a large amount of the board space. The LDRs tolerances are also usually not all that close, perhaps up to 10% variation, so they each required calibration in software at testing at different levels of light intensity. Quite a manually intensive process when trying to build more than a handful of devices!

The solution to all this is to switch to an integrated digital light sensor that combines all colour sensors into a single chip, pre-calibrated, and in a tiny surface mounted package. After much searching and testing, the TAOS TCS34725FN seemed to be the best choice. It has a wide light dynamic range, and uses a built in infra-red (IR) filter to block IR from the sensors – preventing erroneous colour signals in some lighting situations as sunlight has lots of IR component. The sensor also connects directly to the existing I2C interface used by the 64Kbyte EEPROM memory already in Lightlog, this has the pleasant side effect of freeing up four pins on the micro-controller that can now be used for extra features.

The new sensor does need a fair amount of extra code to configure correctly, take readings, and then process the data, but it does give more consistent data that’s, at lest theoretically, much finer in resolution.

Halving the Size

Checking component layout

It’s finally time to take the plunge and make Lightlog smaller and more robust. Moving away from the hand soldered, through-hole prototype boards, and to a custom multi-layer board using smaller surface mounted technology (SMT). Using specialist PCB layout tools such as Eagle CAD, and the Open Source KiCad, the prototype circuit needs to be re-created ready for a commercial board manufacturer to fabricate.

LightLog SMD v0.6B

Commercial facilities requite a special set of custom files called Gerber files to produce boards with multiple circuit layers, vias (connections through the board), masking of areas from solder, front and back silk screen printing, drill holes, and the final board cutout shape. The image to the right shows the new board design, a full set of Gerber files can be found over on the Lightlog git repository.

The earlier electronics fitted within a box of 29mm x 29mm x 17mm, after these changes the size is down to 28mm x 26mm x 7.5mm. This might not seem like a huge saving, but by more than halving the thickness Lightlog is more discrete to wear and allows a wider variety of potential enclosure designs.

There are a number of part changes with the new board moving to the smaller SMT parts, but one more significant change is the new digital light sensor chip that I’ll try to cover in a future post.

Time to order a batch of these boards of testing!