why are we connecting only 10k ohms resistance in series with ldr?why cant we connect other value resistance in series with it? if we can connect other resistance so what is the range of them in kilo-ohms?
The resistance of a LDR decreases with increasing light intensity. Strong Light -LDR resistance(decreases to 0(ohms).So the 10k(ohm) resistor sees closer to 5V.The key point of Bolt iot also has Vcc(5V) and ground. As for the given voltage Vcc(5V) in Bolt iot resistor mainly use 10k(ohm) and we can use other resistor i.e(should be in min range 800ohm-max range-1.2k(ohm)).Otherwise,if we will go above of this resistor this might give us false result in output.
Resistor also vary in which LDR we are implemented on it.
we have to choose the closest one to LDR resistance range to make the voltage output difference better. For example, if your LDR resistance will vary between 800 ohm to 1k ohm then used 1k ohm resistor as R2 will be ok. But if you has LDR with resistance output vary from 8k-10k don’t use 1k as R2, using 10k as R2 will better.
What is the code behind the conversion of analog voltage given by ldr to digital voltage(0-1024) that we see?
And are we measuring the voltage between ldr or the voltage between resistor?
And what is the output voltage difference that you mentioned the in your above statement?
- we don’t have to write any code for it as it already present in the micro controller.
- And here we are measuring light intensity by converting change in resistance into change in voltage as the bolt module capable of measuring change in voltage(not change in resistance) through its analog input pin. (ans of your 2nd que is present in your 1st que you already given it your own)
3.output voltage difference = change in output voltage
We connect resistor of 10k ohm because to make voltage divider ckt which provide fraction of input voltage to varing resistance of LDR
We can connect resistance in range of 800-1200