Using the FS1012-1100-NG on an Arduino

int TP1 = A1;
int TP2 = A2;
float TP1_Value = 0;
float TP2_Value = 0;
float diff = 0;
void setup() {
  // put your setup code here, to run once:
pinMode(TP1,INPUT);
pinMode(TP2,INPUT);
Serial.begin(9600);
analogReference(INTERNAL);
}

void loop() {
  // put your main code here, to run repeatedly:
  TP1_Value = analogRead(TP1);
  TP1_Value = TP1_Value*(5.0/1023.0);
  TP2_Value = analogRead(TP2);
  TP2_Value = TP2_Value*(5.0/1023.0);
  diff = TP1_Value - TP2_Value;
Serial.print("TP1 ");
Serial.print(TP1_Value);

Serial.print("  TP2 ");
Serial.print(TP2_Value);

Serial.print("  diff ");
Serial.println(diff);
}
         Need help getting this to display the flow rate on an Arduino.

Parents Reply Children
  • Hola, tengo el mismo sensor de flujo y mis problemas quedaron arreglandos con la ayuda del documento . Sin embargo aún me preguntó ¿cómo pasar los mV a una medida de flujo, ya sea SLPM o L/min o alguna similar? Es que el datasheet no es claro, espero me puedan ayudar. 

  • Hi Mitzi!

    Thanks for reaching out to the Renesas engineering community. Sorry to say I cannot understand this language so, could you please ask your query in English language It will be easy for me?

    Regards:

    Raja. 

  • Dear Renesas,

       I am also trying to use FS1012 to measure airflow using the arduino. I have wired up everything just as AdamC, however the signals I get are extremely noisy.  I have read someplace that additional component (OpAmp?) may be required, however my electrical engineering skills are very rudimentary. Could you describe how I can get better SN and what components I need to use and how to wire it up? I will eventually be trying to use 2 FS1012 to monitor a prototype.

    Thank you

  • Hi AM,

    Thanks for reaching to the Renesas Engineering Community. We are glad to assist you. There are many sources to getting noisy output. The causes of noise can be from the circuit itself, an imperfect design or layout, noise generated by faulty components or loose connections, or switches in related circuits or in switching power supplies that feed the circuit. Noise may also come from spontaneous fluctuations in currents and voltages. So, please go through the above points and confirm back to us. If possible, share the wiring diagram so that we would better understand your situation.

    Regards:

    Raja.

  • what is the gain consideration in datasheet any op amp circuitry added..?

  • HI Dinesh,

    Thanks for reaching again. The typical gain should be 20 to 100 times as mentioned in the datasheet. The output comes from thermopile is very small. If you want to further process the output (meaning to connect with ADC and interface to the MCU) then you must connect Opmap (to boost the signal).

    Regards:

    Raja.