Can someone confirm the math for this simple light sensor circuit?

Thread Starter

Rscott9399

Joined Jan 13, 2017
51
Hello

I have an error somewhere obviously in my elementary setup here.

Picked up one of these today
Just a small photo resistor light sensor

https://osepp.com/electronic-modules/sensor-modules/69-light-sensor-module

Came across a schematic on the Ostepp website for it. Looks like this.

https://osepp.com/downloads/pdf/LIGHTSENSOR.pdf



Simple Voltage divider circuit.
I found the part of the photo resistor and it is a

http://szhaiwang.en.alibaba.com/product/518889404-212333514/5mm_photoresistor_MJ5516_5_10k_OHM.html

Just for the hell of it, i built a circuit simulation in multi sim



The photo Resistor has a range of 5 ohms to 10k ohms

So i wrote a little matlab script to plot the output voyage based on a 5 volt input


V_source = 5;


R1 = 5000;
R2 = 1000;
R3 = linspace(5,10000,500);

R2Combined = zeros(1,500);
Vout = zeros(1,500);

for k = 1:500

R2Combined(k) = (R3(k)*R2)/(R3(k)+R2)
Vout(k) = R2Combined(k)/(R2Combined(k) + R1)*V_source

end

plot(R3,Vout)


Got the plot and confirmed the results with my MultiSim model



Notice at 5V reference with the Photo resistor set to 5k i get about 700mv


With the plot being about 5000 ohms on the photo resistor i also see about 700 mv on my matlab plot



Looks right. and it also confirms with the voltage range I'm seeing on the multisim model

So i take the doodad out of the box and throw 5 volts on it to give it a try.

The output range according to my multimeter
is from about .600 volts to 2.8 give or take a little and depending on what kinda light you have in the room on or off

Can anyone see why multi sim and my math is so far wrong from what the circuit is actually doing?
Cant find any documentations from the manufacture about what it should be outputting

The resolution from the device via the math and multi sim shows very little resolution making it hard to read on a micro controller so i did in fact question it when i saw the results

Can anyone see what i did wrong? Only think i can think of is that schematic is not correct for the part because i hope i can do some voltage divider math at this stage in the game
 
Last edited:

Thread Starter

Rscott9399

Joined Jan 13, 2017
51
Post the resistance of the LDR for the light levels that gave you the 0.6V and 2.8V readings.
What do you mean exactly?
I can't measure the resistance while measuring the output voltage as well obviously.
You mean in the sim?

No value between 5 and 10k will give an output voltage between .600 and 2.8V

Well partially, the biggest voltage out i can get is at 10k just like the plot shows.

The .6 to 2.8 was measured on a DMM on the real device.

I also stuck the photo resistor on the ohm meter and confirmed it does goes between about 600 ohms and 10k just the like data sheet says

only think i can think of is the schematic is wrong
 

Thread Starter

Rscott9399

Joined Jan 13, 2017
51
I just changed the 5k resistor in matlab and in the sim

If you made the 5k go to 1k you can get close. about 2.4 volts
However the curve is very nonlinear and we of course know resistors to be a linear device.......
 

Thread Starter

Rscott9399

Joined Jan 13, 2017
51
Never mind, i think i know what the issue is.

My schematic is wrong

i am interpreting their schematic wrong

I just looked up the symbol for a photo resistor
In their schematic the photo resistor is the 5k part

the other part is just a filtering cap I'm assuming.

Lesson learned, REMEMBER YOUR SCHEMATIC SYMBOLS
 

hp1729

Joined Nov 23, 2015
2,304
Hello

I have an error somewhere obviously in my elementary setup here.

Picked up one of these today
Just a small photo resistor light sensor

https://osepp.com/electronic-modules/sensor-modules/69-light-sensor-module

Came across a schematic on the Ostepp website for it. Looks like this.

https://osepp.com/downloads/pdf/LIGHTSENSOR.pdf



Simple Voltage divider circuit.
I found the part of the photo resistor and it is a

http://szhaiwang.en.alibaba.com/product/518889404-212333514/5mm_photoresistor_MJ5516_5_10k_OHM.html

Just for the hell of it, i built a circuit simulation in multi sim



The photo Resistor has a range of 5 ohms to 10k ohms

So i wrote a little matlab script to plot the output voyage based on a 5 volt input


V_source = 5;


R1 = 5000;
R2 = 1000;
R3 = linspace(5,10000,500);

R2Combined = zeros(1,500);
Vout = zeros(1,500);

for k = 1:500

R2Combined(k) = (R3(k)*R2)/(R3(k)+R2)
Vout(k) = R2Combined(k)/(R2Combined(k) + R1)*V_source

end

plot(R3,Vout)


Got the plot and confirmed the results with my MultiSim model



Notice at 5V reference with the Photo resistor set to 5k i get about 700mv


With the plot being about 5000 ohms on the photo resistor i also see about 700 mv on my matlab plot



Looks right. and it also confirms with the voltage range I'm seeing on the multisim model

So i take the doodad out of the box and throw 5 volts on it to give it a try.

The output range according to my multimeter
is from about .600 volts to 2.8 give or take a little and depending on what kinda light you have in the room on or off

Can anyone see why multi sim and my math is so far wrong from what the circuit is actually doing?
Cant find any documentations from the manufacture about what it should be outputting

The resolution from the device via the math and multi sim shows very little resolution making it hard to read on a micro controller so i did in fact question it when i saw the results

Can anyone see what i did wrong? Only think i can think of is that schematic is not correct for the part because i hope i can do some voltage divider math at this stage in the game
How bright a light did you assume you needed to get 5 V out?
 

Alec_t

Joined Sep 17, 2013
14,280
The photo Resistor has a range of 5 ohms to 10k ohms
At what light levels? The ad doesn't say. Did they perhaps mean "5-10 kΩ" at some unspecified light level ?
Take those figures with a pinch of salt. Cells similar to that often have a much higher dark resistance.
 

Sensacell

Joined Jun 19, 2012
3,432
I hold the opinion that any "readings" you get from sim will be entirely meaningless.

Light sensors are tricky, light intensity varies over many orders of magnitude in practical applications.
You need to do real tests - with the actual sensor and the real light source.
 
Top