Pages: [1] 2   Go Down
Author Topic: Yup, I may have gotten myself a little over my head... (temperature probes/net..  (Read 1356 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all.

I work for quite a large catering company, they've got many, many different sites.

We've got to do temperature checks twice daily. So I rigged up some one wire waterproof temp probes, hooked them into all the fridges, and got it all working to upload data into excel document. Works fantastically.

It seems to have impressed all my bosses, and I'm now in the process with another guy of making up a business plan to implement it (possibly worldwide, 56000 sites, I'm not kidding on that).

So it's got be able to programmed in one location, and wired in at site. Then just work, or be adjusted remotely.

So, where I'm at...

I can make a web server that'll display the temps via ethernet shield. Then an I.T. guy in the company can make a script that'll find all the web servers, combine the data, and we'll have searchable temps from each site. I'm hoping to make it send emails to certain addresses if a temp is out. I'm pretty sure I can figure that part out.

It's the idiot proofing that's messing me up.

I was wondering if it'd be possible to adjust a sketch via the webserver page. So if a temp probe dies (the one wire has a unique code for each temp probe), a new one can be hooked up, and somebody can remotely alter parts of the sketch via the webpage. (or change certain parts of the sketch, so a box somebody can type in, and it'll change preset parts of the sketch).

I've done some searching but I'm not coming up with much. If anybody had some links of something similar that's been done, I'm happy to figure out the rest.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16518
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While maybe not theoretically impossible (hardly anything is) I would venture to say it will not end up happening, at least not as you invision. What you are effectively asking is can someone make changes to the sketch and re burn them into the chip from a remote web site. No there is just not a simple say to do that in my opinion. They can do it for the Mars Rangers but they have much more powerful hardware and a much bigger wallet and teams of smart people building all the redundancy and contingency plans possible into the system.

 If the intention is to be able to provide all troubleshooting and reconfiguration fixes for 56000 sites from a single remote site via web connections then I think your business plan will crash and burn sooner or later. You will need field support people to travel from time to time to fix stuff.

Lefty
« Last Edit: March 06, 2013, 01:31:29 am by retrolefty » Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1387
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I was wondering if it'd be possible to adjust a sketch via the webserver page. So if a temp probe dies (the one wire has a unique code for each temp probe), a new one can be hooked up, and somebody can remotely alter parts of the sketch via the webpage. (or change certain parts of the sketch, so a box somebody can type in, and it'll change preset parts of the sketch).

I don't know there are any way allow modify sketch during run time,  however there is some type workaround.

Plan A.

TFTP Bootloader, With this and an Ethernet shield, it’s easy to upload code to any Internet-connected Arduino, whether it’s on your desk or halfway across the world. webserver create correct file and save it at TFTP server.

TFTP Bootloader

Plan B.

Java applet at web page. It called online Arduino IDE. Java applet upload the file.


Plan C.
ActiveX at at web page, if u are in Microsoft/IE  house.




« Last Edit: March 06, 2013, 01:48:53 am by sonnyyu » Logged

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

Quote
I was wondering if it'd be possible to adjust a sketch via the webserver page. So if a temp probe dies (the one wire has a unique code for each temp probe), a new one can be hooked up, and somebody can remotely alter parts of the sketch via the webpage. (or change certain parts of the sketch, so a box somebody can type in, and it'll change preset parts of the sketch).

I don't know there are any way allow modify sketch during run time,  however there is some type workaround.

Plan A.

TFTP Bootloader, With this and an Ethernet shield, it’s easy to upload code to any Internet-connected Arduino, whether it’s on your desk or halfway across the world. webserver create correct file and save it at TFTP server.

TFTP Bootloader

Plan B.

Java applet at web page. It called online Arduino IDE. Java applet upload the file.


Plan C.
ActiveX at at web page, if u are in Microsoft/IE  house.






I think that tftp bootloader might be a plan. I'll have to do some more reading up.

Thanks for the help.
Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What changes or adjustments to the sketch do you need? It sounds like the things you need (from your description) could just be stored and recalled from EEPROM. So, just include code to handle that from an admin page.

It sounds like you need to only change some constants, not the actual code. But adding in the bootloader may be a good idea to update and upgrade the programs as needed.

