... I'm quite new to electronics ... I have a 10k to 1M Ohm photoresistor but can't seem to get my mind around the values for the divider ...
Voltage divider is two resisters in series connected to the voltage source:
V(source)+
R1 (Voltage drop here is V1)
You tap into it here (call it Vtap)
R2 (Voltage drop here is V2)
Ground
When resisters are in series, the final resistance is summed. So between Vsource and Ground, the total resistance is R1+R2. Let’s list all the facts we know:
R total = R1 + R2
V total = V1 + V2
You tap in the middle, so
V tap = V2, ie: V2 is what you get.
So, let’s see the math: (Or skip forward to the formular point marked with asterisk)
Vsource = V1 + V2
Recall Ohms Law, V=I*R
The current going through R1 and R2 is the same current, so "I" here needs no subsript. I1 = I2 = I
So,
Vsource = V1 + V2 becomes:
Vsource = (I * R1) + V2
-or, to make it easier to type:
Vs = I*R1+V2
- since you want to find V2, so move V2 side of the equation to the left
V2 + I*R1 = Vs
V2 = Vs - I*R1 ... lets call this equation 1The total voltage drop is Vsource, and the current is "I", and the total resistance is the sum of the two, so Ohms law gives you:
Vs = I*(R1+R2)
-move "I" to the other side
I * (R1+R2) = Vs
I = Vs / (R1+R2)
Substitute the “I” back in equation 1
V2 = Vs - I*R1 … this is equation 1 V2 = Vs - (Vs / (R1+R2) )* R1 … replaced the “I”
V2 = Vs – Vs*R1 / (R1+R2) ... multiplied R1 and Vs
V2 = Vs ( 1 – R1/(R1+R2) ) ... undistributed Vs according to distributive law
*** If you skipped the math, come to this point ***So, here it is; when you tap into the middle of two resistors (top being R1, bottom being R2), your voltage is:
V2 = Vs ( 1 - R1/(R1+R2) )
When R1=R2, R1/(R1+R2) is 1/(1+1) = 1/2, thus V2 is half of Vs.
The higher the R2, the smaller is R1/(R1+R2), thus V2 is closer to Vs.
The higher the R1, the larger is R1/(R1+R2), thus V2 is closer to 0.
Calculating it out may be difficult and matching the resistors may be difficult. So, consider using a trimpot. Replace R1 (or R2) with a trimpot, and let your photo resistor be the other R. Now you can experiment with it to set the trimpot at a point where max/min light gives you the V2 range you want.
Hope this helps...
Rick
Edited:
SINCEStart here and remember these can only handle a few hundred milli watts so you can't run your current for the leds directly thru it.
Once you get the volts correctly from the voltage divider, consider feeding that into an MOSFET. So, your V2 max is what the MOSFET needs to get to max brightness, and your V2 min is your room is already bright enough.