Circling the Square

Board with Bluetooth LE 4

With the version of Lightlog supporting Bluetooth LE 4.0 (BLE), I took on the challenge of laying out the board to fit inside a circle. From the very early prototypes I’ve wanted Lightlog to be circular, but at that stage it was just not practical. Fewer sharp corners is always helpful when it is on something you need to wear, the round shape is also amenable to a wider range of enclosure designs.

The circular board ‘almost’ fits within the rectangle of the previous SMT layout size, but it feels noticeably smaller as its area is much less without the corners. Below is an image of the current circular board layout, a full set of Gerber files can be found over on the Lightlog git repository. There are some power management related changes needed for the next board revision – I’ll try to write a separate blog post on this – but this board is getting close…


Adding Bluetooth LE

Bluetooth LE 4.0 module test rig

Bluetooth 4.0 LE (BLE) is a low energy, wireless protocol allowing communicating between devices. It only works well over a short distances, but that’s just great for a wearable device to be able to connect and synchronise with its wearers smart phone, tablet, laptop, or BLE enabled desktop computer (USB to BLE dongles are very cheap, just a few UK pounds).

When Lightlog project was first started BLE technology was too expensive to include, but after 6 months or so, lower cost modules started to appear on the market. Prices have now fallen past the point where it’s cheaper to include BLE than it is to use a USB solution (e.g. a USB cable and USB support circuitry needed on the device). There are some drawbacks with BLE as it complicates the software needed for both the Lightlog firmware, and the client app/application. BLE modules are also more power-hungry than using a physical USB connection, so extra attention is needed to make sure the battery life is not unduly affected.

Below is a close-up of the test setup for the HM-11 Bluetooth 4.0 LE part. The module is designed to be connected to a custom PCB board with surface mount pads, but here you see it manually soldered to individual breakout wires for testing on a breadboard. The connection pads on the module are tricky to solder to, any physical strain on the wires will easily rip a pad off. I managed to rip a pad off the first one I tried to test; not an auspicious start as back then they were about £10 each and I’d only managed to source 5 for early testing (now they are close to £5 each).


If you’re interested in some quick technical details… Apart from the usual power (2.5-3.7V) and ground, you only need two other pins to get it working, transmit and receive (RX and TX). The other two wires in the photo are only for testing and debug; one is a to a pull-up resistor to the reset pin (if you pull the pin down to ground for 100ms you can force a reset); the other connects to a small status LED that indicates if the BLE is in discovery mode (slow blink), or connected (solid on) – very handy while testing!

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!

Six Prototypes

Six Prototypes

It’s been a busy few days building and testing a fresh batch of six, new Light Log prototypes. They are almost all ready to ship out to their new homes, needing only some changes to the 3D printed enclosure (these are a little smaller than the last version), an update to their firmware (improved UI and timing accuracy), and calibration against known light lux sources.

Five will be off to Nigel A. Beacham, whom I met and chatted with at last year’s Northern Lights Conference. He’s a Research Fellow at Aberdeen University setting up a pilot study investigating the effect of light during informal learning periods. The sixth prototype will be winging its way to Talia Radford, a social product designer based in Vienna. She heard my Light Log presentation at the Wearable Futures conference back in December and is looking to include the electronics in her latest wearable project for the Milan Design Week in April.

The electronics are now down to 28mm x 28mm x 14.5mm in size (with a couple of millimetres added once you include the thickness of the 3D printed enclosure), and weigh 11g (14g with the battery). Each device uses two circuit boards stacked one above the other. One holds the micro-controller, memory, sensors for red, green, blue and clear (for low light conditions), with a white LED and tactile button providing a simple user interface for the front face. The second board holds the battery and serial communication components for downloading logged light data to your computer.

If you’d like to see the circuit schematics, component part-list, or perfboard layout (a type of circuit board designed for prototyping circuits), you can find them on the Light Log GitHub repository, along with other documentation. With the small size of these devices it does now need a little patience to build, perhaps an afternoon’s work, with the trickiest part soldering in the link wires.

I’m looking forward to seeing these prototypes fly from the nest later this week!

Six Prototypes