
Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual)
In stock

Order before 12.00PM
Customer Reviews
The Soil NPK Sensor (3 in 1) is a portable, high-precision agricultural sensor designed to measure key soil nutrients—Nitrogen (N), Phosphorus (P), and Potassium (K)—quickly and accurately. Supplied by BDTronics, this sensor is ideal for farmers, agronomists, and researchers in Bangladesh who want to monitor soil fertility and optimize fertilizer application. Using Modbus RS485 communication, the sensor provides reliable real-time data and is compatible with Arduino and other microcontroller systems.
Unlike traditional spectral analysis methods, which may be only 60–70% accurate, this sensor delivers highly accurate readings in a fraction of the time. Its compact design and stainless steel probe allow easy insertion into soil, making soil nutrient analysis fast, efficient, and convenient.
(This sensor comes with English manual and sample code)
Features:
-
Measures Nitrogen (N), Phosphorus (P), and Potassium (K) in soil
-
Portable and compact design for field use and easy transport
-
Fast response time: less than 1 second for nutrient measurements
-
High measurement accuracy for reliable soil fertility analysis
-
Durable stainless steel probe for long-term use
-
IP68 rated for long-term immersion in water
-
Supports RS485, 4–20mA, 0–5V, and 0–10V outputs
-
Easy integration with Arduino or microcontroller systems
-
Suitable for agricultural fields, research plots, and greenhouses
-
Efficient data transmission and high reliability
Specifications:
Brand: ComWinTop (CWT)
Protection: IP68 Waterproof
Nitrogen / Phosphorus / Potassium:
-
Measuring Range: 1–1999 mg/kg (mg/L)
-
Resolution: 1 mg/kg (mg/L)
-
Response Time: <1s
Basic Parameters:
-
Power Supply: DC 5–30V
-
Max Power Consumption: 0.5W @ 24V DC
-
Protection Class: IP68, long-term water immersion
-
Cable Length: Default 2m (customizable)
-
Operating Environment: -40℃ to 80℃
-
Dimensions: 45 × 15 × 123 mm
-
Output: RS485 / 4–20mA / 0–5V / 0–10V
Functions and Features:
-
Compact design ensures easy carrying, installation, and maintenance
-
Stainless steel probe ensures long service life
-
Can be used in soil-less or irregular soil areas
-
High measurement accuracy and reliable performance
-
Fast response and efficient data transmission for real-time monitoring
Applications:
-
Agricultural soil fertility analysis
-
Fertilizer recommendation and optimization
-
Smart farming and precision agriculture projects
-
Research and experimental soil studies
-
Integration with Arduino or automated monitoring systems
-
Soil nutrient monitoring in gardens, farms, and plantations
soil npk sensor, 3 in 1 npk sensor, rs485 soil fertility sensor, nitrogen phosphorus potassium sensor, agricultural soil monitor bangladesh, portable soil nutrient sensor, bdtronics soil sensor, npk sensor arduino, high precision soil sensor, real-time soil fertility measurement, rs485 modbus soil sensor, field soil analysis sensor, soil nutrient monitoring device, smart farming sensor, durable stainless steel probe sensor, quick response npk sensor
NPK-S Sensor Arduino UNO Integration Tutorial
This tutorial shows you how to integrate the NPK-S (RS485) soil sensor with Arduino UNO to read Nitrogen, Phosphorus, and Potassium levels from soil.
What You'll Need
Hardware
- Arduino UNO
- NPK-S Sensor (RS485 type)
- RS485 to TTL converter module (MAX485 or similar)
- Breadboard and jumper wires
- 5V power supply (or use Arduino's 5V output)
Software
- Arduino IDE
- SoftwareSerial library (included in Arduino IDE)
Sensor Specifications
| Parameter | Value |
|---|---|
| Measuring Range | 1-1999 mg/kg (mg/L) |
| Resolution | 1 mg/kg (mg/L) |
| Response Time | <1 second |
| Power Supply | DC 4.5-30V |
| Power Consumption | 0.5W @ 24V |
| Communication | RS485 (Modbus RTU) |
| Default Baud Rate | 4800, 8N1 |
| Default Address | 1 |
Wiring Diagram
NPK-S Sensor Cable Colors
- Brown: Power + (5V from Arduino or external supply)
- Black: Power - (GND)
- Yellow: RS485 A+
- Blue: RS485 B-
Connections
NPK-S Sensor MAX485 Module Arduino UNO
─────────────────────────────────────────────────────────
Brown (Power+) ───> VCC (5V) ───> 5V
Black (Power-) ───> GND ───> GND
Yellow (A+) ───> A
Blue (B-) ───> B
RO ───> Pin 10 (RX)
DI ───> Pin 11 (TX)
DE & RE (tied) ───> Pin 8 (Control)
VCC ───> 5V
GND ───> GND
Note: Connect DE and RE pins together on the MAX485 module and connect to Pin 8 for transmit/receive control.
Communication Protocol
The sensor uses Modbus RTU protocol with these parameters:
- Baud Rate: 4800
- Data Bits: 8
- Parity: None
- Stop Bits: 1
- Function Code: 0x03 (Read Holding Registers)
Register Addresses
- Nitrogen: 0x001E (30 decimal)
- Phosphorus: 0x001F (31 decimal)
- Potassium: 0x0020 (32 decimal)
Arduino Code
#include <SoftwareSerial.h>
// RS485 control pin
#define DE_RE_PIN 8
// Software Serial pins for RS485 communication
#define RX_PIN 10
#define TX_PIN 11
// Create software serial object
SoftwareSerial modbus(RX_PIN, TX_PIN);
// Sensor address
const byte sensorAddress = 0x01;
// CRC calculation for Modbus RTU
uint16_t calculateCRC(uint8_t *data, uint8_t length) {
uint16_t crc = 0xFFFF;
for (uint8_t i = 0; i < length; i++) {
crc ^= data[i];
for (uint8_t j = 0; j < 8; j++) {
if (crc & 0x0001) {
crc >>= 1;
crc ^= 0xA001;
} else {
crc >>= 1;
}
}
}
return crc;
}
// Read NPK values from sensor
bool readNPK(uint16_t &nitrogen, uint16_t &phosphorus, uint16_t &potassium) {
// Modbus request frame to read 3 registers starting from 0x001E
uint8_t request[] = {
0x01, // Slave address
0x03, // Function code (Read Holding Registers)
0x00, 0x1E, // Starting address (0x001E = Nitrogen)
0x00, 0x03, // Number of registers to read (3)
0x00, 0x00 // CRC (will be calculated)
};
// Calculate and add CRC
uint16_t crc = calculateCRC(request, 6);
request[6] = crc & 0xFF; // CRC Low
request[7] = (crc >> 8) & 0xFF; // CRC High
// Set to transmit mode
digitalWrite(DE_RE_PIN, HIGH);
delay(10);
// Send request
modbus.write(request, 8);
modbus.flush();
// Set to receive mode
digitalWrite(DE_RE_PIN, LOW);
// Wait for response
unsigned long startTime = millis();
while (modbus.available() < 11 && millis() - startTime < 1000) {
// Wait for response with 1 second timeout
}
// Check if we received enough bytes
if (modbus.available() < 11) {
Serial.println("Error: Timeout waiting for response");
return false;
}
// Read response
uint8_t response[11];
for (int i = 0; i < 11; i++) {
response[i] = modbus.read();
}
// Verify response
if (response[0] != sensorAddress || response[1] != 0x03) {
Serial.println("Error: Invalid response");
return false;
}
// Verify CRC
uint16_t receivedCRC = response[9] | (response[10] << 8);
uint16_t calculatedCRC = calculateCRC(response, 9);
if (receivedCRC != calculatedCRC) {
Serial.println("Error: CRC mismatch");
return false;
}
// Extract NPK values (response bytes 3-8 contain the data)
nitrogen = (response[3] << 8) | response[4];
phosphorus = (response[5] << 8) | response[6];
potassium = (response[7] << 8) | response[8];
return true;
}
void setup() {
// Initialize serial communication with PC
Serial.begin(9600);
Serial.println("NPK-S Sensor Reader");
Serial.println("==================");
// Initialize RS485 control pin
pinMode(DE_RE_PIN, OUTPUT);
digitalWrite(DE_RE_PIN, LOW); // Start in receive mode
// Initialize Modbus communication
modbus.begin(4800);
delay(1000);
}
void loop() {
uint16_t nitrogen, phosphorus, potassium;
Serial.println("\n--- Reading NPK Sensor ---");
if (readNPK(nitrogen, phosphorus, potassium)) {
Serial.print("Nitrogen (N): ");
Serial.print(nitrogen);
Serial.println(" mg/kg");
Serial.print("Phosphorus (P): ");
Serial.print(phosphorus);
Serial.println(" mg/kg");
Serial.print("Potassium (K): ");
Serial.print(potassium);
Serial.println(" mg/kg");
} else {
Serial.println("Failed to read sensor data");
}
// Wait 5 seconds before next reading
delay(5000);
}
How It Works
-
Initialization: The Arduino sets up serial communication for debugging (9600 baud) and Modbus communication with the sensor (4800 baud).
-
Request Frame: To read NPK values, the Arduino sends a Modbus RTU request:
- Address: 0x01 (sensor address)
- Function: 0x03 (read holding registers)
- Start Register: 0x001E (Nitrogen)
- Number of Registers: 3 (N, P, K)
- CRC: Calculated checksum
-
Response Handling: The sensor responds with 11 bytes containing:
- Address and function code (2 bytes)
- Byte count (1 byte)
- NPK data (6 bytes: 2 each for N, P, K)
- CRC checksum (2 bytes)
-
Data Extraction: Values are extracted from the response and displayed in mg/kg.
Advanced Features
Changing Sensor Address
To change the sensor address from 1 to 2:
uint8_t setAddress[] = {0x01, 0x06, 0x07, 0xD0, 0x00, 0x02, 0x08, 0x86};
Changing Baud Rate
To set baud rate to 9600:
uint8_t setBaud[] = {0x01, 0x06, 0x07, 0xD1, 0x00, 0x02, 0x59, 0x46};
Expected Output
When running successfully, you'll see output like this in the Serial Monitor:
NPK-S Sensor Reader
==================
--- Reading NPK Sensor ---
Nitrogen (N): 32 mg/kg
Phosphorus (P): 37 mg/kg
Potassium (K): 48 mg/kg
--- Reading NPK Sensor ---
Nitrogen (N): 35 mg/kg
Phosphorus (P): 38 mg/kg
Potassium (K): 50 mg/kg
Request Stock
Recently viewed products
You might also be interested in...
Customers who bought this also bought...
General Questions
-
What is the latest price of the Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) in Bangladesh?
The latest price of Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) in Bangladesh is Special Price BDT 11,799.00 Regular Price BDT 12,500.00 . You can buy the Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) at the best price on BDTronics.com or contact us via phone.
-
Where to buy Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) in Bangladesh?
You can buy Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) online by ordering on BDTronics.com or directly collect by visiting our store in person. BDTronics is a trusted provider of high-quality electronics, 3D printers, solar systems, and robotics parts. We offer fast shipping across the country via courier service.
-
What are the delivery options of Soil NPK Sensor IP68 (3 in 1) RS485 Modbus for Agricultural (English Manual) in Bangladesh?
We provide home delivery service all over Bangladesh. We support Cash on Delivery, Online Bank Transfer, bKash and Credit Card (Visa/ MasterCard/ Amex) payment solutions. The delivery time usually takes 1-2 days inside Dhaka and 2-4 days outside Dhaka.
