Thanks to all for sending suggestions to solve my problem.
I do have a commercial opto isolation module in the circuit and this sends a voltage to the remote contactor coil at the heater.
I have added command to my code to display on a LCD so I could follow the program flow and monitor where the problem occurs.
I have now had more fun for the last 11 hours simulating and watching the program do its work with the actual heater disconnected. (more fun than watching paint dry) Ha Ha.
The program did fail twice in that time and it appears that it goes to the temperature read subroutine and then suddenly resets. The point when this happened was when the temperature just got to the minimum trigger setpoint. My LCD display did not indicate that it left the subroutine and went to the comparison section.
I am going to try battery power but I do not suspect that is the problem as I have a 2A 5V supply that is fed off a different circuit than what the heater is on.
I will keep plugging along.
Harold




Bookmarks