I'm new to Arduino, and I would like to start a project with a certain goal in mind. Google wasn't much help, too much info, need help sorting it out.
I'd like to create a network of Arduinos that collect data, store it, and report to a central device, like a building alarm system. I'm sure others have done a million variations of this, but can't find good discussions/examples.
Here are the parts I need ideas for:
How to use each Arduino for both data logging and sending instant alarm messages
What to use for the central device? Another Arduino, Raspberry Pi, a PC, or something else?
And web access, but not for each Arduino, just the central unit. This of course would need a web server and all that goes with it, BUT just for inside the the company, it would not be internet-exposed.
This would all be wired. There are half a dozen sites spread across 5 counties, about 35 miles at most, with microwave LAN bridges that use 802.11g over 900mhz diplexed onto the FCC licensed 950mhz band. But for the purpose of answering the question: it's "wired". =-)
Also, at its max there would be a maximum of maybe like 18-20 remote Arduinos.
For starters, the simple thing to do would have the master in turn query the slaves for information. Having the slaves call the master could result in transmission conflicts.
I'm with zoomkat on this one, master query the slave, especially with the distances involved and the intermediate hardware, going to be some significant lags added.
Think an 8-bit, 16 MHz microprocessor as the central unit doing all the things listed will have underwhelming performance. Could be okay for the remote units getting a request from the master and sending data back.
spinjector:
This would all be wired. There are half a dozen sites spread across 5 counties, about 35 miles at most, with microwave LAN bridges that use 802.11g over 900mhz diplexed onto the FCC licensed 950mhz band. But for the purpose of answering the question: it's "wired". =-)
Also, at its max there would be a maximum of maybe like 18-20 remote Arduinos.
If you can provide access from each LAN to the public internet, and allow access from the public internet to a management station which can receive the incoming data, then the communication part becomes a simple TCP/IP design issue.
If you can't establish TCP/IP connectivity then the problem will be harder.
for both data logging and sending instant alarm messages
I think it would help if list the data types would be helpful
sending instant alarm messages
Can you provide any more detail about the messages ?
For now the data would simply be the state of all digital inputs, with some analog measurements like temperature, all sampled at roughly one-second intervals. So the amount of data is very small; perhaps a few dozen bytes per poll.
When I say "message" I simply mean that a digital input has changed state. However, if I go with the master/slave polling as you suggest, then sending messages wouldn't really be needed.
spinjector:
This would all be wired. There are half a dozen sites spread across 5 counties, about 35 miles at most, with microwave LAN bridges that use 802.11g over 900mhz diplexed onto the FCC licensed 950mhz band. But for the purpose of answering the question: it's "wired". =-)
Also, at its max there would be a maximum of maybe like 18-20 remote Arduinos.
If you can provide access from each LAN to the public internet, and allow access from the public internet to a management station which can receive the incoming data, then the communication part becomes a simple TCP/IP design issue.
If you can't establish TCP/IP connectivity then the problem will be harder.
TCPIP is already established to the remote sites. Public internet is not needed, and is not an option for security reasons, that was the purpose of establishing private FCC-licensed IP links. The remote sites are subnetted as part of the LAN. Latency is usually less than 10ms. In fact it's fast enough that we use it for streaming audio and VOIP for phones at some sites, with nearly undetectable codec delay.
spinjector:
TCPIP is already established to the remote sites. Public internet is not needed, and is not an option for security reasons, that was the purpose of establishing private FCC-licensed IP links. The remote sites are subnetted as part of the LAN. Latency is usually less than 10ms. In fact it's fast enough that we use it for streaming audio and VOIP for phones at some sites, with nearly undetectable codec delay.
That's ideal. In that case I would just use an Ethernet-capable Arduino at each remote site and use a TCP/IP client/server architecture for the comms. In the simplest case each remote would acquire the data and make one attempt to transmit it to the central collector, and the collector would just store whatever it received with no resilience, authentication, encryption or access controls. If that's sufficient, the implementation would be straight forward.
lafontas:
I would be more inclined to have the Arduino-based nodes upload sensor data to a centralized MySQL database on a Raspberry Pi. Cheers
Wow. MySql on a Raspberry Pi would be perfect. I think you just nailed down my data collector. The gears in my head are suddenly turning like crazy. Thanks. =-)