If it is any consolation, I don't think any product is idiot proof and certainly not on the first launch. It's not until the real world happens that you see all the variables that can happen. It would be unrealistic not to expect problems to pop up. My only suggestion is to do a lot of testing on a small, regional basis first before trying to deploy tens of thousands of units.
« Last Edit: March 06, 2013, 05:39:26 am by Retroplayer » Logged

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

What changes or adjustments to the sketch do you need? It sounds like the things you need (from your description) could just be stored and recalled from EEPROM. So, just include code to handle that from an admin page.

It sounds like you need to only change some constants, not the actual code. But adding in the bootloader may be a good idea to update and upgrade the programs as needed.

If it is any consolation, I don't think any product is idiot proof and certainly not on the first launch. It's not until the real world happens that you see all the variables that can happen. It would be unrealistic not to expect problems to pop up. My only suggestion is to do a lot of testing on a small, regional basis first before trying to deploy tens of thousands of units.

It'd definitely be a small group starting out with (and each country will need to decide if they want it), making sure it all works. But it's pretty inexpensive, and can do everything they'd want, and can save 30 minutes per day at each site, and make it more accurate, lessen the paperwork side of things at site, and allow OHS to keep tabs on everything.

The things that I think might need to be updated, if a sensor goes down, smashed. ect. It's got a unique code to each temp probe, so the sketch needs to be updated with the one wire address. And things like adding site names would make it easier to make a stack all the same, and program on site.

I'm liking the look of the bootloader, it seems to do what I want.

And with Poe, I won't need extra power cables too (I just discovered). Which will be a plus.

The constants that might need to be changed,
Logged

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

The one wire library can search and discover connected devices, so you can check to see what you have attached. I assume that you are holding a mapping between ds18b20 address and a description of which refrigerator it is monitoring in the sketch and it sounds like that is hard coded into the sketch for each ds18b20.

If that's the case, you can keep the mapping in EEPROM and set it up remotely. Work with your IT guy to keep a database that knows each arduino and where it is. Provide a central web site that each arduino can call into. If the arduino notices that one of its sensors is gone, it can notify the web site. Whoever changed the sensor out can go to a human facing page on the site and select the refrigerator it serves. Later, the arduino can call the web site again to collect this data and push it into EEPROM and go back to normal operations.

As another advantage, you can then push the temperature readings to the web site and do your reporting centrally, rather than from Excel locally.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suggest you change the sketch to discover any temp sensors on the 1-wire interface and report on any it finds.

I expect you'd find that this was easier to set up at each location if the Arduino pushed the results in to a central location (e.g. using an HTTP post) rather than have your central location poll all the remote sites. This avoids the need for each site to be configured to permit inbound connections, or to validate where those connections are coming from.

I suggest you handle the mapping between the display name and the ID of the sensor at the central location. However, I'd give each Arduino a unique location (configured in EEPROM) and include that in the result set, so that you have a foolproof way of keeping track of which physical Arduino you're receiving data from even if you lose track of what temp probes are connected where.

You should try to minimise the things that can be configured remotely and avoid it as far as possible. If there are some things you are certain you will need to change (the URL of the central server that results are reported to, any credentials needed to secure incoming or outgoing connections, timing/threshold parameters for the temperature reading/reporting/local alarming - that sort of thing) then you could either provide a web server on the Arduino (bear in mind this reintroduces all the firewall configuration issues at the remote site) or provide a way for the Arduino to retrieve its settings from the central server. Be very wary of changing anything that relates to the method of connecting to the central server so that you don't saw off the branch you're sitting on. I suggest you steer away from trying to reload the whole sketch remotely because that will make your solution much more complex and fragile.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My other advice to make things idiot proof is to reduce the number of idiot fingers that can poke into the pie. If there is something that needs to be human-entered, I would keep that to one person at a central location. The more automated, the better.

We have this problem with the databases at my work as well. Too many people can change it and and as a result, it is corrupted and useless nearly 80% of the time. Job security for the people that have to go in and fix it, I guess.

I think you will learn all these things during your testing. Let people break it to learn how to secure it.

I usually avoid making suggestions like this because ultimately this is your concern to deal with and not specific to the question that you asked, but realize that using a system like this will result in the health inspectors asking for calibration records since it would be too easy to either fudge numbers intentionally or have an out of cal sensor reporting that everything is good when it is not. I doubt that they will always just trust it. An ocassional manual check and adjustment (if needed) is recommended. Best to consider this up-front if you have not done so. There may even be guidelines for it already established such as monthly manual checks, etc...
Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1387
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems to have impressed all my bosses, and I'm now in the process with another guy of making up a business plan to implement it (possibly worldwide, 56000 sites, I'm not kidding on that).

