# Meat thermometer using predictive filtering

The guys over at NerdKits put together a really informative video on a meat thermometer using predictive filtering which is viewable below. The video, supplemental text, and code is available on their website. The thermometer is constructed of a LM34 temperature sensor attached to a piece of 12 gauge solid copper wire. The thermometer signal is processed on an ATmega168 microcontroller and visualized using the pygame library for python. The real gem in this project is their excellent explanation of predictive filtering, which could easily be utilized for a large number of projects.

[Thanks Humberto]

## 20 thoughts on “Meat thermometer using predictive filtering”

1. Dazureus says:

You know, it’s funny. During the course of my EE degree, I’ve taken a handful of signals classes and only applied transfer functions on paper for signal (AM, FM, PM, etc) transforms and bandwidth calculations. I think it’s bad that this if the first time I’ve seen transfer functions used in a physical example. Great presentation.

2. ezra says:

Cool idea that you don’t see in most thermometers.
+1 for linear signals and differential equations refresher during the summer… :/

3. awesome. I’ve always thought about doing that, someone else just beat me to the punch.

4. Interesting video, it’s very nice to see someone go into the technical details of how things work, for once. Their transistor biasing video was great as well.

Looking at the response of the sensor, it looks like it actually is a second order response, with a second order time constant much smaller than the first order constant. Maybe it comes from the heat diffusion delay in the copper wire. Taking this onto account would improve the accuracy but the math is much tougher there ;P

5. The LM34 is accurate to ±1°F, yet the resolution on the display is shown as ±0.01°F.

you know, it’s funny. during the course of my metrology career, i’ve taken a handful of signal classes…and I’ve learned to read the specifications of the sensor.

i’ve been trying to achieve ±0.1°C using a class-1 RTD and an OP-AMP and a 12-bit ADC over a limited range of 10-35°C with no averaging. I can just barely achieve this accuracy.

However, I am very impressed with the application, the construction and his suit-coat.

6. Tilman says:

Even though copper has very good heat conductivity, I would not recommend to stick a copper wire into food: It will get corroded by the acids in the food, leaving back traces of copper salts which are toxic.
A possibility around this would be to use a copper tip covered by some protective layer (e.g. gold). Also, the tip from the mechanical meat thermometer shown in the beginning of the video might work well.

7. :D says:

why using all that math shouldnt this work x=x0+vt+1/2at^2?
x0=actual temperature
v=x0 to x1 velocity
t=chip delay? how much time does the chip takes to get the right temp
a=acceleration

8. Tilman says:

@:d
No, this won’t work, because you are proposing to model the temperature curve by a parabola which it obviously isn’t.

@myself: i talked to a biochemist and she told me copper wasn’t so critical and the traces were so small that it’s probably no problem… But clean it in order to remove lead and so on which might still stick on it from the wire insulation you might have peeled off.

9. Foxy says:

This looks like a project for a signal processing class. I always thought you could do something like this, I just never took the time to do the math/ prove it with an experiment. Very nice video.

/whips out old thermodynamics and signal processng books.

Laplace ftw!

10. Andrew says:

Um… how do you do derivatives in programming?

11. uncivlengr says:

I would imagine the predicted values would be much more accurate than they appeared to be in the video if the tip was held stationary in the hot water – by letting it bob up and down, he’s changing the distance the heat has to flow along the wire, which affects the rate of heat transfer to the sensor.

12. Odin84gk says:

@andrew
Lets say you are sampling the AtoD converter every 1mS and you get S1 and S2. A very simple derivative would be (S2-S1)/1mS.

13. will d. says:

this is the best narrated student video i have ever seen. excellent job!

14. jack says:

I’d imagine the response is so slow because of the huge length of copper they’re using.

15. war6763 says:

Not sure how 5 minute epoxy will react (or what chemicals will be transferred to the food) when heat is applied…

Also, even lead-free solder has impurities which are toxic… I would dissect a stainless steel thermometer and fill it in with a sensor in order to be certain that no contaminants enter the food.

Otherwise, good work! The presentation was explained well, although it would have been useful to compare the output to something else such as a capacitor in practice so that the portion of the audience which is not as skilled in mathematics would be able to relate. A simple breadboard example would suffice, and would not even require extra hardware or programming changes, as long as proper values were chosen.

16. @jack:

i don’t think so. i’ve been using lm335’s in a project of mine (same as the lm34 here, except calibrated for the kelvin scale) and they do the same thing regardless of how they are mounted. it might be because the sensors are manufactured with a plastic case, which is not very thermally conductive.

17. Nate says:

Nice job. I hadn’t heard of predictive filtering. Seems like it should be called compensation filtering, since you really are not predicting (estimating future world state) as much as compensating for the transfer function of the sensor, which is very common in control applications. The term seems to appear in a decent number of papers, surprised nobody has written the Wikipedia page yet. Thanks for putting that together.

18. Canbot says:

@fuzzmaster

Inferred thermometers take surface measurements, the point of a meat thermometer is to take the temperature at the core of the meat because that is what you need to know to properly cook meat.