Soil moisture sensor with TinkerPie
Push the fork into the plant pot to know when it needs water.
| Type | Analog sensors |
|---|---|
| Connect to | P10-P13 |
| Gives | 0-100 % (wet = high) |
| Simulator | Yes: a control appears under the simulated board |
How it works
The soil sensor fork measures how easily electricity flows between its two legs. Wet soil conducts better than dry soil, so the reading rises when the soil is wet.
How to wire it
Plug the module's A0 / OUT into P10 (or P11-P13 when Wi-Fi is off), VCC to 3.3 V, GND to GND.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.soilMoisture(Pin.P10)
// Arduino C++
sensors::soilMoisture(Pin::P10) Good to know
- Push the fork into the soil up to the line, not over the electronics.
- The metal legs corrode over time; power the sensor only when you read it.
- Capacitive soil sensors last longer outdoors.
Projects with the Soil moisture sensor
Thirsty plant alarmA soil moisture sensor tells TinkerPie when the plant needs water: a sad face and a beep.Sensor projectsSmart plant monitorSoil moisture on your phone dashboard, a notification when the plant is thirsty, and a ThingSpeak log.IoT
Similar modules
- Potentiometer (knob)
- Light sensor module (LDR)
- Sound sensor module
- Gas / smoke sensor MQ-2
- Air quality sensor MQ-135
- Rain drop sensor
- Water level sensor
- Force sensor (FSR)
More projects to try
Questions
Can I try the Soil moisture sensor without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
What value means my plant needs water?
It depends on the soil. Read it when the soil is just watered and when it is dry, then choose a threshold in between.