The 1-Wire HARDWARIO Soil Sensor returns soil moisture humidity using relative values. Sensor is very sensitive and you can get range from 6500 when sensor is dry and 13000 when sensor is fully submerged into the water. Measuring is done by two copper strips inside the inner layers of the 4 layer PCB. This way the contacts are not exposed to direct humidity and do not oxidize.
It is also possible to use sensor to measure water level.
Schematics and more details could be found od HARDWARIO Developers portal.
Step 1: Connect Soil Sensor to ArduinoSoil Sensor can work with voltages from 3 to 5 V so you can use 3 or 5 V Arduino. It is using 1-Wire so your data pin must have 4.7 kOhms pull-up resistor to VCC pin.
Just connect VCC, GND wires and data pin to Arduino pin 7.
- Red wire - Vcc (3 to 5 V)
- Black wire - GND
- Yellow wire - Pin 7 (add 4.7k pullup)
First, go to the Sketch > Include Library > Manage Libraries...
Search for SoilSensor library and click Install.
You will also need OneWire Library installed.
Go to File > Examples > SoilSensor and choose SoilSensorText example code
This code will print temperature and moisture every second over serial port with 9600 baud. Compile sketch and upload it.
Step 3: Receive dataOpen Serial Monitor, set 9600 baud and here are your data from moisture sensor and temperature sensor.
You can also use second example SoilSensorPlot which will send you data in a format the Arduino Serial Plotter could display. Again, choose 9600 baud.
Comments