I have water level/humidity sensor and a LDR diode hooked to arduino like this (the resistor is 10k) schema
- On
A0
I can read signal from water sensor (blue) - On
A1
I can read signal from light sensor (yellow)
The problem is that both signals seem to be correlated. When I dip the water sensor to water and keep the light levels the same, the signal from light goes up as well (dramatically).
I suspect that this is due to Ohm's law. The voltage in a circuit depends on the total resistance of the circuit. Both sensors act as a sort of resistors so when one's resistance changes the voltage in the circuit changes as well.
How can I wire the sensors such that the change in resistance of either sensor doesn't affect the second? Or do I need a separate power supply for each sensor?
1 Answer 1
If I've found the same humidity sensor, it has pretty big output impedance and the maximum input impedance for the ADC
input is 10kOhms
. According the the datasheet the recommended minimum load for the sensor is about 80kOhms
(?). That means readings of humidity sensor will be highly affected by sampling capacitor initial charge (= the value of previous reading).
Basically reading GND
between sensor readings helps to separate the results from each other, but the humidity sensor won't be able to charge sampling capacitor to its output voltage without amplifying the current (you'll get values much lower than it should be).
Or you can repeat the readings on humidity sensor channel several times until the value is more "stable".
A3
(same as the LDR is wired). and readA0
(water) ->A3
(discharge) -->A1
(light)?