Error regarding Highly Sensitive Water Sensor

I am using Highly Sensitive Water Sensor in my project . It has three pins i.e. analog output pin, Vcc, GND.
I have connected the analog pin of sensor to the A0 pin of Bolt. But after running the program it is not showing the continuous increasing values as water level increases. It is showing values like 0 or 1 or some random values when sensor is in not contact with water and as soon as water touches the sensor it directly show 1024 value.
So plz tell me how to resolve this issue

Hi @poorvapwadkar ,
Can you please share the model/name of the sensor you are using? Does the sensor work at 5V or 3.3V?

Hii @raghav.srivastava ,
I am using the Arduino M263 rain water Level Sensor which works at 5V

@poorvapwadkar
The pin A0 on the Bolt can only sense voltages between 0V - 1V and hence you will need to use a voltage divider circuit on the output pin of the sensor to drop the output level range from 0V - 5V to 0V - 1V.

You may use this website to calculate the values for the voltage divider.

And regarding the random values it is showing when sensor is not in contact with water, you may connect a large value resistor(like 1M ohm or 10K ohm) between A0 (parallel to the sensor) and GND.

If you need any further assistance do let me know.

@raghav.srivastava ,
I will try the above steps…
Also I tried by connecting analog signal of sensor directly to the digital pin of bolt and then after running the program it always gives 0 value when water is not in contact with sensor and gives 1 value when sensor is in water. Logically are these connections possible ??

@poorvapwadkar yes it is. If a voltage is present on the digital pin above a certain threshold, it will read 1 and if it is below a certain threshold(close to 0V), it will show 0.

Thank you so much @raghav.srivastava for clearing my doubts.

@poorvapwadkar You’re most welcome. Do let me know if you have any further queries.