Basics of Design • CC Blog • Research & Design Hub

Sensors: From Canned Tuna to Caviar

Written by Brian Chee

In the first installment of a new Circuit Cellar column on sensors, Brian Chee looks at how sensors figure into larger application packages and when “just enough sensors” can be the perfect solution.


  • How do you choose the right sensor for an application?
  • What are the differences between 1-Wire, I²C, and multidrop interfaces?
  • How do accuracy and measurement range affect sensor selection?
  • When should analog sensors be used instead of digital sensors?
  • What practical challenges can cause sensor readings to become inaccurate?
  • Temperature sensors
  • DS18B20
  • PT1000
  • 1-Wire
  • I²C
  • RS-232
  • Multidrop serial
  • LoRaWAN
  • Meshtastic
  • Node-RED
  • WIO Node
  • Analog-to-digital converters
  • DS2450
  • Thermistors
  • Raspberry Pi
  • Single-board computers
  • Analog Devices | analog.com
  • Atlas Scientific | atlas-scientific.com
  • Dragino | dragino.com
  • Seeed Studio | seeedstudio.com
  • IBM | ibm.com
  • University of Hawaii | hawaii.edu
  • Dallas Semiconductor | dalsemi.com
  • Maxim Integrated | maxim-ic.com

We’re surrounded by sensors in one form or another in thermostats, speed sensors, even irrigation systems. Using temperature sensors as an example, there are some key issues that are often overlooked. This article details some of the content the instructors for Oceanography 318 and 418 at the University of Hawaii taught about the planning and building of sensor packages. A good chunk of what you’re paying for with commercial sensor packages is the development, marketing, and product support. The goal of these classes was to allow students to stretch scarce research funds by building their own sensor packages. This installment is about sensor interfaces and a bit about choosing sensors for your projects.

The questions you should answer early in the design process includes:

  • What level of accuracy does the application require?
  • What are the ramifications of the sensors giving incorrect readings?
  • How often do you need to take readings?
  • How do you match the available interfaces on the reading platform to the sensors that meet the listed requirements?

I normally start with matching the measurement range to the application paying close attention to accuracy requirements. For example: I’m trying to measure water temperature exiting solar water heater panels and compare that to the water storage tank.

In someplace such as Florida, water temperatures would vary between just above freezing to what would be considered scalding (around 120°F or 49°C) and perhaps widening it a bit as a safety margin. With water temperature the accuracy of a couple degrees plus or minus is perfectly acceptable, but in say the production of caramel candy, it should be closer to the target temperature to avoid burning the sugar as it turns to caramel.

For other industries such as the production of pharmaceuticals, the temperature requirements could require process tanks to stay within a tenth of a degree. I got involved with a medical laboratory and found normal digital temperature sensors such as the DS18B20 (Dallas Semiconductor digital serial multidrop temperature sensor) shown in Figure 1 with a range of -67°F to +257°F (-55°C to +125°C) but to stay inside a 1/2 degree Celsius one needs to stick between -10°C to +85°C [1].

Figure 1
Inexpensive = compromise: if your measurements are in the middle sweet spot you might be fine, but out at the ends of the curve you might get errors outside your acceptable range.
Figure 1
Inexpensive = compromise: if your measurements are in the middle sweet spot you might be fine, but out at the ends of the curve you might get errors outside your acceptable range.

In this particular, application I used an Atlas Scientific PT-1000 Temperature Probe with a range of -200°C to +850°C staying ±(0.15 + (0.0002*t)) as shown in Figure 2. Especially useful for keeping track of liquid nitrogen dewars containing genetic material. The PT-1000 is in the $65 range so a higher price than the more common DS18B20.

Figure 2
In my case future generations were dependent on genetic material being stored in a very narrow temperature range. I spent more on a sensor that had a wider effective measurement range, and more accurate measurements.
Figure 2
In my case future generations were dependent on genetic material being stored in a very narrow temperature range. I spent more on a sensor that had a wider effective measurement range, and more accurate measurements.

Pricing for the DS18B20 can be found in the range of $1.50/each in small quantities packaged in stainless steel shrouds to make them waterproof. However, buying the raw sensor chip can get into the $0.10 range in quantities, priced low enough that I once proposed spot welding the chips across some wire, coating it in an insulator, and plowing the cable into crop fields to measure temperature across the whole field.

The goal was to use existing pesticide tables to predict pest emergence and fine tune the amount of fertilizer and pesticides to use in a field. Common to both temperature sensors is that you harvest data from each sensor with a serial communications method and that single serial data connection can have more than one sensor on it.

Too often the device harvesting data from the sensors is driven by legacy equipment and one must take into account what kinds of sensor interfaces are available for that platform. So take a good hard look at your data collection platform to see what kinds of interfaces are available and also what software toolkits can drive the data collection from the sensors.

