Picture of Highly sensitive Arduino light sensor
In the Bioluminescence Community Project at BioCurious, we've been working with a number of bioluminescent bacteria and algae. We'd love to be able to measure accurately how much light these organisms produce. Unfortunately, the amount of light they produce is quite faint, and although the human eye can easily detect them after adapting to the dark, photographing them in action takes very long exposures (check out our Bioluminescent Hourglass instructable!), and/or professional camera equipment.

Needless to say, quantifying the light output of these faintly glowing moicroorganisms in a small test tube takes some specialized equipment...

What we ended up with is an Arduino with a highly sensitive light sensor inside a copper pipe (to isolate the sample from outside light contamination) writing results to an SD card.  We also added an LCD so that we could see results displayed real time.

Step 1: Materials

Total cost: ~$65, not including shipping costs ($75 for version with LCD display).
Most of this is the Arduino Uno ($30) + data logging shield ($20). Everything else is dirt cheap.

At the heart of our light meter is the TSL237S-LF, a highly sensitive Light-to-Frequency converter. This isn't your ordinary photoresistor or photodiode, mind you. Those devices measure light intensity based on voltage or current changes, which means that the smallest light intensity is determined by the smallest voltages or currents you are able to measure. A light-to-frequency converter like the TSL237, on the other hand, converts light intensity into a series of square-wave pulses. The lower the light, the slower the pulses. That means you can trivially increase the sensitivity by increasing the amount of time across which you count the pulses. Which means the lowest intensity is determined by the on-chip noise inside the sensor, resulting in occasional spurious pulses even without light coming in.

This particular sensor has a typical dark frequency of 0.1 Hz - one pulse every 10 seconds (and in practice, we've seen far fewer than that). With an irradiance responsivity of 2.3 kHz / (μW/cm2), that would correspond to 0.000043 μW/cm2. Converting from irradiance to illuminance (Lux) gets complicated because the latter depends on human brightness perception, but that would work out to no more than 0.0003 Lux. In comparison, other commercial light sensors typically bottom out around 0.1-0.2 Lux. If you want to go any more sensitive, you'd have to go to a photomultiplier tube that can literally count individual photons, but that puts you in a very different price range...

To illustrate how sensitive this sensor really is, as I was hooking up the sensor to the arduino, I was covering the sensor with my hand to see the signal drop, and I noticed that it didn't drop to zero - not even close. So I covered the sensor with my second hand... and it still didn't drop to zero! And of course, when we put the sensor inside the copper tube, it *does* go to zero. That means this sensor can see through both my hands - maybe 1.5-2 inch of meat and bones. Not bad for a $3.33 sensor!
wyldbyl23 days ago


I subsequently built the LCD version and it worked OK except that the CSV files logged had no header written to them. I found out that you need to open the log file, write to the log file, and then close the log file to have the header properly written to it.

I changed your code in this section:

#endif // attempt to write out the header to the file

To this:

logFile= SD.open(fileName, FILE_WRITE);
#endif // attempt to write out the header to the file

The changed code will now write the header to the CSV file.

I also had to use older Arduino IDE version 1.0.5-r2 to compile the sketch.

I had compiling errors when I used the latest Arduino IDE version 1.6.

wyldbyl28 days ago


I just finished building this
project and I am hoping you can help me with a problem I am having. The
CSV logger files that it is generating have no data in them. I built the
version with no LCD display. The data logging shield was activated
properly. The light sensor is also working OK because I just just
checked the output (Arduino digital pin2) on my oscilloscope and it is
putting out a nice 5v square wave, the frequency of which, increases
with increased light input. No matter what the light intensity is I just
keep getting empty CSV logger files with no data in them.

initially had trouble getting your ino file to compile with the latest
version of Arduino IDE ( ver 1.60 ) . I kept getting errors that said it
could not find some libraries.

I uninstalled v1.6 and installed
earlier version v1.0.5 r2 and it compiled and uploaded to the Arduino
Uno just fine. I am planning to measure light levels of
Electroluminescent light panels that I am building from scratch by
making my own EL inks. I 3D printed an enclosure for the sensor that I
can place on top of my EL panels and measure the light intensities. I am
real a newbie at using Arduino microprocessors and hope you can help
me. Thanks.

EhrenW5 months ago

This project looks awesome. In step 4 you say, "Then wire up the stereo jack so GND and Vdd on the sensor are connected
to GND and 5V on the Arduino, and the OUT pin from the sensor goes to
Digital pin 2, where it can trigger interrupts on the Arduino." I didn't see a stereo jack listed in the materials. Could you point me to an appropriate part to order? Thanks for instruction, I'm excited to get started.

je-jerem9 months ago


Many thanks for this Instructable which was really Instructable! However, I still have a little problem and I wonder if you could help me. I did everything and everything works well but my LCD displays weird characters (see picture) and I cannot fix the problem. I dont know why. My wirings are good and if I try with an example from LCD libraries (Arduino) it works well.. I thought it was a baud rate problem but actually I am not really sure.. My Arduino is a UNO ATMEGA328P 16MHz and my LCD reference is NHD‐0216K1Z‐NSPG‐FBW‐L.. I, ever, you could help me I would be really pleased.

Many thanks anyways and thanks again for this instructable.

great stuff!