top of page

DIY Reader with 128x64 SSD1306 OLED for APAS T1 Soil Moisture Sensor (Part 1: Electronic Hardware)

Updated: Apr 25

In this post, I'm going to explain how you can build a handheld reader that can take soil moisture and temperature measurements using the APAS T1 sensor and display the results on an OLDE display. To give you an idea, this hardware will be able to support the following functions:

  1. Take moisture and temperature readings and display the values.

  2. Apply calibration coefficients and display the results in a scale of 0 to 100%.

  3. Carry out automatic temperature-compensation of moisture readings, so the readings don't change with temperature fluctuations.

  4. Measure battery voltage and display the remaining charge in %.

  5. You can charge the battery using any standard USB charger that is used to charge your smartphone or tablet.


I will provide schematics and list of required components, so you could assemble the reader on a breadboard. I will also share files for a PCB breakout board that you could solder all the components on and take the project to a higher level. I will discuss the Arduino sketch in detail in a separate post. You could design and print your own little 3D box for the reader and make it look professional, or just go to this post and print out the 3D enclosure design that I have shared! :)


Note 1: You can connect the HITA E0 electrical conductivity sensor or the INSHU LWS leaf wetness sensor to the same reader described in this post, but you will need different firmware (Arduino sketch) for them. In the near future, I will discuss the Arduino sketch for each of these sensors in a separate post. Please stay tuned!


Note 2: If you are interested in the assembled reader described in this post, please contact us directly. The assembled board comes preloaded with the same firmware as our professional AVAN CT reader and therefore includes its features and functionalities. If you prefer something professional, then we have a variety of options for you. Just visit our products page to learn more.


What You Need

Here's what you need to get started:

  1. Adafruit M0 Basic Proto or Adafruit Feather M0 Adalogger (based on ATSAMD21 Cortex M0)

  2. ADS1115 16-Bit ADC

  3. Adafruit MiniBoost

  4. OLED Display (128X64 Pixel)

  5. Li-ion battery (3.7 V, 500 mA)

  6. 10K resistor (x3)

  7. 100K resistor (x2)

  8. 2K2 resistor (x1)

  9. 100nF ceramic capacitor (x2)

  10. 100uF electrolytic capacitor (x1)

  11. Male Header (4-pin)

  12. Jumper wires

  13. 3.5-mm 4-pole stereo jack


Feather M0 from Adafruit is designed around the ATSAMD21G18 ARM Cortex M0 processor. It is clocked at 48 MHz, works at 3.3V logic and is the same chip used in the Arduino Zero. I love this board because of its incredible resources and small form factor.


The Feather M0 has 12-bit analog inputs (ADC), which can be used to read the analog soil moisture input from the APAS T1. To achieve higher precision and accuracy, however, we are going to use the ADS1115 16-bit ADC. 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.


Important Note: I strongly recommend that you buy the li-ion battery only from Adafruit (link provided). Most third-party sellers carry li-ion batteries that do not match Adafruit feather board in terms of polarity. This might damage your feather board permanently.



Wiring

The wiring diagram and schematic below show how to connect the ADC, sensor and other components to the Adafruit M0. In the schematic, you will find an extra board, which is not listed above. It's a breakout board for the H2U21D relative humidity and temperature sensor that we're not going to use now. You have the option of keeping it here and do the extra programming on your own, or wait a bit for me to do something about it in a later post!



Connecting APAS T1 Sensor to Breadboard

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 a bread or breakout 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). The first option is not recommended because it would make it impossible to plug the sensor into any of DurUntash professional readers, in case you have one of those.


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.


To connect the sensor to a breadboard, I'm going to solder wires from a stereo phone jack with 4-conductor cable to a 4-pin male header. This is a good way to extend the length of the cable if you needed longer. This is shown in pictures below:






Breakout Board

To make your life easier, :), I have designed and fully tested a breakout board that you can use to solder all the components on. To solder the feather and other daughter boards directly to the breakout board, you first need to solder in their pin headers. If this is too much, you can solder female pin headers (sockets) to the breakout board first and insert the boards into them. Do whatever you feel more comfortable with, but perhaps you'll end up with a smaller and more reliable overall package if you solder them directly to the breakout board.



After assembling, the board looks like pictures below:

Sensor to computer interface for DurUntash Sensors
Sensor to computer interface for DurUntash Sensors

Download

I have put the Fritzing file for the design that was discussed here on GitHub. The file includes a PCB design that you can use as is or modify if you like.



0 comments
bottom of page