# Convert Temperatures The Analog Way

Everyone knows how to convert from Celsius to Fahrenheit, right? On a digital thermometer you just flick the little switch, on a weather app you change the settings, or if worse comes to worse, you let Google do the math for you. But what if you want to solve the problem the old-fashioned way? Then you pull out a few op amps and do your conversions analog style.

We’ve seen before how simple op amp circuits can do basic math, and the equation that [Kerry Wong] wants to solve is even simpler. Recalling the old T= 9/5·Tc + 32 formula (and putting aside the relative merits of metric versus traditional units; we’ve had enough of that argument already), [Kerry] walks us through a simple dual op amp circuit to convert the 1 mV/°C output of a thermocouple module to 1 mV/°F. The scaling is taken care of by a non-inverting amplifier with resistors chosen to provide a gain of 1.8, while the offset is handled by a differential amplifier that adds 32 mV to the scaled input. Strategically placed trimmers allow [Kerry] to tweak the circuit to give just the right conversion.

For jobs like this, it’s tempting to just use an analog input on an Arduino and take care of conversions in code. But it’s nice to know how to do it old school, too, and hats off to [Kerry] for showing us the details.

## 28 thoughts on “Convert Temperatures The Analog Way”

1. Well I went out to the GA-raj to have a tinker at the bench but it was a little chilly out there. So I put on a jumper and realised that it really didn’t matter a fig whether it was 15 or 59 degrees because the scale doesn’t matter, just pick one, say what you are using and stop trying to tell everyone else why your choice is bestest/betterer.

1. moo says:

While i’m strongly favoring metric for my own use, I cannot find a absolute argument that proves in a mathematical sense that it’s better. In the end, I will have a better feel for what a centimeter is or what 17 degrees Celsius feel like, and for others, inches and Fahrenheit will be more intuitive.

A friend of mine who went from Europe to the US had a great reason for Fahrenheit though: 0 is really the coldest you ever wanna be, and 100 is the hottest you can stand. So the temperature in Fahrenheit is kind of a percentage of the range you can survive. Which I found a nice way of thinking.

> I cannot find a absolute argument that proves in a mathematical sense that it’s better.

Both are based on water freezing / boiling (Fahrenheit is also now defined based on water freezing at 32 degrees and boiling at 212), but Celsius makes these reference points less arbitrary.

1. moo says:

They are still arbitrary, and being based on water (whose boiling point changes with pressure) is not a reference where you can build an argument that it’s _fact_ that Celsius is better than Fahrenheit IMO.

2. Jermaine Falken says:

The water boiling at 212F/100C is at sea level (“room pressure”). Water boils at a little lower temperature in Denver and water boils at the freezing mark on the moon. (and will sublime like dry ice as it gets colder) For best results, try the experiment in that crater on the moon where the sun don;t shine! That trick with boiling points and pressure changes is how refrigeration works. There would be a way to use only 1 op amp for the converter. You use the op amp for the 9/5 gain and a 1k volume knob hooked to the + and – rails and adjust it in to get the desired offset.

2. Dax says:

Mathematical compatibility, because it’s easier to convert from Celsius to Kelvin

1. rnjacobs says:

They use Rankine if they really need to use absolute temperatures with something Fahrenheit-sized.

1. Dax says:

The rest of the physics community doesn’t. They work in SI.

2. rnjacobs says:

Yes, and?

3. Dax says:

All the physics and science in general is done in SI, so Kelvin is used instead of Rankine.

3. Dax says:

>”0 is really the coldest you ever wanna be, and 100 is the hottest you can stand.”

Depends on who you ask. -5 F is still perfectly fine to me, and 175 F is where I bathe every other week. Some prefer it up to 240 F.

1. stefanvorkoetter says:

You can’t bathe in 240 F water, since (a) it is no longer a liquid, and (b) will cause 3rd degree burns.

1. Dax says:

It’s a sauna you dolt.

2. moo says:

Since staying in 175 F weather is not a sustainable way of life, I think it’s fair to say that it’s more than 100% hot by my hand-wavy definition. I agree that my choice of phrasing was not ideal when I said “hottest you can stand”, it should be “hottest you can stay alive for extended periods of time”. Plus, it’s not to be taken too seriously.

4. htcone says:

100 the hottest you can stand? best be avoidng Australia then ;)

1. moo says:

Exactly, eg. 120 F is 20% hotter than it ever should be. It’s very intuitive, see? :D

2. Blamoo says:

Who the hell would want to convert Celsius to Fahrenheit anyways?

1. Bill says:

Americans

2. Swoop_g says:

Who wouldn’t!

3. nuclear says:

Fahrenheit has better resolution than celsius.

1. nuclear says:

Look at the image. In C’s range of 0 to 50, F has 90 divisions. Fahrenheit has 180 degrees between freezing and boiling, while celsius has only 100. F is more precise on an accurate thermometer.

1. Dax says:

I don’t know where you get 90 divisions. I count approximately 45 lines on the F side against 50 lines on the C side.

The numerical precision doesn’t matter either because it’s irrelevant for the application, or the thermometer isn’t actually that accurate. For where it would matter, Celsius adds a decimal point and becomes approximately 5 times more precise.

1. nuclear says:

LOL. The scale is wrong on your image. Look at the numbers. Precision DOES matter, especially in analog thermometers. You can add decimal points to Fahrenheit, too.

1. e says:

What? It’s 71F out there, and not 70F like I thought – well, gosh darn it, I was gonna wear my jacket, but that settles it, now I’m not.

2. Reggie says:

Then you can use milidegree celsius. It has better resolution than farenheit…

4. Emyr says: