SFM3000 sensor with Arduino

Thread Starter

Tarek1266

Joined Oct 18, 2019
59
Hi everyone,

Have anyone have an idea about how to measure flow using SFM3000 with arduino micro-controller ?

Regards,
 

Thread Starter

Tarek1266

Joined Oct 18, 2019
59
Code:
#include <Wire.h>
#include <sfm3000wedo.h>

SFM3000wedo measflow(64);

int offset = 32000; // Offset for the sensor
float scale = 140.0; // Scale factor for Air and N2 is 140.0, O2 is 142.8


void setup() {
  // put your setup code here, to run once:
  Wire.begin();
  Serial.begin(9600);
  delay(500); // let serial console settle


  // initialize the sesnor
  measflow.init();
  Serial.println("Sensor initialized!");
}

void loop() {
  unsigned int result = measflow.getvalue();

  float Flow = ((float)result - offset) / scale;
    
  Serial.print("Flow: ");
  if (result >= 0) {
    Serial.print(" ");
  }
  Serial.print(Flow, 5);
  Serial.print("\n");

  delay(10);
}
hi T,
I have downloaded the d/s for 3000.
Do you have a circuit to post showing how the project is set up.?
Also a copy of the program Code.

E
I have a problem with using SFM 3000 flow meter sensor with arduino. the default code uses Wire library. Unfortunately, when i use the code bellow, the code shows no result on the serial. when i searched for the problem , i found that there is a problem with Wire library when dealing with I2C sensors which can be solved if WSWire librabry is used. Unfortuantely, when i use WSWire libraby, the serial show only one constant reading which is 239.53.

Note : i changed in the codes of the sensor library by replacing <Wire.h> with <WSWire.h>


Regards,


the set up is as follows,but without the LCD



the library used to run the code :
https://github.com/dwerne/Sensirion_SFM3000_arduino


the library used for WSWire:
https://github.com/steamfire/WSWireLib
 

Attachments

Top