In the case of the 1-Wire interface used by the DS18B20, each sensor chip is actually the size of a grain of rice and has a hardware address permanently set at the factory. The maximum number of sensors per wire bus is more of a function of timing.

AI searches keep insisting on only nine sensors as a maximum, but Maxim (the current manufacturer) has documentation up to several hundred. I’m leaning toward saying AI is only partially correct since like Ethernet, maximums are governed by time more than physical devices and wire length.

These physical characteristics are important because actions such as collecting all the one-wire addresses must happen within a certain amount of time. So if the wire is too long, the answer may arrive after the deadline.

Let’s get a bit of perspective by telling the story of Alfie, Billy, and Charlie and their tin-can telephones, an example I first heard from Codex Corp. about how Ethernet works.

Figure 3
A tin can telephone for Alfie, Billy, and Charlie illustrates the mechanics behind carrier sense, multiple access networks. Idea borrowed from Codex Corporation education material teaching the basics of Ethernet.
Figure 3
A tin can telephone for Alfie, Billy, and Charlie illustrates the mechanics behind carrier sense, multiple access networks. Idea borrowed from Codex Corporation education material teaching the basics of Ethernet.

The basic story is that Alfie, Billy, and Charlie were talking to each other on a tin-can telephone (see Figure 3). The rules for the communication process on the tin-can telephones included:

  • Listen before transmission.
  • Everyone hears everything.
  • If a collision happens, back off a bit and try again.
  • Responses must occur within a certain amount time.

In the Ethernet world (created by Norm Abramson of the AlohaNet DARPA project, with collision detection added by Bob Metcalf of Xerox PARC) this process is called “carrier sense, multiple access with collision detection or CSMA/CD. It’s a pretty good model and probably why variations on this process are found in most bus-type communications systems.

1-Wire [2] originally created by Dallas Semiconductor and now owned by Maxim Integrated Semiconductors, will first have you iterate the devices on the serial bus to get a listing of all the device addresses. Following this step, devices will talk directly to each other to harvest data.

Because timing is critical, the typically initial listing process will iterate through the serial bus to determine which device is closest and how many there are on the bus.

I²C (normally pronounced as eye-squared-see) is in my opinion a more general purpose communications bus [3]. Like Ethernet, I²C communications require an address portion to send out data to a destination, but unlike Ethernet, the I²C world requires a master to be set up on the serial bus.

With a 7-bit address, the I²C world can potentially have up to 128 slaves on an I2C serial bus.

