Analog TC reading way off


Brian Hilgert

TVWBB Member
So I've managed to cobble together my AD8495 board and thermocouple, and have it hooked up to my Protometer, and the reading I'm getting is way off. I have a simple sketch that just displays the temp on the TC, and it's pretty accurate, so i'm fairly sure Iv'e got the board and TC working properly. But when I upload the Heatermeter sketch, it is way off. I issued /set?pc0=0,0,5,0,3 via serial, which I'm kind of guessing is where my error lies. Any Ideas? I did verify that the probe offset is set to 0 as well.:(

Brian Hilgert

TVWBB Member
:eek: Much closer, but still off a bit. I'm going to assume that margin of error is because of my hardware setup; I don't have a 3.3 reference voltage.
if (_probeType == PROBETYPE_TC_ANALOG)
        float mvScale = Steinhart[3];
        if (mvScale == 0.0f)
          mvScale = 1.0f;
        // If scale is <100 it is assumed to be mV/C with a 3.3V reference
        if (mvScale < 100.0f)
            mvScale = 3300.0f / mvScale;
        setTemperatureC(ADCval / ADCmax * mvScale);

So if I'm running at 5 volts, I can either modify grillpid.cpp to
mvScale = 5000.0f / mvScale;
or I could just do /set?pc0=0,0,0,1000,3 right?

That looks pretty good. Now i just need to hook some regular probes up and freeze/boil to verify, then reassemble my real heatermeter and get this puppy on the smoker.

Thanx Bryan!!

Brian Hilgert

TVWBB Member
Alan, it's a K and everything tested out ok in the simple stub sketch I wrote to test my AD8495 board. I think Brian nailed it, I was using slot 3 not index 3. that and the reference voltage issue, which is a known entity.

Bryan Mayland

TVWBB Hall of Fame
Oh wow, I put that "arbitrary scaling" code in thinking someday someone might come along and complain that they used 5 volt Vref and it wasn't supported. I guess you showed me, by being the first person to build one, and you used 5V.

You should be able to just set the "scale" rather than the mv/C like the set command you used. If it is below 100 it is assumed to be mV/C if it is above it, it is assumed to be a direct scale factor.

EDIT: The zeros you can leave blank too if you want. HeaterMeter allows you to skip configuration parameters you don't want to set.

Dave Casazza

Hi Brian,

I'm ready to ditch RTD sensors. How far are you getting along with implementing AD8495 with the Heatermeter?



Bryan Mayland

TVWBB Hall of Fame
"Real soon now". The v4.1 board is just about in the can. Everything is good to go, including the case, but I'm doing one more production run. After working with Laen, we thing we've worked out how to include a thermocouple addon board with every HeaterMeter board for the same cost. The only issue is that the v4.1 board only easily supports 1 thermocouple (on the Pit probe). Routing the traces to get cutaway sections to allow you to reuse the existing jacks was just taking a ton of time and I'm not sure if people will be using those jacks anyway (because TCs don't come with 2.5mm mono jacks generally).