This phrase is a little ambiguous. Is the following interpretation of what you are saying correct? On the test bench, without connecting the refrigerator, it works flawlessly and has done a great job no matter how Long I run it. When it is actually controlling the refrigerator, after about an hour of continuous running, the LCD display goes from ....
Now - about the messed up display. It appears that the variables, the current temperature, the target temperature, and the status are being displayed correctly and it is only the titles that are messed up. Is that always the case? Is the messed up information always the same or does it change? If it changes then once it starts getting flaky does it ever display the correct information again?
Sorry, should have clarified that better. Yes, you are correct that I was running it for a short period without the connection to the refrigerator, something like a 15 minute test just pulling the probe in and out of cold water.
As for the messed up display, no, the variables are not always present. This was just a fluke - normally they'll be replaced with random symbols and letters as well. I'm not entirely sure why the targets and temperatures were staying that way, but I do know that with the example shown the actual temperature of the test probe was about 35 degrees and not 40. The messed up information is always different as far as I can tell, I cannot see any patterns or recurring themes. In the tests I've run so far, I have not seen it return to a normal state from the corrupted state.
This connection is not correct.
I don't think it is the cause of your problem but you should fix it. If you are going to use 'high side switching' you should be using a PNP transistor. The more common technique is to use an NPN but put the Power Switch Tail in the circuit between +5v and the transistor collector (VDC+ to +5v and VDC- to the collector). Connect the emitter to GND.
Edit: "I don't think it is the cause of your problem .... " I take that part back.
Thank you very much for pointing this out! I've corrected the connection per your advice.
I suspect the code but from reading through it I have not found mistakes yet. Since your LCD still accepts commands (set cursor still works), the display is probably good. Something wrong with arduino program. Can you pull the PowerSwitch circuitry out of your setup and test again? Maybe there's interference. I'm a bit suspicious on how you connected the PowerSwitch to arduino. Is that connection from adafruit?
After running a test to confirm the NPN connection is correct I will disconnect the PowerSwitch and let the device run overnight to see if the same error is generated, so I'll get back to everyone when I can confirm that.
As for why I'm using a transistor to operate the PowerSwitch: I originally tried connecting the PowerSwitch directly to the Arduino pin and ground, however when the switch connected it blanked out the LCD display. I assumed this was because the combination of the LCD backlight, LCD text, the power needs of the temperature probe and now the PowerSwitch drew too many milliamps for the Arduino power supply to hold. That's when I did my (backwards) wiring of the transistor to help pull the current directly from the power supply to run the PowerSwitch, which worked well overall.
That looks to me like a classic symptom of memory corruption. I cant find the problem in your code, so perhaps there is a problem in one of the libraries. Which versions of the OneWire and DallasTemperature libraries are you using, and where did you download them from? Also, are you using Arduino 1.0 or an earlier version?
The Adafruit site pointed out the links to the appropriate libraries where I downloaded the information from. For the Dallas Temperature Control Library, I used the following site http://www.milesburton.com/?title=Dallas_Temperature_Control_Library
and downloaded 3.7.2 which I'm assuming is the current version. As for OneWire, I pulled it from here http://www.pjrc.com/teensy/td_libs_OneWire.html
. I have updated to Arduino 1.0 as well.
I'm grounding out DB0 to DB3 per the advice earlier. It's not a problem at all on a breadboard, so better safe than sorry. Thanks again for everyone's help!
Also, thanks Don for pointing out the issue in the code with the temperature drop beneath 10 degrees. I'm pretty certain I'd be scratching my head for weeks over that one.