Getting to the point, both 1-Wire and I²C are popular enough that software toolkits are available for most common programming systems (i.e., Python, C++, C#, and others) where actions such as filling an array with the addresses of all the 1-Wire sensors is a single function call [4].

MultiDrop serial is an older protocol that I should at least mention, since it’s still in use around the globe. The idea is that Telecom companies implement a multidrop communications line for applications (e.g., automatic teller machines).

Each multidrop modem client will raise the “request to send” line on the RS-232 interface shown in Figure 4 and will then send it’s data on the wire. When finished it would then lower its “request to send” line as shown in Figure 4, where DTE refers to data terminal equipment and DCE refers to data communications equipment [5].

Figure 4
The RS-232 serial interface was originally a 25-pin plug/socket and had several different pins to control the flow of data, and literally bells on teletypes.
Figure 4
The RS-232 serial interface was originally a 25-pin plug/socket and had several different pins to control the flow of data, and literally bells on teletypes.

The advantage of multidrop “leased line” communications was cost, since Telecoms would charge dearly for leased lines and by using a multidrop leased line (versus point to point), we could connect several ATMs for a lower cost over some fairly long distances. When I say long distances, these lines could potentially cross oceans and why they were popular until they were replaced by the Internet.

How does the sensor tell its story?

One would think that temperature should be a fairly simple sensor, but much depends on how the manufacturer has decided to implement a particular sensor. One of my favorite temperature+humidity sensors from Dragino shares its measurements as a table that then has to be parsed by each field and since it shares temperature in Celsius, you would then need to convert to Fahrenheit.

Since both 1-Wire and I2C have multiple devices on a single interface, you need to specify which device on the bus you want to talk to.

One cute trick I used with 1-Wire sensors is to just twist the wires together and then put one sensor at a time into a cup of warm water to figure out what order they were in. Then place each sensor into the appropriate container of chemicals.

If you really don’t want to do any programming (or very, very little) might I suggest looking at the WIO system from Seeed Laboratories [6], which is literally plug-and-play to harvest sensor information into an app. The better part is that combining the WIO sensor system with Node-Red, you can drag and drop the WIO sensors onto a worksheet and use Node-Red connectors to push the data to places such as webpages or Google spreadsheets.

Figure 5 shows a USB powered WIO “Node” with an ambient air temperature+humidity on one port and a waterproof DS18B20 on the other. The idea is to get the ambient air temperature and humidity along with the waterproof temperature probe inside the HVAC supply air duct. The data is then fed to a Google spreadsheet so that we can-do long-term tracking of HVAC usage and equipment health in an exposition venue.

Figure 5
The WIO Node by Seeed Laboratory with an air temp+humidity sensor on one plug and a water proof temperature sensor on the other. Powered by 5V DC USB, the trade off was the cost of adding a new power plug to run this versus the Dragino LoRa (with the same sensors) but with a multi-year battery. The WIO system is nice in that its data can be harvested by the Node Red drag and drop zero programming system from IBM.
Figure 5
The WIO Node by Seeed Laboratory with an air temp+humidity sensor on one plug and a water proof temperature sensor on the other. Powered by 5V DC USB, the trade off was the cost of adding a new power plug to run this versus the Dragino LoRa (with the same sensors) but with a multi-year battery. The WIO system is nice in that its data can be harvested by the Node Red drag and drop zero programming system from IBM.

(Note: I’m trying to decide between the cost of adding a power outlet for the USB power supply versus the higher cost of a Dragino LORAwan sensor with a 10-year battery. Decisions, decisions, decisions.)

I’m going to digress for a moment to paraphrase a story that’s been circulating on social media. The gist is that a particular army tank was down and engineers from the manufacturer and the best mechanics at the army base were stumped as to why the turbine engine wouldn’t start even though all the diagnostics said the tank was in perfect condition.

They brought in a retired mechanic who fixed the problem with a can of compressed air and a rag. The issue occurred when the tank was transported from a high-humidity environment (in this case the Pacific Northwest of the US) into a desert environment with ultra-fine desert dust. The problem was that the sensors inside the turbine engine were getting caked by moisture and dust mixing on the end of the sensors.

The sensors told the engine controller that it was fine because the business end of the sensor was caked over and no longer able to determine the environment inside the engine combustion chamber (or whatever they call it inside a turbine engine).

Regardless of whether the story is real or not, the point is that sensors aren’t perfect, and if the design doesn’t take into account the environment, you could end up with the sensors getting false readings.

An example that hits a bit closer to home for me is how PH sensors typically consist of two (or more) platinum wires to measure conductivity in the liquid. However, especially in the case of salt water, dissolved minerals in the seawater will slowly coat the wires and change the conductivity and mess up the PH measurements.

So getting back to my example where I want to compare ambient air temperature to that of the air coming out of the HVAC supply ducts; I shouldn’t just drill a hole and shove the temperature probe into the duct.

Companies such as Atlas Scientific provide an item called a “thermowell” that is basically a tube that can fit the temperature probe with a thread at the end, as shown in Figure 6 to allow it to screw into something to create a tight seal. This is very important if you’re trying to measure the inside of something such as a liquid nitrogen dewar or perhaps a tank of beer.

Figure 6 A stainless steel thermo well by Atlas Scientific provides a thermally stable waterproof way to measure temperature without changing the contents you are measuring or introducing leaks. *
Figure 6
A stainless steel thermo well by Atlas Scientific provides a thermally stable waterproof way to measure temperature without changing the contents you are measuring or introducing leaks. *

While various manufacturers make plastic versions or you could potentially 3D print something similar… you need to ask yourself if it’s appropriate. The version from Atlas-Scientific is thermally conductive so that you can get truer temperature reading, while still providing a reliable seal.

I’m going to confess that I lean toward digital sensors where the readings are in normally definitive steps. However, I’d be remiss if I didn’t mention analog sensors and their place in the world.

Analog thermal sensors are found in hot tubs, solar water heaters, under the hood of your car, and even keeping an eye on the temperature of pool pumps. Many analog thermistors change their resistance as the temperature changes [7] allowing for temperature sensors that can be connected to some simple electronics. Too hot and it would cut off the power to the heating element, too cold and snap it’s back on.

I’d like to point out that just because your reading platform (i.e., Raspberry Pi or Arduino, etc.) does not have an available analog interface, does not, mean you cannot use an analog sensor.

Here are some questions to ask that are driven by things I mentioned at the start:

  • What level of accuracy does the application require?
  • What are the ramifications of the sensors giving incorrect readings?
  • How often do you need to take readings?
  • Can you matching the available interfaces on the reading platform to the sensor that meet the requirements?

An analog interface allows you to periodically take readings of the analog world’s levels and convert those values into numbers. An example is a thermistor found in a hot tub or a solar water heater where the resistance changes according to the temperature.

I have used the Dallas Semiconductor (now Maxim Integrated/Analog Devices) DS2450 analog-to-digital (A/D) device that will take the observed value and convert it to number. I’m fond of this type of interface since I can use it with a wide range of analog sensors and connect it to a Raspberry Pi over the 1-Wire interface.

It’s important to note that A/D interfaces come in various “resolutions” denoted as how many “steps” are used to represent the value as shown in Figure 7, which comes from a very useful All About Circuits article [8].

— ADVERTISMENT—

—Advertise Here—

Figure 7
The step illustration on how A/D interfaces convert analog measurements into digital values. If those “steps” are unacceptable, (i.e., too wide) you can typically move to an A/D interfaces with more steps to increase accuracy.
Figure 7
The step illustration on how A/D interfaces convert analog measurements into digital values. If those “steps” are unacceptable, (i.e., too wide) you can typically move to an A/D interfaces with more steps to increase accuracy.

Anyway, before I ramble too far astray, it really comes down to the old saw of: who, what, where, when, and how. Who needs to see the data? What are you measuring? Where are the sensors? When, or more accurately how often, do you need to take readings? And how do you talk to the sensor?

We have a lot of choices in this new age of capable single-board computers (SBCs) and sensors available in a ton of different flavors. I’m in the habit of collecting sensors and SBCs in as wide a variety as possible so that I can better fit the sensor platform to the application; be it deep underwater, at the edge of volcano, or rolling around in the back of a freezer container making sure that a side of beef hasn’t defrosted. The Atlas Scientific PT1000 temperature sensor helps alert people if a liquid nitrogen dewar containing genetic material is warming up.

Next Time

Next time, I’ll be adding sensors to Meshtastic nodes. I’m a big fan of Meshtastic because no matter how you use it—from water level sensors to detect rising flood waters to remote weather sensing—Meshtastic applications don’t require big networks like cellular or Wi-Fi in order to move data from one point to another.

Meshtastic has proven that it’s easy to have a radio providing off grid text messaging, but when you start throwing sensors into the mix it becomes a bit harder to get everything working together. 

RESOURCES
Analog Devices | www.analog.com
Atlas Scientific | https://atlas-scientific.com
Dragino | https://www.dragino.com
Seeed | www.seeedstudio.com

REFERENCES
[1] https://community.st.com/ysqtg83639/attachments/ysqtg83639/mcu-embedded-software-forum/55896/1/schematic%20DS18B20_TO-92_datasheet_0ec6827c-2bee-4eca-8a6d-5d68ae26bd8f.pdf
[2] https://www.analog.com/en/resources/technical-articles/guide-to-1wire-communication.html
[3] https://www.circuitbasics.com/basics-of-the-i2c-communication-protocol/
[4] https://docs.micropython.org/en/latest/esp8266/tutorial/onewire.html
[5] https://www.aggsoft.com/rs232-pinout-cable/serial-cable-connections.htm
[6] https://wiki.seeedstudio.com/Wio_Node
[7] https://www.wattco.com/2023/08/what-is-a-thermistor/
[8] https://www.allaboutcircuits.com/technical-articles/adc-resolution-vs-adc-accuracy-subrange-adc-two-step-adc-and-total-unadjusted-error/

Image Credits:
Figure 1 – https://community.st.com/ysqtg83639/attachments/ysqtg83639/mcu-embedded-software-forum/55896/1/schematic%20DS18B20_TO-92_datasheet_0ec6827c-2bee-4eca-8a6d-5d68ae26bd8f.pdf
Figure 2 – https://www.researchgate.net/figure/Pt1000-temperature-sensors-R-T-relation-curve-of-the-actually-measured-data_fig2_372145342
Figure 4 – https://www.aggsoft.com/rs232-pinout-cable/serial-cable-connections.htm
Figure 6 – https://atlas-scientific.com/temperature/50mm-temperature-thermowell/
Figure 7 – https://www.allaboutcircuits.com/technical-articles/adc-resolution-vs-adc-accuracy-subrange-adc-two-step-adc-and-total-unadjusted-error/

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • FEBRUARY 2026 #427 – Get a PDF of the issue

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article
+ posts

Brian Chee is an IT professional with experience spanning over three decades in various roles, including IT Specialist, Systems Programmer, and Computer Scientist. Now on the Board of Directors for Central Florida Fair, Brian has been a Senior Contributing Editor for InfoWorld Magazine and host of TWiT LLC’s This Week in Enterprise Technology. Brian’s career includes significant contributions at the University of Hawaii at Manoa, where his expertise in network systems and high-speed networking developed. Brian holds a BS in Computer Science from Chaminade University of Honolulu, and studied Information and Computer Sciences at the University of Hawaii at Manoa.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2026 KCK Media Corp.

Sensors: From Canned Tuna to Caviar

by Brian Chee time to read: 13 min