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.