# Capacitive Soil Moisture Sensor (v2.0)

**Type:** Product page · **SKU:** CE09640 · **Brand:** [Core Electronics](https://core-electronics.com.au/brands/core-electronics-australia)
**Page:** https://core-electronics.com.au/capacitive-soil-moisture-sensor-v20.html ([markdown](https://core-electronics.com.au/capacitive-soil-moisture-sensor-v20.html.md))

Check-in with your plant friends, this sensor is great for detecting soil moisture levels!

> ⚠ If you are after a full plant automation kit - [check out Plant\_io](https://core-electronics.com.au/plant-io-plant-cultivation-kit.html)

## Pricing

- **Price:** $2.95 (inc GST) — $2.68 AUD, exc GST
- **Quantity discounts:** 5+ $2.63 (exc GST) · 15+ $2.55 (exc GST)

## Availability & dispatch

- In stock, ships same business day if ordered before 2PM (Australia/Sydney).
- We can dispatch 256 today; more stock is typically available with a 8–12 day lead time.

## Description

Tired of wilted plants? Automate your troubles away with this soil moisture sensor!

This sensor reduces corrosion by sensing water capacitively instead of resistively, so water never comes into direct contact with the metal portion of the sensor.

You'll need [an analog-to-digital](https://core-electronics.com.au/breakout-boards-and-modules.html#category_203) converter to get this sensor working with [a Raspberry Pi](https://core-electronics.com.au/raspberry-pi.html#category_272).

To calibrate the sensor, record the reading when completely dry, and immerse the sensor in water, recording the result (making sure not to get the capacitors and resistors wet).

Map between the two values and experiment with thresholds for each plant!

### Specifications

- Operating voltage: 3.3V - 5.0V
- Current Consumption: 5.68mA
- Analog output that varies between 0V and your supply voltage (so if your ADC can only handle 3.3V, supply this module with 3.3V)
 
### Shipping List

- Soil moisture sensor
- Dupont adapter cable

### Examples

#### Raspberry Pi Pico - Micropython

 ```
import machine
from time import sleep

soil_moisture = machine.ADC(28)

# A handy function for mapping values
def map_range(x, in_min, in_max, out_min, out_max):
    mapped = (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
    return int(max(min(mapped, out_max), out_min))

while True:
    soil_moisture_raw_reading = soil_moisture.read_u16()
#     print(soil_moisture_raw_reading)

    soil_moisture_filtered_reading = map_range(soil_moisture_raw_reading, 15000, 50000, 0, 100)
    print(soil_moisture_filtered_reading)
    sleep(0.5)
```

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/s/n/sny09804-edit.jpg)
