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.
PIC is a no-go for me. I will not buy closed-source programmers (pickit). I’ll stick with my good old ATmega 8.
wasn’t one of the pic kit open source? I don’t remember, I haven’t used them in a long time.
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.
Good Luck with PicKit3 and Linux debugging :-/
I have PicKit3 and the only way for debugging PIC32 is via MPLAB X Java bloatware.
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).
The PIC32 programming specification can be found on the Microchip site.
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.
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.
Is every program now called a “sketch” ?
I think it should be okay as chipKIT is also an Arduino type platform with a similar programming IDE and style.
Ah. Is that why it takes 15 lines of code to format a string, that could be done with a single sprintf() ?
Gcc has sprintf, so thats a lack of knowledge from the part of the OP.
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…
There are an awful lot of meters that show up here with a strange dearth of mentions of “calibration”…
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.
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. :-)
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%.
And a “Small measurement variation (+/- 20%)”. Call me a perfectionist but a 40% variation is not small.