Gravity: G/2” Water Flow Sensor Wiki - DFRobot

Introduction

This Gravity: Water Flow Sensor is designed based on the electromagnetic principle. It adopts o-ring rubber seal and uses silicone sealant at the outlet end to ensure good waterproofness. Also, it embraces high anti-electromagnetic interference and anti-vibration capabilities, offering reliable performance and long service life.
The sensor can be used with microcontrollers like Arduino UNO to measure the flow of liquids with high concentration and low mucosity like water, diesel, engine oil, milk, paint, detergent, honey, etc. (no impurity in liquid)

Features

Specification

Pinout

Num Label Description
Green Wire OUT Signal Output
Red Wire VCC Positive Power Supply 3.5V-24V
Black Wire GND Negative Power Supply

Dimensions

Tutorial

Requirements

Connection Diagram

Sample Code

volatile double waterFlow;
void setup() {
  Serial.begin(9600);  //baudrate
  waterFlow = 0;
  attachInterrupt(1, pulse, RISING);  //DIGITAL Pin 3: Interrupt 0
}
void loop() {
  Serial.print("waterFlow:");
  Serial.print(waterFlow);
  Serial.println("   L");
  delay(500);
}

void pulse()   //measure the quantity of square wave
{
  waterFlow += 1.0 / 150.0; // 150 pulses=1L (refer to product specification)
}

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get Gravity: Water Flow Sensor (G1/2) from DFRobot Store or DFRobot Distributor.

Turn to the Top