A Simple Light Logger

Basic components

So, what do you actually need to make a working light log? The simplest set of components would start with a sensor, something like a light dependent resistor (LDR) changes resistance as the amount of light shining on it varies. A photo transistor is another option as these generate a small voltage you can measure, the brighter the light, the higher the voltage. You then need a micro-controller to read your choice of sensor, perform some simple processing on the data and record it to memory, something like a PICAXE-08M2 is enough to get started. Low cost micro-controllers often only have a few kilobytes of internal memory at best, only good for keeping a day or two worth of logged data. Adding  extra memory storage is a reasonable decision – for prototyping, I’ve been using a 24LC512 64K EPROM (a type of memory that keeps its content even if power is lost). 64K is easily enough for a month or two of samples every 5 minutes. The circuit then needs an external interface to allow the data to be easily synchronised with a computer. This step is more tricky to do at a reasonable price, USB is one option but requires using a more expensive micro-controller supporting the USB standard; the same is true if you want to use the Bluetooth wireless standard, wireless can also be a drain on batteries unless you use the latest Bluetooth standard, BLE (which unfortunately is only compatible with newer phones and tablets). In the Light Log prototypes so far I’ve opted for a simple serial interface, easy to setup and use for testing – though it does require a somewhat more expensive serial to USB cable to connect to a laptop. Finally your circuit need a power source. The first prototypes used two AA batteries for a 3V supply, but this isn’t to practical if you want to clip them to your t-shirt :) Luckily you can get 3V coin cell batteries, about the size of a pound coin, much easier to attach. Coin cells store a lot less energy verses two AA batteries, but for a low power circuit like this, it should at least be good for several months use.

Breadboard prototype

Combined with a few extra resistors (10K, 4.7K and 22K ohm) these parts are enough to start logging basic light brightness data. The sensor will need calibration if you want to be able to indicate lux level values (a standard unit for visible illumination), and if you want to record colour temperature you’ll need a total of three sensors – one each for red, green, and blue.

Welcome!

Life Designs at InspaceLight Log is a project I’m developing supported by New Media Scotland‘s Alt-w Fund with investment from the Scottish Government. The goal is to design, prototype and build small, low cost, ambient light tracking badges that can easily be worn to record daily light level exposure to make sure you’re getting enough of the bright, shiny, out doors stuff during the day, and not too much of the artificial shiny stuff just before trying to get that much deserved sleep. Great if you are particularly sensitive to seasonal changes in light levels (such as Seasonal Affective Disorder or Winter Blues), or just want to make sure you’re making the best of your body’s circadian rhythm. The Light Log will synchronise to a desktop/mobile/web app so you can view and track your light exposure from week to week, season to season, in much the same way commercial sports and activity trackers allow you monitor your steps and exercise levels.

First prototype, chocolate wrappers required!

All of the projects source code, hardware schematics, layouts, and test data will be published under Open licenses, so if you’re a creator, maker or interested in getting involved from anything from building your own, designing a case enclosure, or improving the software, you can! I’ll be running several hands-on workshops where you can build and take away your own prototype Light Logger. If you’re in the Edinburgh area, fancy tinkering with some simple electronic wearable tech, and are curious how light and colour might be effecting your mood, get in contact!

My skills are much more on the software, visualisation, and electronics side of things, so if you are – or you know – someone who likes to experiment with jewellery design or wearable accessories it would be great to get your input. There will be plenty of laser cutting and 3D printing goodness for customised enclosures, but there are many more hand craft techniques that I’m sue will work well and allow for personalisation.

Right now, Light Log is experimental code and prototype hardware as you can see from the very first hack built during the Life Designs | Project Ginsberg event at Inspace in April. Yes the chocolates were most definitely essential to the prototype – it was the best hack I could find to make it record in colour…