How To: Measure soil moisture sensor


Another great video, I watched it earlier today.

I wrote about my Soil Moisture sensor project here also.

Note currently you can only have a maximum of two soil moisture modules connected to one ESP board at the same time, as only two Analog input pins seem to be exposed and available for selection in the Web Flasher. Those being pins 32 and 33 as seen in your video also.

I have reported this to the developers so hopefully they will fix and allow us to use the other Analog Inputs also. As I wanted 3x soil moisture sensors on my project now.

This is an image one of the devs sent me and he said those are the Analog input pins we should be able to use and select.


@Alireza_Taghavi looking at your YouTube channel you seem to be very knowledgeable on these types of micro controller projects and other Home Automation platforms.

I am wondering it seems its not so typical for Arduino and ESP projects to also be Internet based / controllable from an app etc ?

Obviously ESP boards flashed with certain 3rd party firmwares can then be controlled locally via HTTP commands or MQTT on the LAN and then via HA platforms like Home Assistant.

I dont know anything about Arduino however.

EzloPi seems very easy to use anyone could do it, however I dont think its local LAN control? Seems to be cloud based. Ezlo staff correct me if I am wrong?

I was just wondering how common is it for this type of solution to make your projects controllable via an app etc and how did you first discover and start using EzloPi and what do you like about it? Compared to other solutions you may have used.


1 Like

Local LAN control is coming soon.

1 Like

The thing is that I enjoy trying and experimenting new technology and I search on the net to find new devices, platforms and so forth.

EzloPi is really easy for everyone to setup and use. Also, another advantage is it does not need any gateway or hub.


For those of you who don’t want to build your own hardware (and waterproof it), may I suggest using the Ecowitt WH51 soil moisture sensor with the GW1100 WIFI gateway. The WH51s cost a whopping $16, and the GW1100 is about $30. The AA battery in the WH51 lasts for about a year. You can pair up to 8 WH51s per GW1100. The Ecowitt website provides a great graphical view of your sensors and there are phone apps that do the same.

I have a program that I wrote that runs on my Elzo home automation system that uses an Ecowitt API to read the soil moisture of the various moisture sensors. Then, depending on the readings, it uses a Rachio irrigation system API to schedule a run of the associated zones. If you had indoor plants, it could also turn on an outlet switch for a pump for some predefined period.

what kind of soil moisture sensor do they use exactly inside this?

I see these next steps for the EzloPi community to further improve how we can make Soil Moisture capabilities better:
-we could get our team to design a water proof enclosure for outdoor purpose (including battery) (we can make the design open source so anyone can 3D print it)
-put a “low power” mode for EzloPi for battery operated devices (like put the system on sleep and wake up every 2 min etc…so that battery will last much longer)

what do you think?