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.

[moved] ldr to lux conversion code in altera

Status
Not open for further replies.

cjcg

Newbie level 3
Joined
Apr 1, 2016
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
33
Hello. I'm an ECE student. Anyone here who knows the LDR to lux conversion code in altera? This for our project. Thankyou

I hope you can help me
 

Thank you. But how about the code in or circuit diagram in quartus?
 

I[lux] = 10000 / (R[kΩ]*10)^(4/3).

Obviously this is wrong. This is not dimensionally correct. Further, various LDR can be of different resistance under the same light.
 

Obviously this is wrong. This is not dimensionally correct. Further, various LDR can be of different resistance under the same light.

Ok, I don't do anything with LDR. I just assumed this was a curve fitting approximation and didn't care about the units because curve-fitting is all about ignoring the absurd units.
 

Assuming a constant slope in double logarithmic R versus illumination plot is just a simplification. In contrast to the 0.75 slope given by vGoodtimes, I see "gamma" numbers of 0.8 to 0.95 for PE/Excelitas photocells.

Real LDR photocells have more or less bent curves in the double logarithmic plot. There's also a large type variation, as mentioned by c_mitra.

ldr.png

Presume this is rather an academic exercise problem than a real instrument design. My general approach would be an empirical calibration table with interpolation. Implement the table RAM/ROM with loadable parameters. Log/antilog with adjustable gamma factor and gain is the other option.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top