Trying to figure out where Im going wrong with this test I am playing around with.
Hooking up a soil moisture sensor to an Arduino Uno and reading the analog value = all fine and dandy.
Powering with 5V and getting 0-5V range out of it.
Then I thought Id try and set a voltage divider to get the analog range from 0-1V.
So I do the ordinary basic voltage divider 100k/27k and measure the output from this.
Still powering the sensor from the Arduino
The output from the voltage divider reads 0V...
The soil moisture sensor works fine without the voltage divider, the voltage divider works fine without the soil moisture sensor...
Could someone smarter than me please give me a hint where things go wrong?
Attached is a quick Fritzing sketch of my test setup.
Hi,
The moisture sensor relies on the high input impedance of the arduino input to work, using a potential divider turns the AtoD input into a much lower impedance input.
OPs Pic.
The sensor is NOT connected to ground. The ground pin is connected to +5V.
When using a voltage divider you take the signal between the the two resistors.
(A voltage divider is NOT required if the input signal is lower than 5Volts.
The way it looks, non of your analogue inputs is connected to anything.
I am amazed how you can make so many mistakes with that few components.
By the way, if the sensor uses copper strips .... plants do not like copper at all. For plants copper is like poison.
arduinoaleman: If your diagram is correct it will never work!
The sensor is NOT connected to ground. The ground pin is connected to +5V.
When using a voltage divider you take the signal between the the two resistors.
(A voltage divider is NOT required if the input signal is lower than 5Volts.
The way it looks, non of your analogue inputs is connected to anything.
I am amazed how you can make so many mistakes with that few components.
By the way, if the sensor uses copper strips .... plants do not like copper at all. For plants copper is like poison.
Well that Fritzing episode didnt help...
This is classified as a fritzing failure. The sensor is connected to GND
The signal is taken between the resistors, the same setup but with a potentiometer instead of the sensor works like a charm. With potentiometer setup the voltage measured at the voltage divider is 0-1V.
This test was meant to play with the voltage output and the possibility of limit that to 0-1V. Therefore I am only using the Arduino board to power the setup. DVDdougs assumption is correct here
In a real scenario I would of course connect the A0 for some relevant data.
My wondering is still how the sensor affect my voltage divider since it works fine with a potentiometer.
Not really sure about the comment of using an op-amp in this case? How would that change the voltage output from the divider?
I also would like to thank you for your concern regarding my plants. No real plants was harmed during this experiment, I am only torturing a glass of water at this point!
My wondering is still how the sensor affect my voltage divider since it works fine with a potentiometer.
Your sensor on its own is basically a potential divider, however it is a high impedance divider, in that it can only supply very small amount of current.
This is okay when you connect it directly to the high impedance UNO AtoD.
When you make your own divider, it is a relatively low impedance circuit an you sensor cannot supply the current, so its output is low or 0V.
The potentiometer is acting as a relatively LOW impedance sensor and can supply the current your divider needs without its output being compromised.
A buffer op-amp act like a high impedance amplifier with low impedance output.
These conductive sensors I would regard as toy sensors, if you need good relaible type you may have to investigate more.
There are circuits around for AC driven sensors to overcome electrolytic corrosion. (google is your friend.)
TomGeorge:
Hi,Your sensor on its own is basically a potential divider, however it is a high impedance divider, in that it can only supply very small amount of current.
This is okay when you connect it directly to the high impedance UNO AtoD.
When you make your own divider, it is a relatively low impedance circuit an you sensor cannot supply the current, so its output is low or 0V.
The potentiometer is acting as a relatively LOW impedance sensor and can supply the current your divider needs without its output being compromised.
A buffer op-amp act like a high impedance amplifier with low impedance output.
These conductive sensors I would regard as toy sensors, if you need good reliable type you may have to investigate more.
There are circuits around for AC driven sensors to overcome electrolytic corrosion. (google is your friend.)
Tom...
Thanks Tom for trying to clear things out!
My old and dusty electronics knowledge keeps connecting the term impedance with AC and not DC but I see what you mean...
This could of course explain why the test with the sensor connected to a NodeMCU (https://www.seeedstudio.com/NodeMCU-v2-Lua-based-ESP8266-development-kit-p-2415.html#) is giving me strange values then. After some digging it seems that this card has a built in voltage divider on A0 to provide the onboard ESP8266 WiFi with 0-1V range.
I do completely agree that the sensor is a toy, but so is my level of knowledge also so its all good then
My conclusion for future tests is that the easy solution is to find sensors with the correct range according to the desired analog port on the card.