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. Hardware
  3. Water meter: Itron Aquadis+ with pulse sensor

Water meter: Itron Aquadis+ with pulse sensor

Scheduled Pinned Locked Moved Hardware
46 Posts 10 Posters 32.8k Views 9 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.
  • Y Yveaux

    @bisschopsr can you post the error message? Maybe that will help in fixing the error...

    B Offline
    B Offline
    bisschopsr
    wrote on last edited by
    #41

    @hek: I agree with you, its not a float. I tried it to see how the interperter of VS responds. I did not mention this eralier, but I use the Visual Micro plugin in VS.
    @Yveaux: I took a quick screenshot of the error message:
    0_1471890856999_upload-7568068c-c9b2-4431-b3a9-e3706238d4ba

    As I see it the interperter expects the function as it is, somehow it does report an error though.

    Regards,
    Ralph

    Domoticz, P1 meter interface, MySensors and more to come!

    Y 1 Reply Last reply
    0
    • B bisschopsr

      @hek: I agree with you, its not a float. I tried it to see how the interperter of VS responds. I did not mention this eralier, but I use the Visual Micro plugin in VS.
      @Yveaux: I took a quick screenshot of the error message:
      0_1471890856999_upload-7568068c-c9b2-4431-b3a9-e3706238d4ba

      As I see it the interperter expects the function as it is, somehow it does report an error though.

      Regards,
      Ralph

      Y Offline
      Y Offline
      Yveaux
      Mod
      wrote on last edited by Yveaux
      #42

      @bisschopsr thanks for posting the actual error message; that helps a lot :smile:
      Apparently the type of pulseCount is volatile unsigned long.
      The MyMessage class has no set() - method directly taking this type as input, so the compiler starts looking for the next closest match. It finds 3: bool, uint8_t and int32_t and can't make a choice. That's why you get the error.
      To fix it, either change the type of pulseCount to one of the supported types, or cast it to one of these types just before calling the set() - method on the message.

      http://yveaux.blogspot.nl

      B 1 Reply Last reply
      1
      • Y Yveaux

        @bisschopsr thanks for posting the actual error message; that helps a lot :smile:
        Apparently the type of pulseCount is volatile unsigned long.
        The MyMessage class has no set() - method directly taking this type as input, so the compiler starts looking for the next closest match. It finds 3: bool, uint8_t and int32_t and can't make a choice. That's why you get the error.
        To fix it, either change the type of pulseCount to one of the supported types, or cast it to one of these types just before calling the set() - method on the message.

        B Offline
        B Offline
        bisschopsr
        wrote on last edited by
        #43

        @Yveaux As you might have understood, I'm not that experienced in the language. But I think I get the explanation you gave. Indeed pulseCount is of type volatile unsigned long. So if I change it to for example int32_t, will the Arduino compiler still understand and use a similar type as unsigned long? On the other hand, I guess this is related to the libraries of mySensors, isn’t it? So should the library not support unsigned long as well?

        Thanks again,

        Ralph

        Domoticz, P1 meter interface, MySensors and more to come!

        Y 1 Reply Last reply
        0
        • B bisschopsr

          @Yveaux As you might have understood, I'm not that experienced in the language. But I think I get the explanation you gave. Indeed pulseCount is of type volatile unsigned long. So if I change it to for example int32_t, will the Arduino compiler still understand and use a similar type as unsigned long? On the other hand, I guess this is related to the libraries of mySensors, isn’t it? So should the library not support unsigned long as well?

          Thanks again,

          Ralph

          Y Offline
          Y Offline
          Yveaux
          Mod
          wrote on last edited by
          #44

          @bisschopsr depends... Currently the library understands a lot of c++ types, but not all as you have seen.
          Choosing a comparable type will simply fix your issues. The int32_t is identical to unsigned long on Arduino, except for the sign. If your values do not exceed 2^31 you can just as well store it in an int32_t, but keep the volatile: volatile uint32_t pulseCount
          Maybe we can add some template trickery to the library to support all c++ types.

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Samuel Wieczorek
            wrote on last edited by
            #45

            Hi

            @bisschopsr : I try to put my TCRT5000 sensor on the Aquadis but I am not satisfied of the position/orientation. Would you send me a draw with the position of the two LEDS over the aquadis itron ?

            thanks

            B 1 Reply Last reply
            0
            • S Samuel Wieczorek

              Hi

              @bisschopsr : I try to put my TCRT5000 sensor on the Aquadis but I am not satisfied of the position/orientation. Would you send me a draw with the position of the two LEDS over the aquadis itron ?

              thanks

              B Offline
              B Offline
              bisschopsr
              wrote on last edited by
              #46

              @samuel-wieczorek Hi Samuel. I positioned the sensor over the 1 liter wheel. I did not used the TCRT5000 module, but made a custom built PCB. Howver the principle is the same (in fact the schematics is 100% the same as the TCRT module.
              If you go to https://www.openhardware.io/view/15/Itron-Aquadis-watermeter-sensor-V10 you can see pictures of the module. Some tips I can share with you:
              Shield the sensor and the rotating disk area from incoming light. This influences the sensor. Use a piece of plastic tube for example. In NL we have electrical wire tubes that can be used (the grey ones)
              Bring the sensor close to the disk. The reflection should do the rest. Setting up the TCRT is tricky as you have little room to manouver (considering reflection and the point where the schmit trigger swaps state)
              Be aware that when the disk stops with the edge near the sensor you get false readings. That is why I swapped to a software driven solution using SW hysteresis on the arduino.
              Hope this helps. If you can open it, I can share a DXF file with the sizes of the bottom plate I use. Let me know!

              Ralph

              Domoticz, P1 meter interface, MySensors and more to come!

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              15

              Online

              12.1k

              Users

              11.2k

              Topics

              113.4k

              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