u might need update excel if it is not updated.

Excel 2003  Max Worksheet size: 65,536 rows by 256 columns
Excel 2003  Max rows size

Excel 2010  Max Worksheet size: 1,048,576 rows by 16,384 columns
Excel 2010  Max rows size


if I were you, I will update to NoSQL database which support big data (very big, say facebook kind of). then go back business guy and tell him our backend support 5 billion nodes now, When you have revision business plan?

Why scale up? let us scale down!

I'm hoping to make it send emails to certain addresses if a temp is out. I'm pretty sure I can figure that part out.
I am sure you could, but why reinventing the wheel. smiley-eek-blue
Nagios provides enterprise-class Open Source monitoring  (open source)

1. Monitoring

2. Alerting

3. Response

4. Reporting

5. Maintenance
Scheduled downtime prevents alerts during scheduled maintenance and upgrade windows.

6. Planning
Trending and capacity planning graphs and reports allow you to identify necessary infrastructure upgrades before failures occur.

One of last issues, I did not find at your post, report.
if I were you, I will spent 90% resource at report, pick good report framework and write very detail visualize webbase report. The report will get you salary increase, arduino sketch not.
« Last Edit: March 06, 2013, 10:29:04 am by sonnyyu » Logged

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The report will get you salary increase, arduino sketch not.

I certainly hope that the OP made arrangements to sell the technology, etc.. to the company versus just doing it for his normal pay. Unless you need to just add it to your portfolio, never do that. At 30 minutes saved every day per site, you are saving the company possibly hundreds of thousands a year. In fact, I would calculate that as part of the proposal and factor in things like problems/fines associated with errors as a result of the old way.

Trust me, the company will take dibs on whatever you come up with and draft up something to keep a chunk of it if you were ever to try to sell it to other companies. They are looking out for their asses, you should look out for your own. If you are designing and working on it during company time, they own it, not you - regardless of what they pay you for it, fair or not.

I have done this for companies I have worked for in the past. They get their lawyers involved. So should you. Seek legal advice if you have not done so.
« Last Edit: March 06, 2013, 09:03:30 am by Retroplayer » Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1387
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have done this for companies I have worked for in the past. They get their lawyers involved. So should you. Seek legal advice if you have not done so.

agree 100%.

sell to his boss, most of them have business or MBA background, u need visualize interface plus complicate math model/business analyst ( complicate enough to make boss only understand 50%)

sell the technology, u need shift some resource to polish tech, don't forget decision maker is still business or MBA background. u should get one of best legal advice and prepare paid hundreds/thousands  dollar per hour. I learn that from hard lesson.

What you pay, what you get.
« Last Edit: March 06, 2013, 09:43:18 am by sonnyyu » Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[I certainly hope that the OP made arrangements to sell the technology, etc.. to the company versus just doing it for his normal pay. Unless you need to just add it to your portfolio, never do that.

I don't know where this work is being done but based on UK employment law, if this development is part of the OP's normal job I would not expect the OP to retain any IPR or commercial rights, unless the employer volunteers them or the employment contract already provides them. It's only when the development is not part of the normal job that you have rights that you might be able to sell to your employer rather than giving them away.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

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

In order to make sketch changes on the fly... Have you considered to use Raspberry Pi? There are bridges that allow them to run Arduino code, and they are a usual computer where files can be replaced remotelly.

Here an example of that kind of bridges:
http://www.cooking-hacks.com/index.php/raspberry-pi-to-arduino-shield-connection-bridge.html
Logged

Earth
Offline Offline
Edison Member
*
Karma: 41
Posts: 1387
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In order to make sketch changes on the fly... Have you considered to use Raspberry Pi? There are bridges that allow them to run Arduino code, and they are a usual computer where files can be replaced remotelly.


Perfect! however Arduino is no longer needed smiley-sad-blue, since Pi has SPI/I2C/UART/GPIO interface. by use 3.3V sensor. you are ready to go. Raspberry Pi is Linux box, now you could make  any change you like.

Plan D. credit by bbotella
Raspberry Pi with I2C 3.3 V sensor.
« Last Edit: March 06, 2013, 10:32:20 am by sonnyyu » Logged

Pages: [1] 2   Go Up
Jump to: