Renesas Air Flow Sensor FS1012

Hi, Hope you all are well. I am new in Arduino programming and need some help. I have searched the forum but got no information related with this sensor.

I am working on Renesas Flow Sensor FS1012 but having some problem getting information out of it.
I am getting output of ‘18’ and even if I change the air flow, its still the same. Guidance will be appreciated if someone worked on it.

Secondly, the sensor output in datasheet is mVolt. How can we convert voltage to meter/sec (speed of air flow).

Sensor Mode: Single Ended Circuit

Flow sensor datasheet is : https://www.idt.com/eu/en/document/dst/fs1012-datasheet

The code which I am using is :

void setup()
{
  Serial.begin(9600);
  Serial.println("Renesas Flow Sensor Output is:");
  Serial.println("-----------------------");
}
 
void loop()
{
  int sensorout = analogRead(A1);         // Signal at A1
  Serial.println(sensorout);                   // print the air sensor with a newline

 
  delay(1000);
}

Did you put the output directly into the Analog Input of the Arduino? What does your setup look like?

Yes I have put the output directly into Arduino analog input. There is a offset amplifier in the setup which I will test tomorrow. Although I am not sure if the problem is without an amplifier.

The hardware solution would be to create differential amplifier. Or to code a software offset on one of the pins (honestly I don’t know how to do that).As far as I understood the maximum output of the sensor is 150mV. It will be very hard to get some readings I think.

The Arduino before we even get into the sensor and looking at your code will use a 5 volt (or whatever it regulates to) as the analog A/D reference. The A/D is a 10 bit (2^10) system so simply put if the reference is actually 5 volts then your A/D conversion becomes 0 to 5 volts = 1024 quantization levels or since 0 counts a reading of 0 to 1023 bits. If I take 5 / 1024 I get a best case resolution of 4.88 mV.

Looking at the charts in the data sheet depending on suffix of the model (exact model) they start around 125 mV for 0 flow and that’s for only for the 0 to 2.2 SLPM version. 125 mV would be about 25 counts or 25 bits which is sort of way down in the dirt. This is why they use amplification. Since these things work based on heat removal the higher the flow (liquid or air) the more thermopile heat removed reducing the thermopile output.

Depending on your board there are other internal references which can be used. Give this a read:

https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

Short of an amplifier that is the best I can tell you.

Ron

I have tested for differential and single mode case with the amplifier but situation is still the same. Getting the same output even if I change the air flow. Tried my best to find what's the problem but unable to get some idea.

Can you upload a picture of your setup? Without it for us its just second guessing.

This should be your basis setup.

Apply 5 volt power to the heater and using a DMM measure directly across TP1 + and - and then TP2 + and -. You should get reading inline with the tables printed in the data sheet. What do you get?

Ron

Ron_Blain:
This should be your basis setup.

Apply 5 volt power to the heater and using a DMM measure directly across TP1 + and - and then TP2 + and -. You should get reading inline with the tables printed in the data sheet. What do you get?

Ron

Thank you Ron for this suggestion, it really helped. For Single Ended circuit without amplifier : I am getting values range from 16 to 20 (no matter how much different airflow is) but Voltage from DMM is between 90mV to 105mV which is inline with the graph mentioned in the datasheet.

Reading is not stable and there are a lot of fluctuations even with DMM at different airflow.
Secondly serial monitor showing values from 16 - 20 however DMM has values between 90mV to 105mV

About what I would expect to see. Figure an Arduino ADC has a 10 bit A/D converter so 2^10 = 1024 which works out to be about 4.88 mV/Bit. So 90 to 105 mV would be between about 18 and 21 bit counts. I just don't know why it isn't responding to flow?

The problem with these things is a very low output to begin with and not a very good uncertainty on output. The mV out should follow the chart.

Ron