Sensor npk , datasheet

What are the values ​​that can be extracted from the datasheet of the npk sensor that is used in the Arduino code in the pictures attached to this topic,


Pictures of a warped document are not readable. Please provide a link the data sheet so we can see it for ourselves.
What data are you interested in and why?

first result for an internet search with the above keyword.

that should get you going IFF you are willing to do spend something experimenting... :upside_down_face:

Why do you ask?

It's an NPK sensor - the clue is in the name. Sure there are other parameters, but unless you know what you are doing, they are best left alone.

Hi @tahseenalshujiri .
As its name implies, it is supposed to measure the content of nitrogen, phosphorus and potassium in the soil through conductivity. (not very exact really).
There are versions that also measure temperature and/or EC.
I attached a manual of mine that could be the same as yours or at least it gives you more context
NPK type manual.pdf (454,8 KB)

I need the data that is used with the npk sensor code to read the sensor values with the arduino
111.pdf (‏3.5 ‏م.ب)
2222.pdf (‏3.3 ‏م.ب)

Thank you very much, but this datasheet belongs to another company

I want to extract values from a data sheet similar to this formula to include them in the code
:point_down:

//const byte code[]= {0x01, 0x03, 0x00, 0x1e, 0x00, 0x03, 0x65, 0xCD};
const byte nitro[] = {0x01,0x03, 0x00, 0x1e, 0x00, 0x01, 0xe4, 0x0c};
const byte phos[] = {0x01,0x03, 0x00, 0x1f, 0x00, 0x01, 0xb5, 0xcc};
const byte pota[] = {0x01,0x03, 0x00, 0x20, 0x00, 0x01, 0x85, 0xc0};
 

The NPK sensor that is seen in these forums usually has an RS485 interface and is a Modbus slave device.

Those arrays each hold the bytes to be transmitted to get an NPK sensor to report back one of its parameters - either Nitrogen, Phosphorus or Potassium. The byte sequences in the arrays are the same as what would be sent by a Modbus master device.

However, I would advise against using the code from other web sites (and various postings in this forum) that uses this technique of canned Modbus messages as the way the serial comms is handled leads to the sensor readings getting mixed up. It's unfortunate that the websites all copy off each other and they all include the software fault.

You should really use the Arduino ModbusMaster library to handle the comms as it will take care of all the low level work for you.

However all this is academic if you do not have the actual user manual for your specific sensor.

The NPK sensors I see in this forum all seem to have a slave address of 1, but the registers that hold the N, P & K values do vary. Also some NPK sensors use a baud rate of 4800 baud instead of 9600 baud.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.