Flow Sensor Setup - Reading Input Help

Hey!

I've been trying to create a setup for measuring parameters of a pump. In the setup I have a Honeywell AWM720P1 mass flow sensor, with a 9V power supply to measure the mass flow rate. The sensor has a direct relationship between the output voltage and flow rate, meaning I should only need to convert the analog signal to voltage (then flow). I understand I have to use a voltage divider if I want to read above 5V on an Arduino Uno. However, I am having problems measuring the sensor output with the Arduino.
The sensor requires a supply voltage, ground, and output voltage pins. With the DC power supply's 9V/ground plugged into the sensor, I have the output voltage wire connected to the Arduino's A0 analog input pin. The sample code I used is below:

int sensorpin=A0;
float sensorValue = 0;
void setup() {
pinMode(sensorpin,INPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(sensorpin);
//sensorValue = (sensorValue/1023.)*9;
Serial.println(sensorValue);
delay(100);
}

Using this (and other sample codes similar to this) with the sensor at zero flow rate (voltage should read close to 1) I always am reading some pulse signal, as seen below:


For some reason, a pulse is generated. I have tried changing the input pin (to both analog and PWM), as well as running the code on other Arduino Unos. The pulse measured may vary in amplitude and phase dependent on the pin used, but a pulse is always present. Even with just a wire plugged in (while other end is disconnected), a pulse is read. The only time I can get rid of the pulse is when plugging the input directly into the Arduino ground. The pulse also does not respond to any changes in flow rate. I have eliminated the possibility of the problem being with the sensor, as with a direct multimeter measurement I confirmed the correct zero flow voltage from the output voltage sensor pin in addition to a correct response with increased flow rates. Is there anything apparent I could be overlooking in attempting to read the output voltage? Thank you in advance for the help!

You are using pumped air to test the sensor and wonder why the result shows the pumped air pulses. Is that right?

Try increasing the serial baud rate the the maximum your PC can handle.

Hi, @prdly
Welcome to the forum.

Have you got the sensors 9V power supply gnd connected to the UNO gnd, so you have a reference for the UNO analog input?

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:

I second that. Without having connected the GND of the 9V sensor-powersupply to the GND of the arduino your analogINput-pin is so called "floating". The input-resistance of the analog-input pins is high. This means any kind of wire even 2 cm short act as an antenna that catches up the overall present electromagitic noise and this electromagnetic noise can cause the analog to digital converter to read voltages above zero.

it might be that the output-signal of your sensor is a PWM-signal where dutycycle represents the mass-flow. You would have to use a RC-low-pass-filter to transform the PWM-signal into a flat DC-voltage.

Do you have a digital multimeter that can measure frequency and dutycycle?
So you should do such a measuring.
As long as connect only the red probe-wire to the sensoroutput and leave the black probe laying around connected to nothing you can't measure it.

You will have to connect the black probe-wire of the digital multimeter to ground for measuring.
The same principle applies to the analog input of the arduino. GND of the sensor must be connected to the GND of the arduino to create a common reference-point.

best regards Stefan

Flow meters I've worked with so far produce pulses as their output; count pulses for flow rate. Typical about 50% duty cycle.The graph you showed is very similar to this.

The link to the datasheet you gave in #1 won't download, my browser flags it as a security risk. So I can't tell whether this one works differently or not.

For convenience here is the PDF-File as attachment
AWM700katalogove_listy.pdf (292.6 KB)
There is a diagram voltage output over mass flow

As this diagram shows voltage and not frequency to me it seems more likely that this sensor indeed has a analog voltage as output.

It seems so indeed. That makes your result all the more interesting.

What happens to the output signal when you change air flow, in terms of frequency and duty cycle?
is there a difference between air coming from a pump (which indeed pulsates) or you blowing in the sensor (which would be a more constant flow)?

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