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.

Gastrolab RGB Cocktail Party

RGB Cocktail Party
As part of the Edinburgh International Science Festival, LateLab hosted a red, green, blue colour themed cocktail party at the University of Edinburgh’s School of Informatics. I was invited to present the opening talk on the effects of light on mood and wellbeing and introduce Lightlog project while the audience were being served a carefully curated range of colour themed cocktails and nibbles to match the talks. If you attended I hope you had a great evening and perhaps even enjoyed a little science!

Thanks to Emilie Baltz, Amanda McDonald, and Mark Daniels for all the event planning and organisation. As usual, Chris Scott took some lovely shots of the evening.

My slides are available here: Light Log RGB Cocktail event

Measuring Colour

Colour temperature vs. tint

With seasonal affective disorder and winder blues, light lux (the total light energy in the human visible spectrum), is the main component needed to be measured and tracked over time. However, recording the light colour components also has important benefits for analysis. First, it allows improved automatic tagging for light environment types, where the colour temperature and colour tint allow a better characterisation of the kind of light you’re being exposed to (e.g. fluorescent office lighting vs. natural outdoor light, or bright but overcast days vs. clear blue sky days). This extra information can be used to generate high level, dashboard like views of each day, week, month and year – do you know how many hours of direct sunshine you had this week? The second use of colour data is in measuring the amount of the shorter wavelength (blue) light you are exposed to. Studies suggest blue light is more effective at triggering cells in your eye’s retina responsible for maintaining your circadian rhythm – stimulating serotonin production and inhibiting melatonin, keeping you alert and clear during waking hours. Avoiding blue wavelengths for a few hours before you try and sleep allows melatonin levels to naturally rise, helping you have restful, refreshing sleep.

The Colour Magenta

Colour WheelThe perception of colour is a really tricky topic once you start to look at it closely. While I was working on artwork for Light Log visualisations, trying to represent light data as a full colour spectrum, the more I started to notice that many illustrations of rainbows, spectrum and colour palettes seemed to have something unusual going on…

Of all the wonderful colours we experience, for most of us, our eyes only have colour sensitive cells that respond to three different areas of the electromagnetic spectrum. Blue peaks at 420 nano meters, green at 530 nano meters, and red at 560 nano meters. From these three colour cell types our brain interpolates all the other colours we perceive. Cyan for example is a pure wavelength of light in the electromagnetic spectrum, but our brain will also interpolate to cyan if our eyes collect a mix of both blue and green (on either side of cyan) wavelength light – if you’re looking at cyan on your screen just now, your brain is faking it out of blue and green pixels :) The most curious colour though is magenta, it’s purely a figment of our minds, no where to be found on the electromagnetic spectrum it exists only when our eyes see a mix of red and blue light. What’s strange is that the brain doesn’t interpolate between red and blue (which would be a green on the spectrum), but maps it to a totally new colour experience.

Who would have thought that the colour magenta only exists in our imaginations!

Visible Colour Spectrum