Pages: [1]   Go Down
Author Topic: Wireless Temperature Monitoring - Need some guidance  (Read 524 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Everyone,

I've gotten ambitious since my last project, but I've been reading and learning as much as I can.
I need a little guidance on a temperature sensor project.

It consists of a base station Arduino Mega, with Ethernet Shield, and Xbee (Series 2, API, Mesh Network).

Routers consist of Arduino Uno, LCD, temperature sensor, and Xbee.
End Nodes are just Xbee, and temperature sensor.

I've got a few units transmitting temperature, and ID to the base station, where the base uploads to an SQL database (via PHP script). I've got another page that displays the data graphically using flot.

Each sensor wakes up every 5 minutes, transmits its data, and goes to sleep. There are only 3 now, but there will be upwards of 50 if all goes well.

My question is - if a sensor were to fall offline- either due to low battery, or other reasons, the base station would not be able to detect it. What would be the best way that I can set up the base station to detect if it has not received data from a specific sensor? Keep in mind 50+ sensors.

Thanks,
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could keep an array of 50 unsigned long elements and store millis in the appropriate cell whenever the sensor sends a reading. Check for any that have too long an interval between millis and the stored time. Alternatively, create another web page that queries the database, displays the IDs of the non-responsive nodes and the mega can parse them out. What are you going to do when you detect a failure?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could keep an array of 50 unsigned long elements and store millis in the appropriate cell whenever the sensor sends a reading. Check for any that have too long an interval between millis and the stored time. Alternatively, create another web page that queries the database, displays the IDs of the non-responsive nodes and the mega can parse them out. What are you going to do when you detect a failure?

Thanks wildbill,

I had an array in mind as well, but thought there might be a better way of doing it. Can an array be too large?

The web query is an interesting idea as well, I will look into how I can incorporate that.

The failure would alert several users by e-mail, same as what would happen if a temperature is found out of spec. I may also look into SMS alerts.

The sensors will be in a laboratory - monitoring cold rooms, freezers, incubators and the like. Right now, analog chart recorders are being used which are pretty much useless, some have audible alarms - which are useless if a failure happens at night, and only the cold-rooms temperatures are tied to the alarm system that would alert 24/7.

Thanks for the input!
« Last Edit: December 06, 2012, 11:01:30 am by renesis » Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The question is then, whether the Arduino need be involved at all in the alerts. You could simply have a process on the web server that queries this info out of the database periodically and sends alerts when appropriate. Alternatively, you could run the check whenever the arduino sends a reading.

I think I'd want the logic on the server - you'll need to keep track of when alerts were sent, unless you want to end up spamming the mailboxes of the lucky recipients.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The question is then, whether the Arduino need be involved at all in the alerts. You could simply have a process on the web server that queries this info out of the database periodically and sends alerts when appropriate. Alternatively, you could run the check whenever the arduino sends a reading.

I think I'd want the logic on the server - you'll need to keep track of when alerts were sent, unless you want to end up spamming the mailboxes of the lucky recipients.

Good call. I'm not sure how to go about putting that process on the server (still quite new at SQL, PHP, Arduino) - so if you have any resources I should look at, that would be much appreciated. Looks like I've got some more reading to do.

Thanks,
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 48
Posts: 3389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, you can write such a process in your language of choice. Since you've already got PHP & SQL interfaced though, you could cheat and create another page for the arduino to GET periodically. Have the alert queries run from there.
Logged

Pages: [1]   Go Up
Jump to: