This is an old revision of the document!


WeatherDuino Soil / Leaf Interface

Overview

The WeatherDuino Soil / Leaf Interface was designed for users who want or need to have data from Soil moisture and /or Leaf Weatness sensors, as also Soil Temperature. It allows te use of up to four Soil Moisture and / or Leaf Wetness sensors and four Soil Temperature sensors.
It works connected to any existing Transmitter unit with a pcb v3.xx onwards. There is no need of any extra power supply, sensors and board are powered from the Transmitter power supply.

Generically the WeatherDuino Soil / Leaf Interface is composed by an I²C to 1-Wire® bridge chip, and a four channel 12 bit analogue to digital converter (Texas Instruments ADS1015).
Communication between the Soil / Leaf interface and the Transmitter unit is done by using I²C protocol. Due to the existence of special I²C range extender chips at both ends of the connections, the cable between both units can reach considerable lengths (30 meters or more).
For cables lengths up to 8 meters the default configuration works perfectly, for greater cable lengths, the value of four pull-up resistors (two on the Transmitter board, two on the Soil / Leaf interface) should be calculated for every single case. To calculate the value of these resistors, please refer to this document, starting at page 8: http://www.nxp.com/documents/data_sheet/P82B715.pdf.
Always use Cat5 cables: As an example GND / SDA in one pair, Vcc / SCL in another par.

ASCII

Theoretically, since you know the minimum and maximum (should be no more than 5V) output voltage of a sensor, and if it correlates linearly to VWC (Volumetric Water Content) you could use any “sensor” you wich, however in practice, things aren't so easy. Cheap sensors rarely have an output voltage that is linear with VWC. Well, if you know the curve response, you can modify the software and use them too!

For Soil Moisture readings, we recommend the use of the Vegetronix VH400 sensor. The voltage output of this sensor, also isn't linear with the VWC, but being an sensor from a reputable brand, its curve response is available from the manufacturer. Based on that info, we have implemented on the software the required calculations to get reliable and accurate readings from this sensor.

For readings of the Soil and Leaf temperatures, any DS18B20 or DS18S20 1-wire sensors can be used. They are cheap, and can easily be found with waterproof encapsulation suitable to be used in the soil.

This device is intended for experienced WeatherDuino users.
Users without a good knowledge about how the WeatherDuino system works, namely about how the sensors mapping schema works, may have some difficulties to correctly configure the software.

Soil Moisture / Leaf Wetness Sensors

  • Up to four analogue Soil Moisture / Leaf Wetness sensors.

Ex: 2 Soil Moisture and 2 Leaf Wetness, or 3 Soil Moisture and 1 Leaf Wetness. Usage definition is done in the software.

Supported Models

Soil Moisture: Vegetronix VH400

Leaf Wetness: Decagon Leaf Sensor (current name is METER PHYTOS 31)
lws.jpg

Temperature sensors:

  • Up to four 1-Wire Dallas temperature sensors (DS18B20 or DS18S20).

Ex: 4 used for Soil Temperature, 3 for Soil Temperature and 1 for Leaf Temperature. Usage definition is done in the software.

User Instructions

For using the Soil/Leaf Interface its recommended installing the P82B715 chip on the TX board.
Its recommended to connect the Soil/Leaf Interface to the LSCL and LSDA lines on the TX board (active only when the P82B715 chip is installed), however it will also work if connected to the regular SCL and SDA lines, but in this case the cables should be very short.
If the cables between the your Soil/Leaf Interface and the TX unit don't exceed seven to eight meters you can safely left R1 and R2 empty, and just install R9 and R10 on the TX board (v3.12), 4.7K is a good value for cables up to eight meters. Example: If you need a 20 meters cable, use UTP (STP, FTP, SFTP) Cat5E cable, and for the resistors, use the values shown in the picture bellow (documentation - Fig 9.), i.e. 4.7 kΩ for R8 and R9 on the TX board, and 470 Ω for R1 and R2 on the Soil / Leaf interface.

i2c pull-up resistors calculation

