Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is the unit of Light dependent resistor (LDR)?

Status
Not open for further replies.

sunnystar

Junior Member level 3
Junior Member level 3
Joined
Aug 3, 2014
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
175
my 3 questions:
1)what is the unit of Light dependent resistor (LDR)? lux or resistance??
2)somebody have set in c code that if its value exceeds 50 than the buzzer turns on, wot is that 50? it's resistance or light or wot??
the code lines are:
Code:
avg.smoke_level=(sum.smoke_level/10)/10.24;
if(avg.smoke_level<=50 )
{
 output_low(PIN_D2);
}
else
{
output_high(PIN_D2);
}
   delay_ms(500);
   }
3) dividing by ten bcoz 10 samples were taken, but wot's the reason of dividing by 10.24??
 
Last edited by a moderator:

my 3 questions:
1)what is the unit of Light dependent resistor (LDR)? lux or resistance??
2)somebody have set in c code that if its value exceeds 50 than the buzzer turns on, wot is that 50? it's resistance or light or wot??
the code lines are:
Code:
avg.smoke_level=(sum.smoke_level/10)/10.24;
if(avg.smoke_level<=50 )
{
 output_low(PIN_D2);
}
else
{
output_high(PIN_D2);
}
   delay_ms(500);
   }
3) dividing by ten bcoz 10 samples were taken, but wot's the reason of dividing by 10.24??
are you sure that you are talking about LDR ?
because if i see smoke level, i have the feeling that this is a smoke detector,
the unit of LDR is OHM, because its a resistance, and its value vary with the QTY of light it receive,
 

hello


LDR Light dependant resistor
the value depend of the light (Lux)
could be maybe > 100K ohms in the dark and <10K in the light day..
Used in voltage divider..
ex: +5V --- R=100K ---- junction -----LDR ---- 0V
ADC input link to the junction point ...
so you get a few voltage in the dark (so few points of ADC measure)
and maximum voltage in light (so tend to 1024 point of ADC measure)

the raw measure seem to be the result of ADC conversion 10 bits..

ADC 10 bits => 1024 points..
if the mesure is 1024 (maximum scale) divide by 10.24 => 100 => 100% full scale
so if the threshold is 50 => 50%


nota: be carefull when using floating point values , mixed with integer ..problemo..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top