Hello. It would help formulate an answer to your enquiry if you gave details on the intended application.
There are a variety of water level sensors available, from hydrostatic (pressure) sensors to floats, to radar and ultrasonic units. Each has specific advantages/disadvantages and are thus suitable for different applications (tanks, reservoirs, open channels etc). Sensor manufacturers offer a range of interfaces, from analogue voltage to current loop to SDI-12 and MODBUS. Which you use will depend on the accuracy you need and the design effort you put in. Analogue sensors are simpler to interface, as they can go directly in to an analogue to digital converter on a development board; whereas SDI-12 and MODBUS require you to write code (or use a library) to handle the serial data (libraries are available for most protocols).
Counter sensors are normally used for things like rain or flow measurement. They are the easiest to interface to as they can go to a digital input on your MCU. But you need to be able to code for interrupts to get them to work well in low power environments.
But regardless of what type of sensor you use, you need to make a decision on how you process the sensor readings. A voltage of 2.323V may correspond to a level of 6.56m; you have to decide whether you will transmit the raw or converted reading. Do you need to add a time stamp, or will you use the uplink time from the Gateway to know when the reading was taken? You then have to decide on a format to use when uplinking the data. Will you only every have one reading or will you have situations where a Node will have multiple redings to take. In which case you need a way to identify and separate them. To make your life easier, you can adopt one of the formats which are in widespread use, rather than coming up with your own. If you adopt an existing format, you can then use the CODEC which has already been written to recover the readings. Spend some time reading the infromation on the various packet formats and then choose one which you feel you can code for. Then apply the CODEC in Chirpstack.
Do you need to add a time stamp, or will you use the uplink time from the Gateway to know when the reading was taken?
I think the gateway will be enough.
Will you only every have one reading or will you have situations where a Node will have multiple redings to take.
In the scenario I’m testing, all readings happen asynchronously.
To make your life easier, you can adopt one of the formats which are in widespread use, rather than coming up with your own.
I’d like to do that
If you adopt an existing format, you can then use the CODEC which has already been written to recover the readings. Spend some time reading the infromation on the various packet formats and then choose one which you feel you can code for. Then apply the CODEC in Chirpstack.
Do you think this would work as a CODEC for that Sensor?