I plan to do an automation for our greenhouse so I started small, by playing first with the sensors that I need. Here is how to use the YL-39 (logic) + YL-69 (probe) pair that form the soil humidity sensor.
The YL-39 module has 4 pins:
- VCC: 3.3-5V
- GND
- A0 : analog output that can be easily read by Arduino
- D0 : digital pin that goes LOW or HIGH depending on a preset value
The issue with such sensors is that the probe itself work by trying to measure the current that goes from one side of it to the other. Because of this electrolysis occurs so it can destroy the probe (YL-69) pretty fast in high-moisture soils. To bypass this, instead of directly linking the VCC to the Arduino's VCC/5V we simply link it to a digital pin and power it (digital pin goes HIGH) only before we do a readout (see the code for this).
To connect it to the Arduino you just need to connect A0 from YL-39 to A1 from the Arduino and VCC from YL-39 to digital pin 6 from the Arduino.
That's all.
Comments
Please log in or sign up to comment.