View previous topic :: View next topic |
Author |
Message |
adia Guest
|
L14F2 light detector |
Posted: Tue May 19, 2009 8:38 pm |
|
|
Hi All,
I am using pic 16F886 and light detector L14F2 which is connected with pin A1. What I'm gonna to do is measure the light brightness. But I don't have any idea how to do that.
Is there any specific equation to use or just read the ADC value?
If someone can be so kind and experienced, please help me.
Thank you. |
|
|
ddorling
Joined: 24 Dec 2007 Posts: 13
|
maybe this will help |
Posted: Tue May 19, 2009 9:18 pm |
|
|
You'll have to write conversion functions.
Convert adc value 0-255, if using 8bit, to volts.
Figure out volts per step determined by the adc reference value and multiply by adc value.
Then convert that to the light metric you need to use.
The data sheet of the sensor will give you the volt/light metric relationship.
Either figure out a function for the relationship or construct a lookup table.
Good luck |
|
|
adia Guest
|
|
Posted: Tue May 19, 2009 10:53 pm |
|
|
ok, Thank you very much.
I got the idea. |
|
|
adia Guest
|
|
Posted: Wed May 20, 2009 2:16 am |
|
|
I have looked at the L14F2 data sheet, but all the relationships has shown in light current whereas the adc value is converted to voltage. So how to compare the relationship? |
|
|
Ttelmah Guest
|
|
Posted: Wed May 20, 2009 9:00 am |
|
|
A resistor.....
Best Wishes |
|
|
ddorling
Joined: 24 Dec 2007 Posts: 13
|
metric/calibration |
Posted: Thu May 21, 2009 2:42 am |
|
|
The current/light relationship may not be useful to you. Device operating limits so it won't fry. You may want to calibrate a scale yourself. This of course depends upon what the sensor is measuring. For instance the device your using might do well for detecting lightning strikes, measuring and logging them. I'm not sure about the spectral matchup between lightning light and your sensor. Maybe you're using the sensor to measure ambient light. What kind of light are you measuring and is the matchup of the spectral response of the sensor sufficient. Your sensor showed an led GaS as the test input source. And the specs show it's spectral response. To get a feel for how your sensor behaves try applying the light source you are detecting and vary the intensity of the electro magnetic radiation your using. Then monitor the voltage output with a voltmeter or a scope, just for starters. Once you've built a circuit that provides a workable voltage/intensity curve then you can calibrate it using a commercial meter (maybe a light meter) taking readings to correlate your voltage to the light metric used by the meter you need. lumens or some other measure. You could also correlate it to a subjective measure of your own. |
|
|
adia Guest
|
|
Posted: Thu May 21, 2009 10:34 pm |
|
|
Thank you for your explanation. I'm clear now. |
|
|
|