A gorgeous batch of one hundred boards, fresh from fabrication! Unfortunately, pretty as they all are, they’re not ready for real-world use :( This batch includes a design oversight on my behalf that prevents them from fully powering down the Bluetooth device while not in use, this significantly eats into the target minimum battery life (usually over four months) leaving between one and three weeks before the battery is drained. Ouch! Luckily I can still build and use a number of these for testing the planned board fix, and move forward with the Bluetooth software implementation and testing.
With the latest circular Lightlog board fully populated with components you can see almost all parts are now on the top side of the board, making it easier to solder them in one go using solder paste (applied using a solder mask stencil). The solder is then heated using a hot air gun from above, or a hot plate from below. Placing components on the solder paste is now the slowest manual step, taking perhaps 10 to 15min, it’s a little fiddly if you don’t have patience and a steady, tweezer hand!
In the image above, the chip at the top is the 64Kbytes of EEPROM memory. On the left of the board is the PICAXE-14M2 micro-controller. The centre and right of the board hold the HM-11 Bluetooth LE 4.0 module (the antenna is on the right edge). Along bottom edge are five white LEDs for indicating the current light goal and ambient brightness. Near the bottom, just above the central LED, is the TAOS TCS34725FN digital colour sensor used for tracking the ambient light and colour conditions.
The components on the back of the board need to be soldered by hand, after the components on the front are soldered, but as there are only two large components it is a quick step to complete. In the image above, the 3V CR2032 battery holder is in the centre, and tactile press switch at the bottom. Pressing and holding the switch down for 2 seconds triggers the LEDs to display your current daily light goal achieved so far, and will attempt to synchronise data via Bluetooth if you’ve linked it to your smart phone, tablet, or computer – the code for this is still a little rough still, but will go up into the git repository (again under an Open Source license as per other parts of this project) once the more obvious kinks are ironed out.
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…
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!
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.
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!