Close

When debugging it's never what you think it is

A project log for BBQ Thermostat

A board-controlled temp probe and fan to maintain temperature during a long smoke or BBQ

ericeric 08/22/2019 at 00:390 Comments

In the previous project log I mentioned that I was getting nonsense values from the thermocouple. I tried everything to figure out what was wrong. I even bought a different thermocouple (https://www.amazon.com/gp/product/B0142RXG84/). Still the same issue. I posted to reddit and the Arduino forums. What I learned on the Arduino forums is that there's another library I can use for the therm chip (separate from the official Arduino one) that makes it easy to see what errors one is getting. But still no success. I was getting really bummed - I was still in one of the easiest parts of the development phase.

I tried different USB cables and got some slightly different, but inconsistent results. Maybe it was the USB ports on my computer? So I installed Arduino IDE on my laptop, got the code on there, and .... it was exactly the same. I had read that full E/M environment could mess with the sensor. So I unplugged my laptop and took it to my bedroom. There..... it worked! REALLY? Was it the wifi router in the office?

So I came back into the office. It was still working! I plugged in my laptop and things went screwy again. I took this to the net and it seems the consensus is that the voltage is very noisy on the 5V line and that screws with the tiny measurements being made on the thermocouple. So it looks like I'll be doing debugging on a battery-powered laptop. Also, I may have to make sure the final project runs on battery power rather than AC power. We'll see.

Discussions