Dear All,
Issues
I'm trying to read the output value from Ultrasonic flow meter using Arduino by (4-20)ma current output communication.
output value = flow rate and cumulative volume of water.
Flowmeter datasheet is attached below.
So Far Tried
- I have attached my schematic diagram of arduino and flow meter connection.
const int analogInPin = A0;
int sensorValue = 0;
int outputValue = 0;
void setup() {
Serial.begin(9600);
}
void loop(){
sensorValue = analogRead(analogInPin);
outputValue = map(sensorValue, 100, 1023, 0, 1000);
Serial.print("Flow value in current");
Serial.println(outputValue);
delay(1000);
}
Output is
Flow value in current255
Flow value in current255
Flow value in current254
Flow value in current249
Flow value in current247
Flow value in current244
Flow value in current247
Flow value in current245
Flow value in current244
Flow value in current244
Flow value in current245
Flow value in current244
Flow value in current244
Flow value in current242
Flow value in current243
I can able to see the variation in the flow rate when the flow is increased and decreased.
what i want to know
How can i map same value that i am getting in the digital meter, also what needs to be done in order to get the volume and flow rate. Please let me know if there is any calculation
Thanks
flowmeter_datasheet_compressed.pdf (1.78 MB)