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. General Discussion
  3. Aggregating data from multiple arduinos into one sensor

Aggregating data from multiple arduinos into one sensor

Scheduled Pinned Locked Moved General Discussion
10 Posts 4 Posters 1.6k Views 3 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.
  • Nca78N Nca78

    @gohan said in pairing nodes with each other:

    but it still needs the gateway to route the messages

    I'm not so sure about that ...
    As the receiver in the ceiling (controlling the light) will be always on, it can be set in repeater mode.
    So you can set node ID in "Control node" on the schema above, which is set as reapeater.
    Then in the button nodes, you set the id of the node, and also the parent which is set to the node id of the "control node".
    That way the "control node" will receive & process the messages from the button nodes.

    So let's imagine in control node :

    #define MY_REPEATER_FEATURE
    #define MY_NODE_ID 10
    

    And in button nodes :

    #define MY_PARENT_NODE_IS_STATIC
    #define MY_PARENT_NODE_ID 10  // id of "control node"
    #define MY_NODE_ID 11
    

    And of course when sending message to the "control node" from "button node" don't forget to use setDestination.

    Sergio RiusS Offline
    Sergio RiusS Offline
    Sergio Rius
    wrote on last edited by
    #1

    Pretty interesting! I've been also wondering for an implementation like that. In my case, I've made a node that monitorizes various signals at the same time. I use ADCs for each of them and they aren't as fast as I wanted. Due to that, all the values refresh so slow one after another. If each one delays 1s for a reading and there are 10 of them, the resolution drops to one reading every 9s.
    I thought that instead of one big board with a single busy chip it could be better to use independent AT chips for each reading, but all of them require a voltage calibration that comes from the same place and also I have local LCD display and buttons.

    So the better could be independent arduinos doing readings and all of them sync to a common mys node that has the lcd and buttons and posts to the gateway.
    But in my case the "repeater" must interpret and work data that is not for the GW.

    @nca78 Nice solution. In this approach, the repeater could cancel the messages and use them for it's sake?

    I guess, for me, It could be better a wired solution. Does anyone knows about one?

    Nca78N 1 Reply Last reply
    0
    • Sergio RiusS Sergio Rius

      Pretty interesting! I've been also wondering for an implementation like that. In my case, I've made a node that monitorizes various signals at the same time. I use ADCs for each of them and they aren't as fast as I wanted. Due to that, all the values refresh so slow one after another. If each one delays 1s for a reading and there are 10 of them, the resolution drops to one reading every 9s.
      I thought that instead of one big board with a single busy chip it could be better to use independent AT chips for each reading, but all of them require a voltage calibration that comes from the same place and also I have local LCD display and buttons.

      So the better could be independent arduinos doing readings and all of them sync to a common mys node that has the lcd and buttons and posts to the gateway.
      But in my case the "repeater" must interpret and work data that is not for the GW.

      @nca78 Nice solution. In this approach, the repeater could cancel the messages and use them for it's sake?

      I guess, for me, It could be better a wired solution. Does anyone knows about one?

      Nca78N Offline
      Nca78N Offline
      Nca78
      Hardware Contributor
      wrote on last edited by
      #2

      @sergio-rius I think trying to hack MySensors is not a good idea, you would have to reprogram your hack everytime you change version. I would use a wired solution between your different boards (you can program each board as an i2c sensor using the Wire library, for example) that would report to one "main" board that would be the the MySensors node reporting to gateway, and would also be the one with lcd and buttons.

      Sergio RiusS 1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #3

        Can't you use external and faster ADC chips?

        Sergio RiusS 1 Reply Last reply
        1
        • Nca78N Nca78

          @sergio-rius I think trying to hack MySensors is not a good idea, you would have to reprogram your hack everytime you change version. I would use a wired solution between your different boards (you can program each board as an i2c sensor using the Wire library, for example) that would report to one "main" board that would be the the MySensors node reporting to gateway, and would also be the one with lcd and buttons.

          Sergio RiusS Offline
          Sergio RiusS Offline
          Sergio Rius
          wrote on last edited by Sergio Rius
          #4

          @nca78 said in pairing nodes with each other:

          I would use a wired solution between your different boards (you can program each board as an i2c sensor using the Wire library, for example) that would report to one "main" board that would be the the MySensors node reporting to gateway, and would also be the one with lcd and buttons

          That's a nice and elegant idea. I experimented with the AltSoftSerial library but it was so complicated or I didn't understand well how to make something different than a master-child com.
          Do you know any example or writing on this?

          Nca78N 1 Reply Last reply
          0
          • gohanG gohan

            Can't you use external and faster ADC chips?

            Sergio RiusS Offline
            Sergio RiusS Offline
            Sergio Rius
            wrote on last edited by
            #5

            @gohan said in pairing nodes with each other:

            Can't you use external and faster ADC chips?

            The fact is that the ADCs are so fast, for a hobbist stuff. But I need them to also work as amplifier and in differential mode. So they end in 1.7sec for a reading.
            I looked for industrial ones, but they were rare and the specs not clear.

            I hacked the ADCs resolution and "overclocked" the atmega and I reached working minimals. But I don't like having to do this.

            I'm sorry for hijacking the thread.

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #6

              I don't know what you are trying to do, but this is something I was referring to https://www.adafruit.com/product/1085

              1 Reply Last reply
              0
              • Sergio RiusS Sergio Rius

                @nca78 said in pairing nodes with each other:

                I would use a wired solution between your different boards (you can program each board as an i2c sensor using the Wire library, for example) that would report to one "main" board that would be the the MySensors node reporting to gateway, and would also be the one with lcd and buttons

                That's a nice and elegant idea. I experimented with the AltSoftSerial library but it was so complicated or I didn't understand well how to make something different than a master-child com.
                Do you know any example or writing on this?

                Nca78N Offline
                Nca78N Offline
                Nca78
                Hardware Contributor
                wrote on last edited by Nca78
                #7

                @sergio-rius said in Aggregating data from multiple arduinos into one sensor:

                Do you know any example or writing on this?

                You can have a look at the basics here:
                https://www.arduino.cc/en/Tutorial/MasterReader

                Main board (screen/buttons/mysensors board) is "Master reader", and each adc board is a slave, with a different address (declared in Wire.begin(address)) so the main board just has to read data for each address one by one.
                Don't know if it makes sense for your usage, and if you have enough pins, but you could also use an output on adc board/input on main board to act as interrupt and know when you have data to read from an adc board.

                Sergio RiusS 1 Reply Last reply
                0
                • Nca78N Nca78

                  @sergio-rius said in Aggregating data from multiple arduinos into one sensor:

                  Do you know any example or writing on this?

                  You can have a look at the basics here:
                  https://www.arduino.cc/en/Tutorial/MasterReader

                  Main board (screen/buttons/mysensors board) is "Master reader", and each adc board is a slave, with a different address (declared in Wire.begin(address)) so the main board just has to read data for each address one by one.
                  Don't know if it makes sense for your usage, and if you have enough pins, but you could also use an output on adc board/input on main board to act as interrupt and know when you have data to read from an adc board.

                  Sergio RiusS Offline
                  Sergio RiusS Offline
                  Sergio Rius
                  wrote on last edited by Sergio Rius
                  #8

                  @nca78 said in Aggregating data from multiple arduinos into one sensor:

                  you could also use an output on adc board/input on main board to act as interrupt and know when you have data to read from an adc board

                  Yes, in fact I do like this in my current board. I have all eight adc int pins wired to pin2 so I know when to stop reading. As it is sequential I don't bother. But in a discrete system would be different.

                  I read several articles, but all seemed to have the master-slave concept inverted for my understanding. Thank you.
                  I will give it a read as soon as I end with the dimmer for the living room. I always tend to complicate things, and I arrived to the third non-working iteration of the class vector for this parametric multi-dimmer. I'm going with the DimmableLedActuator sketch. ;)

                  Edit: Seems that the link its wrong.

                  Nca78N 1 Reply Last reply
                  0
                  • Sergio RiusS Sergio Rius

                    @nca78 said in Aggregating data from multiple arduinos into one sensor:

                    you could also use an output on adc board/input on main board to act as interrupt and know when you have data to read from an adc board

                    Yes, in fact I do like this in my current board. I have all eight adc int pins wired to pin2 so I know when to stop reading. As it is sequential I don't bother. But in a discrete system would be different.

                    I read several articles, but all seemed to have the master-slave concept inverted for my understanding. Thank you.
                    I will give it a read as soon as I end with the dimmer for the living room. I always tend to complicate things, and I arrived to the third non-working iteration of the class vector for this parametric multi-dimmer. I'm going with the DimmableLedActuator sketch. ;)

                    Edit: Seems that the link its wrong.

                    Nca78N Offline
                    Nca78N Offline
                    Nca78
                    Hardware Contributor
                    wrote on last edited by
                    #9

                    @sergio-rius sorry I meant to post this link:
                    https://www.arduino.cc/en/Tutorial/MasterReader

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

                      Perhaps using a different microcontroller could also be an option?
                      I'm personally not to deep in these things, so this might be completely wrong, but at first sight I'd try to get this working with a STM32F1 board. Seems that using them in conjunction with direct access to the ADC might speed up things, see http://wiki.stm32duino.com/index.php?title=API#Reading_from_.26_Writing_to_pins as a short reference.
                      And using MySensors with STM32F1 seems to be used by several users here.

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

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


                      24

                      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