Aggregating data from multiple arduinos into one sensor



  • 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?


  • Hardware Contributor

    @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.


  • Mod

    Can't you use external and faster ADC chips?



  • @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?



  • @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.


  • Mod

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


  • Hardware Contributor

    @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.



  • @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.


  • Hardware Contributor



  • 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.


Log in to reply
 

Suggested Topics

  • 4
  • 933
  • 5
  • 274
  • 9
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts