Lightlog with Bluetooth LE

Lightlog with BLE

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!

Lightlog with BLE

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.

Lightlog with BLE

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.

Lightlog with BLE

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).

DSC_8199

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!