Measuring Light With ChipKIT

light meter showing LUX value

How does one go about measuring the amount of light in a given area? With a Light Meter of course! Maintaining proper lighting levels can be very important in places like schools, hospitals and even your own workbench.

[Raj] over at Embedded Labs has put together an excellent tutorial on how to construct your very own light meter based upon the chipKIT platform. The chipKIT Uno32 is similar to Arduino, but boasts a much more powerful PIC32MX320F128 microcontroller.  We’ve seen projects that feature the chipKIT Uno (pdf warning) here before. From playing pong to hosting several temperature sensors, it’s certainly a versatile platform.

The light meter uses an I/O shield and communicates to a BH1750FVI digital light sensor via I2C. The firmware divides the raw data coming off the sensor by a constant, and displays the light intensity data on an OLED display in Lux, foot-candles, and Watts/m^2 units. Be sure to check out the tutorial for full schematics and source.

Comments

  1. jioaeg says:

    PIC is a no-go for me. I will not buy closed-source programmers (pickit). I’ll stick with my good old ATmega 8.

    • Bogdan says:

      wasn’t one of the pic kit open source? I don’t remember, I haven’t used them in a long time.

      • jaromirs says:

        You are right, PicKit2 is open sourced. There is also open sourced firmware for PicKit3. Hardware is available in User Guides of both PK2 and PK3.
        For PK2, there is both GUI and command-line open-source PC software from Microchip, or one can also use pic32prog from Serge Vakulenko to program PIC32 devices. Piklab also supports PK2.
        There is a lot of choices.

        • Spock says:

          Good Luck with PicKit3 and Linux debugging :-/
          I have PicKit3 and the only way for debugging PIC32 is via MPLAB X Java bloatware.

          • Trui says:

            I only use the thing for programming a hex file, and then do the rest of the debugging in Linux using printf (and gpio + scope for real time stuff).

    • Trui says:

      The PIC32 programming specification can be found on the Microchip site.

    • NiN says:

      There are cheap PIC-kit clones on the ebay that work with Microchip’s software, and many open-source programmers. You can build your own, schematics are freely available.

      BTW, that 64pin PIC32 is total overkill for this project, cheap 16F628 (2$) could be used.

      • Trui says:

        The only purpose of the project is to play with the chipkit, not to build a cheap and practical light meter. Also, unless you plan to mass market this item, the difference between a $6 PIC32 or a $2 PIC16 isn’t really worth saving.

  2. Trui says:

    Is every program now called a “sketch” ?

  3. Matthias_H says:

    If someone claims they can measure lux (illuminance) and watts-per-square-meter (irradiance) using the same device (one being a photometric, the other a radiometric unit), something must be fishy…

    • jtl says:

      There are an awful lot of meters that show up here with a strange dearth of mentions of “calibration”…

      • Rob says:

        I’ve been wondering about that too… the idea is good, but the parts being used have such a wide error range (and thus a very limited level of accuracy) that it would be hard to get good calibration with any reliable degree of precision.

        • Rob says:

          that said, as a project for sake of a project, it’s a good one. It just needs to be abundantly clear to anyone building it that the results as-is won’t be reliable. Then again, if this starts someone down the path to developing further degrees of reliability by using different parts/methods/etc… then that’s a good thing… It’s a good first step, and we all started somewhere. :-)

    • rj says:

      Digging up the datasheet for the light sensor … it doesn’t mention W/m² anywhere.

      It also claims an error range of -4% to +44%.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,095 other followers