Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. water flow sensor YF-B5

water flow sensor YF-B5

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    niccodemi
    wrote on last edited by
    #1

    Hi,

    I would like to use YF-B5 water flow sensor with default mysensors water-meter sketch. I need help getting correct PULSE_FACTOR value based on below specs:

    1 Appearance Product identification clear, accurate and meet the requirements
    2 water pressure> 1.75MPa
    3 Operating voltage range DC5 ~ 15V
    4 Insulation resistance> 100MΩ
    5 Accuracy (in 1 ~ 25L \ MIN) ± 3%
    6 Flow Pulse Characteristics (6.6 * Q) Q = L / Min ± 3%
    7 Output pulse high> DC 4.7V (input voltage DC 5V)
    8 Output pulse low level <DC 0.5V (input voltage DC 5V)
    9 Output pulse duty cycle 50% ± 10%

    #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_NRF5_ESB
    //#define MY_RADIO_RFM69
    //#define MY_RADIO_RFM95
    
    #include <MySensors.h>
    
    #define DIGITAL_INPUT_SENSOR 3                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)
    
    #define PULSE_FACTOR 1000                       // Number of blinks per m3 of your meter (One rotation/liter)
    
    #define SLEEP_MODE false                        // flowvalue can only be reported when sleep mode is false.
    
    #define MAX_FLOW 40                             // Max flow (l/min) value to report. This filters outliers.
    
    YveauxY 1 Reply Last reply
    0
    • N niccodemi

      Hi,

      I would like to use YF-B5 water flow sensor with default mysensors water-meter sketch. I need help getting correct PULSE_FACTOR value based on below specs:

      1 Appearance Product identification clear, accurate and meet the requirements
      2 water pressure> 1.75MPa
      3 Operating voltage range DC5 ~ 15V
      4 Insulation resistance> 100MΩ
      5 Accuracy (in 1 ~ 25L \ MIN) ± 3%
      6 Flow Pulse Characteristics (6.6 * Q) Q = L / Min ± 3%
      7 Output pulse high> DC 4.7V (input voltage DC 5V)
      8 Output pulse low level <DC 0.5V (input voltage DC 5V)
      9 Output pulse duty cycle 50% ± 10%

      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      #include <MySensors.h>
      
      #define DIGITAL_INPUT_SENSOR 3                  // The digital input you attached your sensor.  (Only 2 and 3 generates interrupt!)
      
      #define PULSE_FACTOR 1000                       // Number of blinks per m3 of your meter (One rotation/liter)
      
      #define SLEEP_MODE false                        // flowvalue can only be reported when sleep mode is false.
      
      #define MAX_FLOW 40                             // Max flow (l/min) value to report. This filters outliers.
      
      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @niccodemi the default water meter sketch measures water volume in m3, this sensor measures water flow in l/min.
      Here you can find an example of how to convert flow sensor output to volume.

      http://yveaux.blogspot.nl

      N 1 Reply Last reply
      1
      • YveauxY Yveaux

        @niccodemi the default water meter sketch measures water volume in m3, this sensor measures water flow in l/min.
        Here you can find an example of how to convert flow sensor output to volume.

        N Offline
        N Offline
        niccodemi
        wrote on last edited by
        #3

        @yveaux is there any way to convert flow in l/min to pulses per liter?

        Another user posted below info; is that accurate?

          • Flow meter using Honeywell C7195A2001B which has a hall sensor that pulses at 7 Hz per liter/min
        • we count only upgoing pulses, so in our case we get:
        • 7 pulses per second at 1 l/min
        • 420 pulses per liter
        • 420000 pulses per m3
        • Flow meter Caleffi 316 which has a hall sensor that pulses at 8.8 Hz per liter/min (according to specs)
        • In reality the frequency is about 30% lower in my case, so we have to correct this with a factor of 1.3.
        • 8.8 pulses per second at 1 l/min
        • 528 pulses per liter
        • 528000 pulses per m3
        • 528000/1.3 = 406154
        YveauxY 1 Reply Last reply
        0
        • N niccodemi

          @yveaux is there any way to convert flow in l/min to pulses per liter?

          Another user posted below info; is that accurate?

            • Flow meter using Honeywell C7195A2001B which has a hall sensor that pulses at 7 Hz per liter/min
          • we count only upgoing pulses, so in our case we get:
          • 7 pulses per second at 1 l/min
          • 420 pulses per liter
          • 420000 pulses per m3
          • Flow meter Caleffi 316 which has a hall sensor that pulses at 8.8 Hz per liter/min (according to specs)
          • In reality the frequency is about 30% lower in my case, so we have to correct this with a factor of 1.3.
          • 8.8 pulses per second at 1 l/min
          • 528 pulses per liter
          • 528000 pulses per m3
          • 528000/1.3 = 406154
          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by Yveaux
          #4

          @niccodemi said in water flow sensor YF-B5:

          convert flow in l/min to pulses per liter

          You can; read the example code I pointed to. And as always, Google is your friend

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          34

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular