In this post, I'm going to explain how you can connect your APAS T1 soil moisture and temperature sensor to the Arduino, and take soil moisture and temperature measurements. I will provide schematics and list of required components. You can connect the HITA E0 electrical conductivity sensor or the INSHU LWS leaf wetness sensor to the Arduino following the same instructions.
What You Need
Here's what you need to get started:
Arduino Uno (or any Arduino Uno Compatible board)
ADS1015 12-Bit ADC or ADS1115 16-Bit ADC for higher resolution
10 K resistor
100 nF ceramic capacitor (optional)
100 uF electrolytic capacitor (optional)
Male Header (4-pin)
Here, instead of the Arduino Uno, I'm using an Arduino Uno compatible microcontroller board from Adafruit called "Metro Mini". I love this board because of its small small form factor. All other specifications match the Arduino Uno, like it uses ATmega328 brains, clocks at 16 MHz and has a GPIO logic level of 5V (can be changed to 3.3 V).
The ATmega328 has 10-bit ADC, which can be used to read the analog soil moisture input from the APAS T1. To achieve higher precision and accuracy, we are going to use the ADS1115 16-bit ADC. You can connect up to two APAS T1 sensors to each ADC when used in differential mode. If you configure the chip as 4 single-ended input channels, you will be able to connect up to four sensors. This, however, may reduce the accuracy by making measurements more prone to noise. Adafruit has a great tutorial on the ADS1115. I strongly recommend reading that.
I personally like to add the 100 nF and 100 uF capacitors to my circuits. The combination helps reduce the noise level if you're using a power supply that is not well regulated. If your circuity is battery-powered, you may not benefit much from these little guys. In either case, I recommend using them.
Wiring
The wiring diagram and schematic below show how to connect the ADC, sensor and other components to the Arduino (Adafruit Metro Mini).
The APAS T1 sensor comes with a 3.5-mm 4-pole stereo connector, which can be plugged into any DurUntash sensor interface. This means, to connect the APAS T1 sensor to your board, you need to take a few more steps. You can either clip off the connector (followed by stripping and tinning the wires); or use an appropriate 3.5-mm 4-conductor stereo jack or extension cable (See here and here for examples).
You can connect the APAS T1 wires to your board, with the power supply wire (red) connected to the Arduino digital pin #6 (excitation), the moisture wire (white) to the ADS1115 A0 pin, the temp wire (green) to the Arduino digital pin #2, and the ground wire (black) to the ground. Please read the APAS T1 user manual for more information on the sensor wiring.
Here, I'm going to solder wires from a stereo phone jack with 4-conductor cable to a 4-pin male header. This is shown in pictures below:
Connecting Four Sensors
Connecting more than one sensor to the Arduino is pretty straightforward. You just need to add extra ADC boards and pin headers to the breadboard. The Arduino sketch that I will share with you in another post already supports four sensors so you don't have to worry about that part. Just be mindful of the ADDR (address pin) pin of the ADS1115, because its connection to GND or VCC determines its address.
Download
I have put the Fritzing file for the design that was discussed here on our download page (DIY Project Files > AVAN Zero-OS Interface > Interface_for_DurUntash_Sensors_V.1.zip). The file includes a PCB design (Figure below) that you can use as is or modify if you like.
After assembling, the board looks like pictures below:
Arduino Sketch
I have discussed the Arduino sketch in another post.
Comments