I'm a newbie to pi and using it for my final year project to display moisture value of soil using the soil moisture sensor. I have followed this tutorial website for the connection and code and instead of using the prescribed sensor, i have used this sensor.

The issue is that i'm getting the output value as 0. I have tried multiple codes from multiple tutorial websites but got the same output moisture value. The MCP3008 works fine alone and so does the sensor, I am facing issue with the interface of sensor with mcp3008.

Any suggestions on how can I make it work? And I'd appreciate if the solution is provided asap due to the time constraints on project submission. Thanks in advance.

i used this website learn.adafruit.com/raspberry-pi-analog-to-digital-converters/… to read the analog values of the channels to make sure the chip wasn't defected. And then connected digital output pin of sensor with Rpi to check if it is working fine. But when i connected both of them together to read moisture value, the output was always 0, when it should have been moisture content of the soil. I just want to know if i'm doing something wrong or missing something for it to work properly.

The wiring diagram and the code is given on this website: https://computers.tutsplus.com/tutorials/build-a-raspberry-pi-moisture-sensor-to-monitor-your-plants--mac-52875

  • Axiomatically nothing to do with the Pi. – joan Mar 21 '18 at 10:38
  • 1
    There is also not nearly enough information here to provide an answer. – Brick Mar 21 '18 at 13:20
  • do not put additional information into comments .... add the information to your question .... there is an edit button on the left side below the tags ... delete the comment after – jsotola Mar 21 '18 at 23:51
  • please provide a wiring diagram of the connection between the RPi and the sensor ... also provide the code that you are using to read the moisture level – jsotola Mar 21 '18 at 23:56

Your Answer

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

Browse other questions tagged or ask your own question.