Despite the Soil / Leaf interface can be installed on the same box than an existing or a dedicated Transmitter unit, it makes more sense placing it in a separated small waterproof box (type junction box) near the point where the sensors will be installed than have it the TX box. Why? Simple because it's easier to use a single UTP cable from the Transmitter unit to the Soil / Leaf interface, than have all the cables from the sensors running up to the Transmitter box.

imag0740-upr-sm.jpg

The Soil / Leaf interface and all the sensors connected to it are powered from the TX unit via the 4 wire connection.
Interface supports 3.3V and 5V analogue sensors. Power voltage for each one is selected by a jumper on the interface.

Under Construction

The data is sent using I2C protocol. With some care with the cable (network cable is very good for this) and careful calculation of 4 resistors (2 on the TX unit, 2 on the Soil / Leaf interface) , the connection between the Soil / Leaf interface and the TX unit can easily reach 10 or 15 (or more) meters. If you plan to use the Soil / Leaf Interface, when you start to build your TX unit don't install R9 and R10 before you know the cable length that you gonna use. The value will depend of the cable type and length.

With many variables (cable length/capacitance, local capacitive loading on each I2C-bus, bus voltages, and bus speed), optimizing a design can be complex and requires significant study of the application note information. The following circuit and simplified approach has been checked to provide adequate performance in the typical 100 kHz application and can be easily implemented by just using the values and circuit shown for either point-to-point application, up to 30 meters long, or in multiple point applications if additional nodes

need to be added along the way.

Specific information on this circuit implementation:
• The pull-up on each I2C-bus is (VCC - 0.4 V) / 1 mA = 4.6 kΩ, using 4.7 kΩ as the nearest usual value.
• The net pull-up on the cable bus can be (VCC - 0.5 V) / (21 - n) mA where n = total number of P82B715 modules on the cable. When there are only two modules, one each end of the cable, the pull-up = (4.5 / 19) = 237 Ω. Make the pull-ups at each end of the cable equal. Signalling is bidirectional so there is no advantage optimizing for any one direction. The pull-up at each end will be 474 Ω, using 470 Ω as the nearest usual value.
• The 100 kHz rise time requirement is 1 ms. Meeting this requires the product of the bus capacitance and pull-up resistor on each bus section to be less than 1.18 ms. That provides one capacitance limit. With 4.7 kΩ pull-ups the I2C-bus limit is 250 pF each, while the 235 Ω sets a cable bus limit at 5000 pF.
• The 300 ns bus fall time, and the Standard-mode I2C-bus limit specification limit of 400 pF, must also be observed. If the 400 pF limit is observed the fall time limit will be met. Allocate about 1/3 of this 400 pF limit, or 133 pF, to each I2C-bus leaving 2/3, or 266 pF, for the cable bus loading as it will appear at the Sx/Sy pins. The x10 gain of P82B715 allows the loading at Lx/Ly to be 10 times the load at Sx/Sy, so 2660 pF maximum. The loading at Lx/Ly due to the other standard buses is 133 pF each. For just one remote module the cable capacitance may then be up to (2660 - 133) = 2530 pF. For typical twisted pair or flat cables, as used for telephony or Ethernet (Cat5e) wiring, that capacitance is around 50 pF to 70 pF / meter so the cable could, in theory, be up to 50 m long. From practical experience, 30 m has proven a safe cable length to be driven in this simple way, up to 100 kHz, with the values shown. Longer distances and higher speeds are possible but require more careful design.
• If there are severe EMI/ESD tests to be passed then large clamp diodes can be fitted on the cable bus at each module to VCC and to ground. They may be diodes rated for this ESD application, or simply large rectifiers (1N4000). The low-impedance bus easily accommodates their relatively large capacitance. The P82B715 does not provide any isolation between Lx and Sx, so this clamping mFile written by Adobe Photoshop� 5.2method provides the best protection for the lower voltage I2C-bus parts. The VCC supply should be bypassed using low-impedance capacitors. Zeners may be fitted to prevent the supply rising due to rectification during very large interference.

A voltmeter is required to determine the minimum and maximum output voltage of each of the analogue sensors at dry and wet condition. Those values need to be established and added to user configuration options in the software. For the Decagon LWS power should be set to 3.3 V. The LWS sensor really needs calibration: the output voltage at dry condition and the output voltage at wet condition (in the water). The sensor that does not need calibration is the VH400.