IDC_humidity_sensor

IDC Humidity Sensor

The moisture sensor is a smart solution for projects that respond to soil or ambient moisture. It allows for easy connection via IDC connector and instant moisture measurement using micro:bit in MakeCode environment. Try dry soil detection, automatic watering or sending alerts while learning the basics of programming, electronics and working with sensors in a fun way.

Description

The moisture sensor is a simple input module that allows you to detect the moisture of the soil or other environment. It is suitable for plant experiments, irrigation measurements or demonstration ecological models. Thanks to the IDC connector, you can easily connect it to the micro:bit via a universal fixture.

Specifications

  • Connector: IDC
  • Exit: analog (humidity value)
  • Power supply: 3,3-5 V
  • Operating principle: change in soil conductivity
  • Use: measuring the moisture content of soil or other material
  • Dimensions: approx. 30 × 20 × 5 mm

Connection

First, connect the cable to the capacitive sensor and then place the other side of the cable into the first slot on the universal fixture. Make sure that the sensor does not come into contact with liquids during assembly or during measurement.

When connecting, the expansion board must be turned off and the micro:bit disconnected from the power supply. After connecting the sensor to the universal fixture, the fixture can be turned on using the power switch and the measurement can begin.

capacitive_sensor-1024x1024

Programme

Basic program

According to the instructions, we connected the capacitive sensor to the universal fixture. To open the sample program, click on the arrow in the upper right corner, which will redirect you to the MakeCode environment. This program serves as a sample for capacitive sensors version 2.0 and works with data obtained from pin 2, to which the sensor is connected.

The program evaluates the moisture values as follows: if the value is higher than 700, the micro:bit signals that the probe is not inserted into the soil. A value between 380 and 700 indicates a dry substrate and watering is recommended. If the value is between 280 and 380, the moisture is sufficient. Remember that the values given are only indicative - different types of plants may require different levels of watering.

Tasks

Task 1: Reading values from a sensor

Connect the humidity sensor according to the attached diagram. Observe the measured values on the display. Touch the sensor with dry fingers and record the displayed values. Then repeat the experiment with moistened fingers and compare the difference. Be careful not to get the rest of the electronics or the computer wet during the experiment.

Task 2: Recording substrate moisture values before and after potting

Choose a potted plant that has not been watered today. Carefully insert the sensor into the soil, taking care not to damage the roots. Write down the current moisture reading. After reading the reading, water the plant and watch the reading change.

  • Record the highest and lowest readings.
  • Monitor changes every 15 minutes.
  • Describe how quickly changes in humidity occur.

Task 3: Comparison of output values in different soil types

Prepare different types of soil – for example, sand, regular soil, clay or gravel. First, take a measurement without adding water. Insert the sensor into each substrate in turn, wiping it with a paper towel after each measurement. Record the results.

Then moisten each substrate with the same amount of water and measure again. Evaluate which substrate was the wettest before watering and which after watering. Record the results and compare the properties of the individual soils.