Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
soil_leaf_interface [2018/05/25 00:40] – [User Instructions] werk_ag | soil_leaf_interface [2021/04/04 23:49] (current) – [WeatherDuino Soil / Leaf Interface] werk_ag | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{: | ||
====== WeatherDuino Soil / Leaf Interface ====== | ====== WeatherDuino Soil / Leaf Interface ====== | ||
===== Overview ===== | ===== Overview ===== | ||
- | The WeatherDuino Soil / Leaf Interface was designed for users who want or need to have data from Soil moisture and /or Leaf Weatness | + | The WeatherDuino Soil / Leaf Interface was designed for users who want to have data from Soil moisture and/or Leaf Wetness |
- | 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.\\ | + | It works connected to any existing Transmitter unit with a pcb v3.xx onwards. There is no need for any extra 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).\\ | 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, | 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, | ||
- | 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:// | + | 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:// |
- | Always use Cat5 cables: As an example | + | Always use Cat5 cables |
- | {{: | + | {{: |
- | Theoretically, | + | Theoretically, |
- | 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 | + | For Soil Moisture readings, we recommend the use of the Vegetronix VH400 sensor. The voltage output of this sensor also isn't linear with VWC, but being an sensor from a reputable brand, its curve response is available from the manufacturer. Based on that information, we have implemented |
- | For readings of the Soil and Leaf temperatures, | + | For Soil and Leaf temperatures, |
- | <WRAP round important | + | <WRAP round important |
This device is intended for experienced WeatherDuino users.\\ | 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 | + | Users without a good knowledge about how the WeatherDuino system works, namely about how the sensors mapping schema works, may have some difficulties correctly |
</ | </ | ||
Line 27: | Line 28: | ||
* Up to four analogue 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.\\ | + | e.g. 2 Soil Moisture and 2 Leaf Wetness, or 3 Soil Moisture and 1 Leaf Wetness. Usage definition is done in the software.\\ |
Line 41: | Line 42: | ||
* Up to four 1-Wire Dallas temperature sensors (DS18B20 or DS18S20).\\ | * Up to four 1-Wire Dallas temperature sensors (DS18B20 or DS18S20).\\ | ||
- | Ex: 4 used for Soil Temperature, 3 for Soil Temperature | + | e.g. Four sensors |
====== User Instructions ====== | ====== User Instructions ====== | ||
- | For using the Soil/Leaf Interface | + | For using the Soil/Leaf Interface |
- | 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.\\ | + | 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 | + | If the cables between the your Soil/Leaf Interface and the TX unit don't exceed seven to eight meters you can safely |
- | <WRAP round hint 75%> | + | <WRAP round tip 75%> |
- | If you plan to use the Soil / Leaf Interface, when you start to assemble your Transmitter board don't install R9 and R10 until you know the cable length that you gonna use. As you know the value of these resistors | + | If you plan to use the Soil / Leaf Interface, when you start to assemble your Transmitter board don't install R9 and R10 until you know the cable length that you are going to use. The value of these resistors |
</ | </ | ||
- | **Example: | + | **Example: |
{{: | {{: | ||
- | Despite the Soil / Leaf interface can be installed | + | The Soil / Leaf interface can be installed |
- | {{: | + | {{: |
The Soil / Leaf interface and all the sensors connected to it are powered from the TX unit via the 4 wire connection.\\ | The Soil / Leaf interface and all the sensors connected to it are powered from the TX unit via the 4 wire connection.\\ | ||
- | Interface | + | The interface |
- | ===== Under Construction ===== | ||
+ | The VH400 sensor doesn' | ||
- | The data is sent using I2C protocol. With some care with the cable (network cable is very good for this) and careful calculation | + | < |
+ | // Max and Min output voltage | ||
+ | // Default value for Decagon Devices LWS Leaf Wetness Sensor | ||
- | 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 | + | // ADC1 ADC2 ADC3 ADC4 |
+ | const uint16_t AnalogSensor_MaxVoltOut[4] | ||
+ | const uint16_t AnalogSensor_MinVoltOut[4] | ||
+ | </ | ||
- | 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, | ||
+ | <WRAP round important 75%> | ||
+ | For the Decagon LWS, power should be set to 3.3 V | ||
+ | </ | ||
- | **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: | ||