Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

sensor: RS485 soil NPK

Thomas Gumbricht bio photo By Thomas Gumbricht

Introduction

With the SEEED rs485 + ModBus soil moisture and salinity module operating properly I started to look for a 3.3V to 5V operated RS485 MODBUS soil NPK snesor with stainless steel pins. I had seen those passing by when exploring the SEEED soil moisture module.

Versions

The MODBUS Soil-NPK sensor is not available (January 2023) from any of the usual suspects supplying Arduino compatible sensors. As was the case with the MODBUS Soil-MTEC sensor, the majority of the MODBUS Soil-NPK sensors offered are for 12-24 V power supply. But in late 2022 versions that can be powered from 5-30 V turned up on Aliexpress. I ordered mine in early December 2022 from Liyuan electroncis at $43, the price when updating this (late January 2023) is down to $32.

MODBUS rs485 soil NPK sensor

There is a plethora of sensors with similar robust design including 2 or more stainless steel pins to push into the soil and that operate using the MODBUS rs485 connection solution. The only one available in Sweden, and from one the recognised producers of Arduino accessories is the Soil Moisture sensors. There are, however, lots of producer of MODBUS rs485 sensors for other soil properties, including:

  • pH,
  • EC,
  • Nitrogen, Phosphorus and Potassium (NPK),
  • pH + EC,
  • pH + NPK,
  • pH + NPK + soil moisture,
  • etc.

To find out what is available, the easiest is to go to Alibaba.com, and search for “MODBUS rs485 soil”. You will get hundreds of results. The problem is that the vast majority will be for 12V to 24V power supply, which is too cumbersome to acheive for xSpectre’s spectrometer. For the spectrometer I need a sensor that can be driven by 3.3V to 5V.

Setup

the wires and wiring of the MODBUS Soil-NPK is identical to that of the MODBUS Soil-MTEC sensor. The best summary I found is from Faranaux Electronics.

Resources

google search string “modbus function code arduino softwareserial”

Youtube: Fun and Easy Modbus RTU Protocol - RS485

Arduino: ModBus implementation (Arduino IDE sketch with explanation comments for function call etc, scroll down to see the edited code after comments.)

GitHub repo: Modbus for Arduino (FOR RS 232) (GitHub repo)

GitHub: Arduino Library: SerialModbus - too esoteric at the moment.

Lots of MODBUS libraries in a single repo https://github.com/IndustrialShields/arduino-Tools40

Appendix

List of NPK sensors avalaible November 2022

lorawan 7 in 1 sensor 5-30V

Ebay Soil Npk sensor tester environmental fertility detector 4-20ma rs485 0-5v 0-10v)

https://www.amazon.com/Taidacent-Detector-Agricultural-Phosphorus-Potassium/dp/B08MXXSP59?dchild=1&keywords=npk%2Bsensor&qid=1615207116&sr=8-1&linkCode=sl1&tag=electron0f21e-20&linkId=f0b29b991e36fecb831aa09a0050bb5d&language=en_US&ref_=as_li_ss_tl&th=1 BUT 12-24 volt

https://how2electronics.com/measure-soil-nutrient-using-arduino-soil-npk-sensor/, also 9-12 volt

JXCT has a series of rs485/MODBUS stainless steel pinned sensors. On an Indian site, the

RoboticsDNA in India advertises an MODBUS rs485 soil NPK sensor that is listed as operating from 5V. They also have a 7 in 1 Soil Sensor that is listed as operating at 5V.

RoboticsDNA also has a sturdy soil moisture probe at 3.3 to 5V that could be interesting.

On Aliexpress I, finally, also found a MODBUS rs485 soil NPK sensor operating at 5V. You can also try searching Aliexpress, again using the string “MODBUS rs485 soil” or “sem225”.

The producer ComWinTop has a large range of MODBUS rs485 soil sensors on ALiexpress. Some operate on 5-30V. The sensors offered includes an NPK sensor with rs485 interface and operating from 5-30V.

On Aliexpress I also found a 3.3-30V soil moisture sensor but has the same price as the one offered by SEEED technology.