Search models, users, collections, and posts

Soil Moisture Sensor with Battery

Print Profile(1)

All
A1 mini
H2D Pro
H2S
X1 Carbon
X1
P1P
H2D
P1S
A1
X1E
P2S
H2C
X2D
A2L

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
1.6 h
1 plate

Open in Bambu Studio
Boost
8
31
0
0
14
6
Released 

Description

A simple Soil Moisture sensor. This casing can hold either a Wemos D1 mini or a ESP32 C3/S3 mini boards. I used home assistant and ESPHome Builder to install and configure the microcontroller, however you can use micro python or Arduino IDE, your choice. 

 

ESPHome Code:

 

```

sensor:

  - platform: adc

    pin: A0   #Replace this with your GPIO pin

    name: "Soil Moisture Sensor 1"

    unit_of_measurement: "%"

    icon: "mdi:water-percent"

    accuracy_decimals: 1

    update_interval: 3s

    filters:

      - calibrate_linear:

          #Replace the values below with the ones you found.

          # The first number is your DRY voltage, which maps to 0% moisture.

          - 0.50 -> 0.0

          # The second number is your WET voltage, which maps to 100% moisture.

          - 0.26 -> 100.0

      # The clamp filter ensures the output never goes below 0% or above 100%.

      - clamp:

          min_value: 0.0

          max_value: 100.0

      # The median filter helps smooth out noisy readings.

      - median:

          window_size: 5

          send_every: 3

          send_first_at: 1

         

# ==========================================================

deep_sleep:

 run_duration: 120s

 sleep_duration: 15min

 

```

Comment & Rating (0)

(0/1000)