With the news here in Europe full of the effect of the war in Ukraine on gas supplies and consequently, prices, there it was on the radio news: a unit of measurement so uniquely British that nobody uses it in the real world and nobody even has a clue what it really means. We’re speaking of the Therm, one of those words from our grandparents’ era of coal gas powered Belling cookers and Geyser water heaters hanging over the bath, which has somehow hung on in the popular imagination as a mysterious unit of domestic gas referred to only in the mass market news media. What on earth is a therm, and why are we still hearing it on the news in the UK?
You can’t Buy A Therm
Asking the internet what a therm is reveals the answer, it’s 100,000 BTU. What’s a BTU? A British Thermal Unit, another anachronistic measurement five decades after the UK went metric, it’s the amount of energy required to raise a pound of water by a degree Fahrenheit. Which in turn is about 1,054 joules, in today’s measurements. So a therm is thus a unit of energy, can we take a look at our gas meters and see how many of them we’ve used this winter? Not so fast, because gas isn’t sold by the therm. Older gas meters had cubic feet on them, and we’re guessing that now they’re calibrated in cubic meters. We can’t even buy a therm of gas, so why on earth are the British media still using it? Continue reading “Just What On Earth Is A Therm?”
Even though most of the world population couldn’t tell you what room or body temperature is in Fahrenheit, there are some places on this globe where this unit is still in common use. For people in those areas, it’s therefore a real hassle when, say, a cheap Chinese air quality measurement systems only reports in degrees Celsius. Fortunately, [BSilverEagle] managed to patch such a unit to make it display temperature in Fahrenheit.
The reverse engineering begins by finding a way to dump the firmware. It’s nice to hear that [BSilverEagle] used some the skills demonstrated in [Eric Shlaepfer’s] PCB reverse engineering workshop from Hackaday Remoticon last November to trace out the debug header and the SWD pins of STM32F103C8 MCU. After that, OpenOCD could be used to dump the firmware image, with no read protection encountered. The firmware was then reverse-engineered using Ghidra, so that [BSilverEagle] could figure out where the temperature was being calculated and where the glyph for the Celsius symbol was stored. From there this it was a straight-forward rewrite of those two parts of the original firmware to calculate the temperature value in Fahrenheit, change the glyph and reflash the MCU.
So why buy this thing in the first place if it didn’t spit out units useful for your current locale? Cost. Buying this consumer(ish) device was about the same cost as buying the individual parts, designing and manufacturing the PCB, and writing the firmware for it. The only downside for their use case was the lack of Fahrenheit. Not a problem for those who demand full control of the hardware they own.
Need a boot camp for using Ghidra? Matthew Alt put together a spectacular video series on Reverse Engineering with Ghidra.