i have a 4-20mamp water level sensor. it has 3 wire 1 is gnd other is vcc(24v) and 3rd is signal. and i want to interface it with arduino mega.
it has range of 0-15m
and accuracy is 2mm
so i want to help in connection and analog signal to distance conversion formula. actually help me in to display accurate distance on lcd
A Mega has a 10-bit A/D, which means 2^10= 1024 steps.
15 meters in 2mm steps would need 7500 steps, or at least a 13-bit A/D.
To get that resolution, you must use an external A/D, like the 16-bit ADS1115 (15-bit single-ended).
Try Googling “Arduino 4-20mA ADS1115” for many options.
A Mega is overkill. An Uno or smaller form factor Arduino would be enough to read the sensor and drive the LCD.
Leo…
thanku so much.....
can i use a 250ohm resistor to convert 4-20mamp signal in 1-5v analog signal and after that ADS1115 16 bit analog to digital converter to convert that signal in digital form.
An ADS1115 has several full scale ranges.
If you're using this board with a 5volt Arduino (Mega), then you can use the 4.096volt PGA 1 scale.
Max resolution of 4-20mA will be achieved with a 200 ohm sense resistor (4.096volt / 0.02A).
For a 3.3volt Arduino, a lower scale must be used, like the 2.048volt PGA2. That scale calculates to a 100 ohm sense resistor. Post#10 here shows the diagram, with some protection.
Leo..