We do not know the application it is to be used in, also this level of detection would affect the response at say dusk and dawn and cloudy days etc. but yes if hes ok with some false triggers (ie headlights) or no triggers then dialing the threshold is pretty straight forward.( I think my 1st post was toward this manner)
-Pb
We dont know if that is the case, he gave an example of of automatic car lights,
keyword being like
he simply gave that as a known case that uses daylight detection.
Ok if you are trying to make automatic headlights, why do you care if you are sensing daylight vs artificial? shouldnt you just be sensing the lack of light? then you set the threshold of a photodiode to be high, over sample it so say the sum of the last 50 results all show a level above the threshold, and turn lights off to reduce chances of artificial light source from triggering. place the diode at the top of the console so it wouldnt be hit by oncoming traffic headlights. (remember when driving its better to have false alarms to trigger headlights on, false offs could be... deadly).
then you set the threshold of a photodiode to be high, over sample it so say the sum of the last 50 results all show a level above the threshold, and turn lights off to reduce chances of artificial light source from triggering.
Characteristics of the sensor should not be symmetrical. He must work quickly with the loss of light (for example - poorly lit tunnel) and slowly when the light appears.
Characteristics of the sensor should not be symmetrical. He must work quickly with the loss of light (for example - poorly lit tunnel) and slowly when the light appears.
Agreed, I mentioned an arbitrary number of 50 samples to turn off, and meant to imply a smaller number to turn on, not 1 because you dont want a road sign block the sensor when driving and turn the lights on, but maybe 5 samples or something.
- - - Updated - - -
The first recommendation I gave you is an example of the circuit. photo diode , comparator, and a means to look at some form of running average( a PIC storing the last 50 values as a sum or average would work, or a switch cap integrator would be an analog version.
The first recommendation I gave you is an example of the circuit. photo diode , comparator, and a means to look at some form of running average( a PIC storing the last 50 values as a sum or average would work, or a switch cap integrator would be an analog version.
I'm not sure that the author of the topic enough knowledge to implement the scheme for the PIC. In the analog version, I would suggest two consecutive integrator with a time 0.5s and 30s, two comparators and a state machine for four states. In addition, the temperature drift compensation scheme photodiode because the working temperature range of -20 / +40 ° C.