Digital Measuring Devices (Part 1)

In this two-part series, Martin Vlietstra will be looking at how digitisation is applied to measuring devices:  In Part 1, he will examine what “digitisation” is and explain how it is applied to thermometers. In Part 2, he will look at how it is applied to weighing devices.

We regularly hear the term “digitisation”.  I am not sure that everybody who uses the term fully understands what is meant by the term.

The term “digital devices” usually means that the device is controlled by a microprocessor (initially called “a computer on a chip”, now often called a microchip). Microprocessors first came into being in the 1970’s. The most successful early microprocessors were the Intel 8080 and Z80. These microprocessors formed the heart of the earliest personal computers including the Amstrad PCW. The Intel 8008 (predecessor to the Intel 8080) was first launched in 1972 with a price tag of $120. Today similar chips, when bought in bulk, cost $4 or less (without adjustment for inflation). Microchips, like their big brothers (computers), store numbers as a set of binary digits (often called bits). If the device concerned uses 8 bits to store its numbers, then it can store the numbers in the range 0 to 255 inclusive while a device that uses 10 bits can store number in the range 0 to 1023 (as shown below).

Many digital devices capture their information as an analogue value such as a voltage or an electrical current. These signals are then converted to a set of digital bits using a device called an analogue-to-digital convertor (ADC). As mentioned earlier, a microchip can be viewed as a “computer on a chip”. Although it can do many of the internal operations that a fully-fledged computer can do, it cannot add any accuracy to the input data.  Note that extra decimal places do not improve the accuracy of the result.

Digital thermometer indoor and outdoor temperatures, radio time and date

As an example, we will look at how a digital thermometer works. When I bought one with an external probe a few years ago its specifications said that its operational range was from -50 °C to +50 °C (-58 °F to +122 °F). I analysed its operation carefully, first putting it in a plastic bag and immersing it in a bowl of icy water. It registered 0.0 °C (as expected) and when it was switched to Fahrenheit, it showed 32.0 °F (as expected). I then warmed the probe by placing it between my fingers and watched the temperature climb. When I switched it to the Celsius mode, the temperature climbed in 0.1 °C increments, but in Fahrenheit mode the increments were usually 0.2 °F, but were sometimes 0.1 °F.  I then calculated the exact Fahrenheit conversion from degrees Celsius and compared my calculations to what was displayed.  I found that the display rounded the exact conversion to the nearest 0.1 °F (and also silently propagated any conversion uncertainties).

From this I deduced the instrument was designed around a 10-bit ADC which gave a raw output in the range 0 to 1023. The conversions resulting from this output are catalogued below.

  1. Column 1: The values 0 to 1000 were generated by the instrument with 0 representing -50 °C and 1000 representing +50 °C. The remaining 23 values were not used.
  2. Column 2: A value of 500 was then subtracted from the digital reading to give a range of -500 to +500. 
  3. Column 3: Since each increment represented an increase of 0.1 °C, the number is divided by 10 to get the temperature in degrees Celsius.
  4. Column 4: The temperature in degrees Celsius is converted to an exact value of degrees Fahrenheit.
  5. Column 5:  The Fahrenheit values rounded to the nearest 0.1 °F.

The calculated values were found to be exactly the values that were observed – values not shown in Column 5 were not observed on the device.

The naive Fahrenheit user might think that since he sometimes gets an odd number and sometimes gets an even number on the Fahrenheit display, the Fahrenheit value is more accurate than the Celsius value. However, a careful examination of all the Fahrenheit values shows that consecutive five values have an even number in the decimal place (31.6 °F to 32.4 °F – shown in blue) followed by five odd numbers in the decimal place (32.5 °F to 33.3 °F – shown in red). This pattern then repeats itself. In short, the thermometer was designed to display degrees Celsius and the Fahrenheit display was a “cheap add-on”.

In high accuracy work, users would expect the increments to be consistent. In the case of displaying degrees Fahrenheit, this would entail using a second 10-bit ADC which is tuned to have increments of 0.2 °F. This would result in a more expensive instrument which, for the domestic market at any rate, would not be acceptable, so the manufacturers hide this discrepancy by not publishing the specifications in full.

https://en.wikipedia.org/wiki/Analog-to-digital_converter

https://en.wikipedia.org/wiki/Microprocessor

