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. Development
  3. Can Gateway perform calculations on sensor data before passing to controller?

Can Gateway perform calculations on sensor data before passing to controller?

Scheduled Pinned Locked Moved Development
10 Posts 5 Posters 1.6k Views 5 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.
  • JohnRobJ Offline
    JohnRobJ Offline
    JohnRob
    wrote on last edited by
    #1

    I would like to have a Bosch BME280 in a remote location controlled by a Sensebender Micro (or similar). The processing math for this sensor demands a 32 bit processor for accuracy (I don't know the actual error in using a 8 bit but I believe Bosch's recommendations).

    My Gateway is a Sensebender_GW.

    Is there a way for the remote Node to read the raw BME280 data and pass it to the Gateway for computing/processing, then be sent to the controller?

    Thanks
    John

    1 Reply Last reply
    0
    • rejoe2R Offline
      rejoe2R Offline
      rejoe2
      wrote on last edited by
      #2

      You may use node-to-node communication to send the raw data from the BME-node to any other node for further calculation. Most likely best would be to use own ID's after calulation. But if this really is a problem, it's probably better to use directly a different mc (like STM32F103) for the node itself, the node-to-node-way makes things much more complex.

      Would you mind providing more info about the calculations problem you mentionned? My own BME280-node is just equipped with an ordinary pro mini...

      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

      1 Reply Last reply
      2
      • JohnRobJ Offline
        JohnRobJ Offline
        JohnRob
        wrote on last edited by
        #3

        @rejoe2 said in Can Gateway perform calculations on sensor data before passing to controller?:

        STM32F103

        HI, Thanks for the insight and the ref to the ST board, I was not aware of its existence.

        Regarding the BME280 my original BME test was on a RasPi using Python, which seems to be capable of very long numbers. I did not use any library and coded it from the datasheet.

        Reading the datasheet, Bosch recommends a 32bit processor. See datasheet Appendix A.
        In any case the polynominals used for calculating the final temperature, humidity and pressure are quite long and small errors in the calculation will have some effect on the result / accuracy. How much...I don't know but for me a little OCD is enough to want the best I can do.

        If I ever quantify the error I will try to update this thread.

        mfalkviddM 1 Reply Last reply
        1
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          I have a BME280 running next to a SHT31 and temperature readings are consistent without 32bit MCU

          1 Reply Last reply
          0
          • JohnRobJ JohnRob

            @rejoe2 said in Can Gateway perform calculations on sensor data before passing to controller?:

            STM32F103

            HI, Thanks for the insight and the ref to the ST board, I was not aware of its existence.

            Regarding the BME280 my original BME test was on a RasPi using Python, which seems to be capable of very long numbers. I did not use any library and coded it from the datasheet.

            Reading the datasheet, Bosch recommends a 32bit processor. See datasheet Appendix A.
            In any case the polynominals used for calculating the final temperature, humidity and pressure are quite long and small errors in the calculation will have some effect on the result / accuracy. How much...I don't know but for me a little OCD is enough to want the best I can do.

            If I ever quantify the error I will try to update this thread.

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @johnrob I can't find any mention of a requirement on 32-bit cpu.

            Appendix A does mention that the calculations should use 32-bit signed integers and single or double precision floats. Arduino supports all of them.

            rejoe2R 1 Reply Last reply
            1
            • mfalkviddM mfalkvidd

              @johnrob I can't find any mention of a requirement on 32-bit cpu.

              Appendix A does mention that the calculations should use 32-bit signed integers and single or double precision floats. Arduino supports all of them.

              rejoe2R Offline
              rejoe2R Offline
              rejoe2
              wrote on last edited by
              #6

              @mfalkvidd Thx for doing some deeper analysis.
              Until now, to me the data from the BME280-node seemed also to provide plausible data. My "reference" is a DS18B20 attached to another node installed at a different - less exposed, so also less accurate - place.

              Used lib is the BME280-lib by Tyler Glenn that comes with Arduino (Version 2.2.1, as latest 2.3.0 seems to be broken with AVR).

              Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Craig Thom
                wrote on last edited by
                #7

                The calculations are for the calibration data calculated at the factory and stored on the chip.

                Assuming your remote sensor is powered by batteries, you probably aren't going to be running the sensor all the time, which limits your filtering options (higher resolution output requires consecutive readings).

                It's likely that the sensor is going to be accurate enough for the resolution you are using without applying the calibration data. You could test this experimentally with that sensor on your Raspberry Pi setup, comparing the output with and without application of the calibration information.

                (I spent a lot of time with that data sheet because I also have one connected to a Raspberry Pi. It was nice of them to provide sample numbers so I could make sure my calculation code was correct.)

                1 Reply Last reply
                0
                • JohnRobJ Offline
                  JohnRobJ Offline
                  JohnRob
                  wrote on last edited by
                  #8

                  My "concern" is more OCD than realistic. I really have no realistic need to know the temperature as such precision. Its just that I would prefer to get the most accurate reading the sensor is capable of.

                  @mfalkvidd

                  When you said "....Appendix A does mention that the calculations should use 32-bit signed integers and single or double precision floats. Arduino supports all of them...."

                  I was assuming to get 32 bit double precision floats one would need a 32bit µP. Am I in error here?

                  An old saying (not sure how old).
                  A man with one thermometer knows what temperature is.
                  A man with two thermometers does not.

                  mfalkviddM C 2 Replies Last reply
                  0
                  • JohnRobJ JohnRob

                    My "concern" is more OCD than realistic. I really have no realistic need to know the temperature as such precision. Its just that I would prefer to get the most accurate reading the sensor is capable of.

                    @mfalkvidd

                    When you said "....Appendix A does mention that the calculations should use 32-bit signed integers and single or double precision floats. Arduino supports all of them...."

                    I was assuming to get 32 bit double precision floats one would need a 32bit µP. Am I in error here?

                    An old saying (not sure how old).
                    A man with one thermometer knows what temperature is.
                    A man with two thermometers does not.

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #9

                    @johnrob yes you are :)

                    1 Reply Last reply
                    0
                    • JohnRobJ JohnRob

                      My "concern" is more OCD than realistic. I really have no realistic need to know the temperature as such precision. Its just that I would prefer to get the most accurate reading the sensor is capable of.

                      @mfalkvidd

                      When you said "....Appendix A does mention that the calculations should use 32-bit signed integers and single or double precision floats. Arduino supports all of them...."

                      I was assuming to get 32 bit double precision floats one would need a 32bit µP. Am I in error here?

                      An old saying (not sure how old).
                      A man with one thermometer knows what temperature is.
                      A man with two thermometers does not.

                      C Offline
                      C Offline
                      Craig Thom
                      wrote on last edited by
                      #10

                      @johnrob I understand wanting to apply the calibration data even though you don't need it. I did the same.

                      The Arduino hardware doesn't support 32 bit calculations, but it can be done in software; it just makes your code bigger.

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


                      17

                      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