CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

L14F2 light detector

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
adia
Guest







L14F2 light detector
PostPosted: Tue May 19, 2009 8:38 pm     Reply with quote

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.Sad

Thank you.
ddorling



Joined: 24 Dec 2007
Posts: 13

View user's profile Send private message Send e-mail

maybe this will help
PostPosted: Tue May 19, 2009 9:18 pm     Reply with quote

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







PostPosted: Tue May 19, 2009 10:53 pm     Reply with quote

ok, Thank you very much.
I got the idea. Very Happy
adia
Guest







PostPosted: Wed May 20, 2009 2:16 am     Reply with quote

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







PostPosted: Wed May 20, 2009 9:00 am     Reply with quote

A resistor.....

Best Wishes
ddorling



Joined: 24 Dec 2007
Posts: 13

View user's profile Send private message Send e-mail

metric/calibration
PostPosted: Thu May 21, 2009 2:42 am     Reply with quote

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







PostPosted: Thu May 21, 2009 10:34 pm     Reply with quote

Thank you for your explanation. I'm clear now. Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group