https://en.wikipedia.org/wiki/Binary_number

https://en.wikipedia.org/wiki/Digital_signal_processor

Image of thermometer is courtesy of User: JePe from Wikimedia Commons.

6 thoughts on “Digital Measuring Devices (Part 1)”

  1. Fahrenheit lovers not knowing the difference between precision and resolution claim that Fahrenheit is more precise because there are more digits between freezing and boiling than there are in Celsius. More resolution does not increase precision. For a very long time when analog thermometers ruled, Celsius marking were every one degree, where as Fahrenheit markings were every two degrees. The precision of the thermometers was that they only were able to display to +/- 1°C. A 1°F would be a false reading.

    Even with digital thermometers, consumer grade thermometers are not any more precise but it seems that they can be programmed to display Fahrenheit degrees to every 1°, giving the illusion of equal precision with Celsius.

    It would seem from the chart above that the doping of the sensor semiconductor material to produce a consistent measured value with change of temperature is going to be precise in Celsius or Fahrenheit, but not both. One will be the base unit and the other the afterthought. Since Celsius is the most popular scale world-wide, Celsius is the base unit in all digital thermometers produced and Fahrenheit results strictly from a conversion.

    Like

  2. I suppose the the same is true for cars: coded in metric, converted to imperial as an afterthought

    Even Apollo 11’s source code is metric

    Like

  3. Following on from 0 Dogs Remaining’s comment, I recently spotted a disturbing discrepancy in the speedo on my motorcycle.

    Having driven in Europe many times in my car, switching from imperial to metric is second nature and so when two years ago I did this on my motorbike I did the same thing. I use an app to track my fuel consumtion and service intervals and rather usefully the app allows you to switch units and currencies without impacting the overall stats, but I was shocked that my fuel consumption between Dartford and a service station in France seemed particularly poor. The opposite happened betwen my final tank full in Calais and the next fuel stop in Cambridshire.

    It turns out that there is a massive bug in the display on my Kawasaki, and this has been seen by other riders of the same model. If I take today’s overall distance of 31192 MI and switch the display to metric it displays 49907 km when it should actually read 50198 km. Doing the maths it turns out that it’s using a factor of 1.6 km to 1 mile instead of the proper 1.609344!

    Given that it’s a Japanese bike I’m guessing that the km reading is the correct one but as of yet I’ve not been able to get an answer out of my local dealer. Thankfully the laws regarding the accuracy of speedometers and the difference at low numbers is negligable enough that the difference isn’t an issue on the speedometer itself. But it begs the question, is this actually legal?

    I know both of our family cars are correct!

    Like

  4. Free Thinker,

    What you need to do is drive a known distance of say 10 miles. If the distance on the odometer shows 10 miles or 16.0 km, then you know it measuring in miles and converting to kilometres and multiplying by 1.6.

    You can repeat the test by driving a known 20 km distance and see if the miles are 12.5 miles or 11.8 miles. This will tell you for sure which way the conversion is going.

    Like

  5. @Free Thinker – I checked the legislation and it appears that it is an offence to sell a vehicle if the odometer has a lower reading that it should display.  In your case, if the kilometre reading is correct, then the mile reading will be too high, so you will be OK. If however the mile reading is correct, then the kilometre reading will be too low by about 0.6% which, technically speaking, is an offence (if you know about it), but in practice I don’t think that any buyer would take you to court as it would not be worth it.

    The best way to check whether the mile or the kilometre reading is correct is probably to take it for a run along a long stretch of motorway and to calibrate your odometer against the driver location signs. If, over a 200 km ride, the discrepancy is less than 1 km, then the kilometre reading is probably correct.  You should of course remember that tyre wear can affect the odometer readings as the odometer usually operates from wheel revolutions and since worn tyres have a smaller circumference, they appear to clock up more distance than quickly than new tyres.

    Like

  6. @Daniel @Martin Vlietstra every time I get a new vehicle I use various methods to check the accuracy of the speedometer so am no stranger to measuring distances, using GPS, and looking at those road-side speed boards that are popping up everywhere. There are so mny variables involved and the odometer is never going to be 100% accurate.

    What really concerns me is that a manufacturer of the size and reputation of Kawasaki could do such a poor job of converting units. Since my first comment I’ve sent them an email… I will report back on what they say!

    Like

Leave a comment