Resistance in plant monitoring project

1.I have got the variable readings ranging from 50 to 1 thousand. What entity these values are showing? Is it the voltage in the additional resistance in the circuit? if yes, then how its maximum value is 1.02 thousand?
2.if i am keeping the circuit with 330ohm resistance ,it is showing value near 80 but in sunlight, even in full shadow ,it is showing the maximum value. What should be the appropriate resistance for this experiment?
3.Can we twist the wires as like in LED experiment instead of putting 2 pins in same slot in plant monitoring project? What is the differance?
4.What is the differance between the 0 to 4 pins and 3v3 pin?Can we connect 3v3 pin in LED experiment instead of 0 pin?
5.i have tried pins other than 0 but LED did not work. I have also set value ‘2’ in digitalWrite function.

  1. The bolt module has a 10 bit, 1V ADC, so it can convert analog voltage at pin A0 into discrete levels. For 10 bits, there are 2^10=1024 levels. The levels are denoted from 0 to 1023. Hence, you get a maximum of 1.02k.
  2. The sunlight or even the light from the sky is too bright and reduces the resistance of LDR, making the voltage at A0 more than 1v, so you get 1.02k fixed output. If you want to lower the readings, you may choose a resistance below 330 ohm, but it may be unsafe and can damage your bolt module if the total resistance becomes too low.
  3. We use a voltage divider circuit here. The LDR and resistor for the 2 resistances. The voltage at A0 becomes 3.3v*(R1)/(R1+Rldr). The LED used the resistor as a current limiting element and so was connected to it in series.
  4. The digital pins 0-4 are programmable while 3.3v pin provides constant voltage. Connecting the anode of LED to 3.3v will always keep it ON.
  5. You have to change the code whenever you change the physical connections/pins. If you use 2 in digitalWrite, you have to connect your LED to pin 2.

Even I am facing the same issue.How do we get discreet digital outputs as (1 or 0) instead of ranging from 50 to 1.02k?


The sensor that we have provided gives you analog output. You will have to purchase a light sensor with digital output if you want high or low values.

1 Like

Thank you!

@sunnysrikar.944, what you want is a comparator. You can invoke that logically by comparing with a threshold value in your code.
If, however, you want to feed the discrete output to a digital input pin, something like a YL-38 module would work too as it has a potentiometer to set up the threshold value.

I guess it works, thankyou @pankajkumar.p

1 Like