Soil Moisture/ Ph Sensor


#1

Hello, Cayenne has been a huge help in simplifying my day to day chores and upkeep with my plants at home. I am currently using this soil moisture sensor. I was wondering if anyone has any code or ideas on how to get this sensor to also measure soil ph values. From what I have read, they both take the readings the same way but all of the ph meter posts I have found seem to reference water ph. Can I use the same code for soil as well or is there a better sensor out there for my needs? TIA! !


#2

As far I’m aware, sensors like the one you’ve posted only measure soil moisture – either as a analog value from 0 to 1023 on the A0 pin, or as binary “wet/dry” signal on the D0 pin, whose threshold you can set using the blue potentiometer dial on the sensor. Perhaps it’s possible to calculate the pH from these inputs (forgive me, Chemistry wasn’t my strongest class :smiley: ) but I’d be in the same boat as you, looking for a website which had actual code showing how to do so. If you find something like that I’d be happy to help you integrate it into your Cayenne project.

I’ve not worked with a pH sensor before, so I don’t have a specific one to recommend, and they do look a little more pricey than moisture sensors like the one you posted. Here are a few links you might be interested in:

https://www.dfrobot.com/product-1025.html
https://forums.adafruit.com/viewtopic.php?f=8&t=21552


#3

Funny enough, that is the one i ended up getting, along with their probe sensor. I read the specs and it says their probe sensor can be used to take soil ph reading but doesnt elaborate more than dig a hole, plant the sensor, take readings. I will have to do some more reading however I also came to the conclusion that I should be able to track soil ph somewhat close if I get an accurate start reading and then measure the nutrient solution ph as its added in. Not ideal but should take care of my needs. Thank you for the quick response!


#4

I am having issues combining my arduino codes together. I am an electrician and coding is by far my weakest point with my projects. I can’t upload the .ino files but is there anyone the could help me with combining codes together to work?


#5

You can copy/paste the text into a post then select all the text and hit the </> button at the top of the post textbox to format it for code.