Arduino UNO Analog Input: Water Level Sensor

Hello,

I'm trying to make a feedback loop using a water level sensor. I want to display the analog input in milimeters (mm). So what I understand is the following:

  1. Arduino ADC displays values from 0 to 1023 correspondig to 0-5V.

However, when I inmerse the sensor to the max point (30mm aprox) it only returns values up to 700 max which is around 3V, right?

I think that I should set up the max input value (700) to the max water level of 30mm and convert the signal into mm by using a y=ax+b linear equation?? Not really sure how to convert ADC digital output into milimeters.

Thank you.

I would use the map function

Hi, @benyaminsoldier
Welcome to the forum.

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Can you please post your code?
Can you please post a link to spec/data of your sensor?

What model Arduino are you using?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

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