Yup, I may have gotten myself a little over my head... (temperature probes/net..

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.

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

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.

sonnyyu:

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.

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.

Retroplayer: 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,

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.

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 [u]pushed[/u] 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 [u]from[/u].

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.

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…

Columnmn: 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!

Columnmn: 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. :fearful: 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.

sonnyyu: 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.

Retroplayer: 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.

Retroplayer: [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.

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

bbotella: 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 :disappointed_relieved:, 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.

PeterH: 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.

It is the same here in the U.S. Actually, maybe a bit worse. It doesn't matter if it is part of your "normal job" or not, but any works you develop while on company time belongs to company, period. So a kid flipping burgers at Burger Shack for $7 an hour comes up with something that saves the company millions, but does it on his work shift, loses all rights to it. In fact, his name does not even get any credit towards it at all. Generally, companies are not THAT evil as to exploit their employees so badly, but they can be if they chose to be and the employee isn't careful to come up with a contract before beginning work.

Anyway, I apologize for taking things off-topic. This may be a normal, typical part of the OPs job. But I have seen people screwed over by this in the past, and I have gotten screwed by it too (though nothing as potentially big as this.)

BTW, what the OP is designing is not really anything new. There are commercial systems that do exactly this. We use them to monitor environmental chambers at my work. However, he is planning to offer a cheaper system. Keep that in mind when negotiating price.

Something like this, for example: http://www.dataq.com/products/hardware/temperature-alert.html?gclid=CM_EtJO06LUCFaI-MgodQzoAHQ at $299

or even this: http://avtech.com/Products/Environment_Monitors/Room_Alert_3E.htm

at $145

Oddly, I even have a few sitting right here that were intended for this. I grabbed them as obsolete scrap and I use them as development boards (they have Atmega128s on them mostly pinned out.)

Retroplayer: Something like this, for example: http://www.dataq.com/products/hardware/temperature-alert.html?gclid=CM_EtJO06LUCFaI-MgodQzoAHQ at $299

Dataq data sheet

From OEM datasheet Chipset: Atheros AR2315 chipset Memory: 32MB DRAM, 8MB Flash Operating System: Open WRT

AR2315 is SoC (system-on-a-chip) has GPIO/High Speed UART but lack I2C/SPI.

Retroplayer: I grabbed them as obsolete scrap and I use them as development boards (they have Atmega128s on them mostly pinned out.)

Those Atmega128s might be interface of I2C/SPI to AR2315.

Plan E. credit by Retroplayer OEM/ODM OpenWRT enable router which use SoC has I2C/SPI interface (no need Atmega128s).

I edit/remove the price.

but any works you develop while on company time belongs to company, period.

Depending on the industry and the contract that you sign it can get worse. A lot of tech companies will declare anything you develop, on company time or on your own time, is their property. This can include anything you happen to be developing in your basement.

laadams85:

but any works you develop while on company time belongs to company, period.

Depending on the industry and the contract that you sign it can get worse. A lot of tech companies will declare anything you develop, on company time or on your own time, is their property. This can include anything you happen to be developing in your basement.

That's a rather unusual situation and in the few cases it might apply it would be because even if developed in a developer's basement if it is proved he used proprietary information or knowledge obtained because of his employment through the company, then his basement design may be indeed a violation of the company's IP rights, then they would have a case, otherwise that is a straw man statement that would require specific citations to be believable. I strongly suspect the 'anything' part is most likely an added addition on your part, if you instead stated 'some things' then it's an believable statement.

Lefty

retrolefty: ... because even if developed in a developer's basement if it is proved he used proprietary information or knowledge obtained because of his employment through the company, then his basement design may be indeed a violation of the company's IP rights,

That's pretty much exactly like it is worded in the contract with my company. I work for an extremely large company that has their hands in many different technologies. So, from my experience your suspicion is correct.