Introduction: How to Measure LUX With Arduino

In this tutorial we will use the Adafruit TSL2561 sensor to measure LUX with Arduino.

The TSL2561 luminosity sensor is an advanced digital light sensor, ideal for use in a wide range of light situations. Compared to low cost CdS cells, this sensor is more precise, allowing for exact lux calculations and can be configured for different gain/timing ranges to detect light ranges from up to 0.1 - 40,000+ Lux on the fly.

The best part of this sensor is that it contains both infrared and full spectrum diodes! That means you can separately measure infrared, full-spectrum or human-visible light. Most sensors can only detect one or the other, which does not accurately represent what human eyes see (since we cannot perceive the IR light that is detected by most photo diodes)

So, let's get started!

Step 1: What You Will Need

For this tutorial you will need:

  • Arduino uno
  • Breadboard
  • Adafruit TSL2561 module
  • some breadboard cables
  • and a flashlight

Step 2: Breadboard Circuit Schematic

The connections are pretty easy, see the above image with the breadboard circuit schematic.

Step 3: The Code

Here's the code, embedded using Codebender!

Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board. And that's it, you've programmed your Arduino with this sketch!

Step 4: Serial Monitor- Testing

Press the connect button to start the serial communication.

Step 5: Well Done!

You have successfully completed one more "How to" tutorial and you learned how to use the Adafruit TSL2561 Luminosity sensor with Arduino.

I hope you liked this, let me know in the comments!

Comments

About This Instructable

3,091views

20favorites

License:

Bio: Arduino Tutorials by Codebender.cc Team
More by codebender_cc:How to use a magnetic door switch / sensor with ArduinoHow to Measure LUX With ArduinoHow to Control an RGB LED Strip - Arduino Tutorial
Add instructable to: