Synchronize arduinos ??

Hi.

I am building an arduino project that consists in 2 parts/modules

  1. There is one arduino with an LCD display that controls my Solar boiler/heater. Mainly it reads data from my solar heater and keeps - displays some statistics on the LCD screen.
    The user can switch with buttons between the different statistics on the screen.
    The module is outside my home where the solar heater is located

  2. The second Arduino is located in my house and its destination is to collect and display on an LCD the info from the previous Arduino and later from other ones.
    The peripheral arduinos will be talking to this one via Xbees

  • I need ideas of how to get data from the peripheral arduinos to the main
  • Data will be stored locally in each peripheral arduino.
  • Data on the peripheral Arduino is for example current water temp, current solar panel temp etc. Also there is an Array that stores averages of the data for the previous days.
  • In the main Arduino (controller) I would like to be able to see all the above data. Must I store it also in the controller? Must the controller ask the peripheral Arduino for ONE data at a time?

Must I store it also in the controller? Must the controller ask the peripheral Arduino for ONE data at a time?

As these are the only two questions in your post I will answer them.

No, you don’t have to store the date in your main controller although it may be easier to access it if they are already locally available.
If you don’t store them locally (or you cannot because you’re controlling to many other controllers and don’t have enough memory to hold all the data), your main controller must have some way to ask the slaves to transmit the data the user wants to display.

I would first start by connecting the two devices with your XBees and transfer some test data forth and back. If you got that working it’s time for the displaying and sensor stuff.

Thank U Pylon.

So what you propose is a "home made protocol" over the Xbee serial communication where the "controler" asks and the "peripheral" answers...

thx

Yes, for maximum speed (the lower the speed of your XBees the longer the range you can use them) I would make the “home grown protocol” compact, so I would not use an ASCII based protocol but transfer the values binary (p.e. sending an integer as 2 bytes, a long or float as four and so on). Include some overhead to allow for recognizing faulty transfers (checksums or hashes come to mind).

Checksums???

Xbees do handle all the dirty job isn't it?

They should. I never analyzed the XBee protocol deeply and therefor don't know how extensively it checks and eventually corrects the transmitted data. I never mind to include a bit (really just a bit) more redundancy to have certainty that the values is exactly what was sent on the remote side.