Soil Moisture sensor with digital pins

Those values are not so different, average 909 with variance +/- 1.2%.
All hardware has a tolerance. For soil moisture I would be very happy with this tolerance.

yeah since this post it dropped by 100 and few measurements later it went up by 100 again…
it’s all funky…I removed the transistor, I’m sending the VCC from the pin on the esp. and ground from ground and I know the measurements of the 3.3V with this sensor so I mapped it to that… I’ll see how that goes…

this way there is little to no voltage difference when not in use which means the sensor will live longer and when I need I already send the voltage needed… again I’ll see how that works… thanks anyways for all the help you gave with this. :slight_smile:really appreciated!

Sounds like your transistor circuit is faulty… or at 50ms between power up and reading you are switching on and off too fast for the transistor?. I have had good results with basic 2n2222 for switching higher power items, and they are high speed, but I also don’t worry about 24/7 power to sensors. I just leave the sensor powered and cover all connections in dielectric grease (if outside or in high humidity areas). 24/7 power doesn’t kill the sensor, corrosion from DC & moisture does.

Over sourcing current from the GPIO pin may or may not hurt your ESP over time, but again… who knows for sure until it happens… and the MCU’s are cheap’nuff to replace :stuck_out_tongue:

Marking this topic as solved… but feel free to add to it if you have more info.

1 Like