Monday 22 May 2017

Controller part 5 - code and callibration

The temperature and auto-fill controller code is done. I put a little extra logic to allow for calibration of the thermocouple sensor. For now, the screen shows the current state at the top left, time elapsed, bottom left, two temperature readings (upper is current reading from thermocouple, lower is the set point) and three bits of data: A is the alarm state, H is the heating element and F is the solenoid. The reading in ice-water was a few degrees above what it should be.

























A second data point is taken using boiling water.

























Then, the corrected temperature can be calculated using the formula: 

CorrectedValue = (((RawValue - RawLow) * ReferenceRange) / RawRange) + ReferenceLow

where ReferenceLow is 0.01 for ice water and ReferenceRange is the boiling point at your elevation minus the ReferenceLow.

Although there is a bit of swing in the readings, the corrected output for boiling point looks pretty good. I would say that this thermocouple setup is accurate to +/- 0.5C - which is certainly good enough for boiler control. Without better reference tools, I will just have to assume for now that the rest of the range (i.e. above 100 C) is similarly accurate. 























No comments:

Post a Comment