Soil temperature monitoring device for radiation budget

Published by NGPrakash in the blog NGPrakash's blog. Views: 330


Introduction
Soil temperature is simply the measurement of the warmth in the soil. Ideal soil temperatures for planting most plants are 65 to 75 F (18 to 24 C). Nighttime and daytime soil temperatures are both important. The soil layer of the earth is critical in maintaining plant life, offering mechanical support, and supplying water and nutrients. The radiation budget is also calculated by recording the soil temperature at different levels from surface to 2 meter depth. The soil temperature can be measured using “MAX31865 Ev Kit” for seasonal and daily change which will help for the farmers to choose the appropriate crop, meteorologists for calculating the radiation budget. MAX31865 EV kit has on-board ADC for RTD sensor and software GUI to monitor the data. This device is easy to install and store the data in personal computer, useful in cold and warm countries to study about the soil temperature and earth warming effects.

BOM
List of parts required for project are:
  1. MAX31865 Ev Kit.
  2. RTD temperature sensor with 1Kohms.
  3. Extension wire of length 2 meters.
SCHEMATICS:
The schematic diagram to record data from the sensor and convert it to digital data using on-board 16-bit ADC in max31865 chip.

[​IMG]

Figure 1: Schematic diagram for RTD connected to MAX31865 chip.
[​IMG]

Figure 2: Schematic diagram for SPI-to-USB converter circuit.

Procedure to install and connected hardware to GUI for MAX31865 Evaluation Kit:

The RTD sensor is connected to the MAX31865 Ev Kit, Follow the steps below to verify board operation:
1) Verify the two jumper wires (included) are properly secured in the terminal block in accordance with the 2-wire RTD Sensor Connector diagram on the PCB’s silkscreen.
2) Verify the 1kΩ resistor is properly secured in the terminal block connecting the RTDIN+ terminal to the RTDIN- terminal.
3) Set the EV kit hardware on a nonconductive surface that ensures that nothing on the PCB gets shorted to the workspace.
4) Prior to starting the GUI, connect the EV kit hardware to a PC using the supplied mini-USB cable, or equivalent. The POWER LED (D20) should be green and the COM LED (D21) should be red and slowly flash orange.
5) Windows should automatically begin installing the necessary device driver. The USB interface of the EV kit hardware is configured as a HID device and therefore does not require a unique/custom device driver. Once the driver installation is complete, a Windows message appears near the System Icon
menu indicating that the hardware is ready to use. Do not attempt to run the GUI prior to this message. If you try to run the GUI prior to this message, close the application and restart it once the driver installation is complete. On some versions of Windows, administrator privileges may be required to install the USB device.
6) Once the device driver installation is complete, visit www.maximintegrated.com/MAX31865evkit to download the latest version of the EV kit software,
MAX31865EVKitSoftwareInstall.ZIP. Save the EV kit software to a temporary folder.
7) Open the .ZIP file and double click the .EXE file to run the installer. A message box stating “The publisher could not be verified. Are you sure you want to run this software?” may appear. If so, click Yes.
8) The installer GUI appears. Click Next and then Install. Once complete, click Close.
9) Go to Start >> All Programs. Look for the MAX31865EVKitSoftware folder and click on MAX31865EVKitSoftware.EXE inside the folder.
10) When the GUI appears, the text below the Maxim Integrated logo should indicate that the EV kit hardware is connected. The COM LED (D21) turns off and flashes red when communication occurs.[​IMG]
Figure: GUI for the MAX31865 Ev Kit to record and save the temperature data.

Source code for the MAX31865 chip to monitor and record temperature data:

/****************************************************************************
MAX31865 Evaluation Kit program for Soil temperature monitoring.
****************************************************************************/
#include <SPI.h>
#include <MAX31865.h>
#define RTD_CS_PIN 10
MAX31865_RTD rtd( MAX31865_RTD::RTD_PT100, RTD_CS_PIN );
void setup()
{
Serial.begin( 115200 );
/* Initialize SPI communication. */
SPI.begin( );
SPI.setClockDivider( SPI_CLOCK_DIV16 );
SPI.setDataMode( SPI_MODE3 );
/* Allow the MAX31865 to warm up. */
delay( 100 );
rtd.configure( true, true, false, true, MAX31865_FAULT_DETECTION_NONE,
true, true, 0x0000, 0x7fff );
}
void loop()
{
rtd.read_all( );
if( rtd.status( ) == 0 )
{
double temperature = rtd.temperature( );
Serial.print( " T = ");
Serial.print( temperature, 1 );
Serial.println(" deg C" );
}
else
{
Serial.print( "RTD fault register: " );
Serial.print( rtd.status( ) );
Serial.print( ": " );
if( rtd.status( ) & MAX31865_FAULT_HIGH_THRESHOLD )
{
Serial.println( "RTD high threshold exceeded" );
}
else if( rtd.status( ) & MAX31865_FAULT_LOW_THRESHOLD )
{
Serial.println( "RTD low threshold exceeded" );
}
else if( rtd.status( ) & MAX31865_FAULT_REFIN )
{
Serial.println( "REFIN- > 0.85 x V_BIAS" );
}
else if( rtd.status( ) & MAX31865_FAULT_REFIN_FORCE )
{
Serial.println( "REFIN- < 0.85 x V_BIAS, FORCE- open" );
}
else if( rtd.status( ) & MAX31865_FAULT_RTDIN_FORCE )
{
Serial.println( "RTDIN- < 0.85 x V_BIAS, FORCE- open" );
}
else if( rtd.status( ) & MAX31865_FAULT_VOLTAGE )
{
Serial.println( "Overvoltage or Undervoltage fault occured");
}
else
{
Serial.println( "Fault exist; Please check connection" );
}
}
delay( 3000 );
}
Details of more source code can be cloned from the URL: https://github.com/hallard/arduino-max31865

Instructions
  1. Initially connect the 2-wire RTD sensor to the RTD port by replacing the 1kohm resistor in the Evaluation Kit.
  2. Plug-in the USB cable to the PC and evaluation kit then open the GUI software which shows the EV kit hardware is connected.
  3. ON the conversion mode, VBIAS, set to 2-wire RTD connection if red bubble in fault status indicates their is open connection in the RTD sensor or in-appropriate sensor connected.
  4. If all is set then start to measure the data from the chosen environment.
  5. In the current project we are going to measure the Soil temperature to protect plants from starving.
  6. We placed the RTD temperature Sensor in soil and recorded the data for the entire day to identify the evaporation process.
  7. The data recordings were saved in separate file to do further analysis.

Data plot:
Soil moisture temperature.png
As the soil temperature falls down when the water is added to the soil.

Video
The video shows that the measurement carried out to record temperature of soil from the plant pot.


Improvement required for best utilization:

  1. The data should be recorded from different place of soil to check if the temperature is radiated uniform or not for this multiple observation to be carried out with multiple sensors on same board.
  2. The data should be saved with different name before start of the process.
  3. If WiFi/ Bluetooth connectivity is available then it is easy for the user to utilize the kit for remote accessing the data from the measuring environment.
  4. An android app for smartphone will be a handy and helps to share the data and monitor in real-time.
Conclusion
The temperature of the soil is measured because it will given an idea when and what quantity of water to be supplied for plant to protect from starving. If the roots are exposed to heat it causes the crop to dry. So with the help of MAX31865 evaluation kit it is easy to monitor the soil temperature and record the data in the user specified file name. This helps the farmers to protect their crop from starving so that everyone get food.
You need to be logged in to comment