0

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?

  • is the light sensor wiring right? shouldn't the resistor connect to ground? – Juraj Sep 16 '18 at 15:29
  • I get some signal, so I guess it is (row 37) – Robin Nemeth Sep 16 '18 at 17:42
  • You can try to read another channel between them - connected to ground to discharge sampling capacitor. – KIIV Sep 17 '18 at 12:23
  • @KIIV I am not sure if I follow (still learning the lingo). You mean like connecting a simple resistor to GND and A3 (same as the LDR is wired). and read A0 (water) -> A3 (discharge) --> A1 (light)? – Robin Nemeth Sep 17 '18 at 12:33
  • 1
    @KIIV knew what to do, answer is his – Juraj Sep 18 '18 at 18:31
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".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.