Yep, one's digital and the other is analog (so, GPIO pin vs ADC+math), but the thermistor costs like $0.30 vs about $3 for the 1-Wire option. I think the precision of the thermistor might actually be higher too, and its like 100x faster to read out.
I have to think a thermistor could be designed for zero power when not being read. It's not addressable, if you needed a bunch of peripherals to share a pin or a remote cable. And yes, probe wire will affect the reading, but at high thermistor resistance values it won't be a major factor.
Do people go for the 1-Wire chip just for its simplicity, or am I missing an important element? E.g., if I added one to every device to monitor the radio crystal for temp correction, it starts to add up.
Cheers,
Richard
I've also wondered about this. $3-4 for reading temperature at a dismal accuracy and at like 1sec reading delay? What!??
I think it's the work of the big maker movement retailers who promoted such sensors which makes them more margin than a 0.30 thermistor.
That being said, I am creating a Moteino shield with digital i2c sensors that are very accurate, ultra low power, ultra fast to read. They come at a cost, but they make for a nice weather sensor board, providing temp, hum and pressure.
The issue with powering the resistor only when reading it is that it will behave different and drift over temperature. Also when you pass a current through it it will react different after a while vs after a short power time (depending on the actual resistance) - this might be marginally important but something to think about. I think most cheap thermostats use a 1% thermistor.
Well, it's tough to get humidity reading from a Thermistor. It can be done, but...
If all you want is temperature, I've got a diode that will...
Also, if you're trying to measure a point that's 25 feet away, a thermistor might be a problem. One wire does that very nicely.
Net is that there are lots of choices because there are lots of applications that demand lots of alternatives.
Tom
Agreed, if there wasn't a market they wouldn't survive long. e.g., if I had a string of temp sensors around an area, I'd need the addressability of 1-wire and the added cost would be cheaper than having multiple sensor controllers.
Given an application where ADCs are readily available and the temp reading is local to the MCU's board (e.g., reading the temp of the radio crystal), I'm just curious if I'm missing a gotcha with thermistors.
Regarding resistance changes with longer readings - I could see this with current mode as the heat soaks the part, but I was thinking of resistance mode (presumably a voltage divider arrangement) so the current through it should be very small and not vary the temp reading much. But this is new territory for me; I'm trying to gauge the path worth taking here.
Cheers,
Richard
Quote from: Richard on January 24, 2015, 11:43:27 PM
Agreed, if there wasn't a market they wouldn't survive long. e.g., if I had a string of temp sensors around an area, I'd need the addressability of 1-wire and the added cost would be cheaper than having multiple sensor controllers.
Given an application where ADCs are readily available and the temp reading is local to the MCU's board (e.g., reading the temp of the radio crystal), I'm just curious if I'm missing a gotcha with thermistors.
Regarding resistance changes with longer readings - I could see this with current mode as the heat soaks the part, but I was thinking of resistance mode (presumably a voltage divider arrangement) so the current through it should be very small and not vary the temp reading much. But this is new territory for me; I'm trying to gauge the path worth taking here.
Cheers,
Richard
Sorry, I missed that you had a specific application in mind (reading crystal temp). Any discrete solution would require peripheral electronics to:
- Amplify (thermistors might have an advantage here, but you have to keep current very low to prevent self-heating)
- linearize (Thermistors are in the middle of the pack in this regard)
- calibrate (any discrete solution will require at least two calibration points)
Power management, as you say, could be pretty easy, depending on how fast (and how much current) the peripheral electronics is.
You might look into the SMD version of the MCP9700A (-LT or -TT). It's small and relatively low cost ($0.31 in 10 pc qty) and has taken care of all of the above. If you use the 1.1V bandgap reference as the ADC reference, you'll get the most resolution and accuracy. They're low power and settle reasonably fast so powering from a GPIO is usually ok.
The TO92 version can be glued directly to your crystal...
Tom
Thanks for the pointer! That sounds perfect - I'll give it a look.
Certainly on a small scale, a couple bucks isn't a big deal and rapid prototyping is more valuable than cost efficiency. I do need to keep that in mind, as I have a tendency to design for volume which requires solving cost / manufacturing / test problems before they're real, and this slows my design speed. (On the other hand, I dislike re engineering a working solution.)
Cheers,
Richard
There are a lot of good reasons to use 1Wire, most of which have been pointed out here. I use all sorts of sensors for all sorts of applications, so let me offer my 2c.
MultidropThis is just impossible with analog sensors. I don't think I need to explain how awesome this can be for an application.
IO RequiredNow I realize we're on a micro forum, where we presumably all have at least half a dozen ADCs to play with, but this is not always the case. An RPi and some other SBCs don't have ADCs. Add-on ADCs for a thermistor, RTD, or thermocouple when not necessary are just a waste. Even if you are going to use an RTD or thermocouple, I would recommend dedicated ICs that allow you to talk to them over I2C or SPI. Even for 1Wire I use dedicated I2C masters (which cost $1). Anyway, if you've nothing but a digital pin or two, you can use a 1Wire sensor or few with kernel drivers or some bitbanging.
PrecisionWithout amplifying electronics (additional circuitry, complication and $$$), you will get worse accuracy with a thermistor or an RTD. Worse, the measurements require measuring resistance. This requires an additional comparator such as a resistor, or a constant current source. You can buy these (constant current sources such as the LM334) for RTDs for about $1, but you need a precision resistor or to calibrate it yourself. If you do not use a constant current source, you need to carefully optimize a series resistor to keep current ideally well below 1mA to minimize self-heating, and preferably even lower if you have a temperature sensor in air. Let me offer an example here:
PT1000 thermocouple. Minimum resistance of 1kohm. To get current of
[email protected], you are going to need something like a 2.2k resistor in series. Now let's look at your ADC. Let's assume we're talking about the typical 10-bit micro. This is 3.3V by 1024, or 3.2mV. At 25C, you will have an ADC reading of 320 (assuming the RTD is on the high side). Your next ADC step is 321, which corresponds to 1003.125ohms, or 0.81C. That, quite simply, sucks, and gets worse as temperature increases. Compare this to 0.0625C at 12-bit for the DS18B20 (0.5C accuracy), and the fact that it's adjustable resolution, the DS18B20 wins easily here. Even a 12-bit ADC will only buy you 0.20C resolution.
AccuracyThe DS18B20 is calibrated and rated at 0.5C. Now technically you can do better with a thermistor or RTD, but you must calibrate with a known temperature standard. This is a pain, you must consider nonlinearity and the temperature of the resistor you are comparing with, and without a good op-amp circuit you are not going to get it accurate. Oh, and did I mention self-heating? Blech. This stuff is often a nightmare to deal with. Even at 3mA you can get 10C temperature drift.
Sample rateWhile you might complain about the sampling time, there are few applications where the sampling rate is really an issue, and you can, as I mentioned, adjust the sampling rate from 9bits (94ms) to 12bits (750ms). Considering even the 9-bit value is as or more accurate than you will get practically with other methods, 94ms isn't too long to wait for 0.5C precision at 0.5C accuracy, is it? Most of the time, you can get around all practical sampling issues by better coding, reading cached values, and otherwise being smart about what you are doing.
CostFirst of all, you can get DS18B20s on eBay for $1. Sure, they are probably knockoffs, but I've yet to have one fail, and you can get the real deal for $2 or less. If the $1 breaks you on a project (especially if you consider all I wrote above regarding time spent calibrating and external circuitry), you should probably reevaluate your project.
Temperature RangeAt the end of the day, this is the biggest drawback for 1Wire temperature sensors, and really the only reason I choose something else. But again, -25-125C will cover 95% of all applications. After that, I go to RTDs, and then thermocouples only if absolutely necessary. I never use thermistors. Calibration and calculation are a mess, and they're usually not very accurate.
Cheers,
Colin
As an addendum:
Form Factor
This is another place where I can using a thermistor.
If you need SMALL SMT devices, throw a resistor and SMT thermistor on there and call it good.
You can get DS18B20 SMT, in SO and uSOP, but they're not as tiny as some thermistors.
For the record, you can also get a DS2438 in an SOIC, which you can use to monitor temperature, voltage, AND current. Yes, they'll cost you $2, but man that's pretty cool functionality.
Just getting started with the Moteinos, and I stumbled across this thread. Thought I would throw in a link to my experiments with the DS18b20's:
http://edwardmallon.wordpress.com/2015/03/01/using-ds18b20-sensors-to-make-a-diy-thermistor-string-pt-1-the-build/ (http://edwardmallon.wordpress.com/2015/03/01/using-ds18b20-sensors-to-make-a-diy-thermistor-string-pt-1-the-build/)
for these underwater sensors, the decision to go with one-wire was based primarily on multi-drop & long distances. The challenge is that "research grade" thermistor strings deliver considerably better accuracy than the +-0.5C I get from the DS18b20s (but they also run $100-$200 per sensor node) I will be happy to get the DS18's to a more modest +- 0.2C if I can.
I knew that looked familiar. I got a pingback from that site to my CuPID Controls blog. Cool project.
Cheers,
C
DS18B20's are also pretty rugged. I wired one up backwards the other day, reversed Vcc and ground. By the time I shut it off it had already melted through the plastic bag it was in along with the dupont connectors it was plugged into. After powering it off and correcting the wiring it still worked good as new. If you don't need long cable runs and are looking for an SMD package, the MCP9808 is also a decent pre-calibrated alternative and probably a bit cheaper than the OneWire components.
Just thought I would post a little progress report on our use of DS18b20's. I think we finally have a procedure to calibrate them to the point where they compare well with commercial kit:
http://edwardmallon.wordpress.com/2016/03/05/ds18b20-calibration-we-finally-nailed-it/ (http://edwardmallon.wordpress.com/2016/03/05/ds18b20-calibration-we-finally-nailed-it/)
It's almost more work to calibrate these sensors than actually building the loggers themselves, but the thing to keep in mind is our typical installation uses somewhere near 50 temperature sensors, and the signals we are looking at only span 1 degree C if we are lucky. So even at the low end of the market an installation like that would cost somewhere between $5-7 thousand bucks. So it's worth the effort for us, though that's probably not the case for everyone.
Thanks Ed!
Quote from: EdM on March 07, 2016, 01:42:14 PM
Just thought I would post a little progress report on our use of DS18b20's. I think we finally have a procedure to calibrate them to the point where they compare well with commercial kit:
http://edwardmallon.wordpress.com/2016/03/05/ds18b20-calibration-we-finally-nailed-it/ (http://edwardmallon.wordpress.com/2016/03/05/ds18b20-calibration-we-finally-nailed-it/)
It's almost more work to calibrate these sensors than actually building the loggers themselves, but the thing to keep in mind is our typical installation uses somewhere near 50 temperature sensors, and the signals we are looking at only span 1 degree C if we are lucky. So even at the low end of the market an installation like that would cost somewhere between $5-7 thousand bucks. So it's worth the effort for us, though that's probably not the case for everyone.
I guess your reason for the "dry well" was to keep water out of the sensor body so that any post-test residual wold not be sealed inside when you subsequently epoxied it?
I would think that rather than incur the thermal mass of the metal probe tip plus epoxy around the sensor, you might prefer to waterproof just the DS18b20 leads and have the DS18b20 plastic package in direct contact with the water. Is the DS18b20 plastic package not waterproof enough for that?
I've just had that problem to solve, specifically detecting when the ambient (PCB temperature) was below -10degC or above +50degC. I ended up using a potential divider with a 1% 10k top resistor, a 1% 10k NTC thermistor for the bottom resistor (TDK B57330V2103F260, 0603 package) and a 10nF smoothing cap into an ADC input on a micro. This is fed from the top by a switched voltage reference (LM4040, 2.048V) which is also the voltage reference for the A2D so ratiometric and invariant to reference tolerance. Simple and accurate enough for my purposes.
Mark.
@ Wh Sorry for being out of touch for a while.
Yes the aluminum was originally to keep things dry because the waterproofing on those ds18 was so bad I was killing off the sensors during overnight calibrations. But it turned out to be even more useful in the end because the thermal conductivity of the aluminum held all the sensors at exactly the same temp at the reference - dramatically more so than the water did.
Wrt putting the DS18 plastic in contact with the water: we install our loggers down to about 25 m, and the pressure has killed of several different IC temp sensors so far:
https://edwardmallon.wordpress.com/2016/04/06/field-report-2016-03-17-mcp9808-fails-under-pressure/
The DS18's have proved the most robust, but I am beginning to think is because the metal sheathing around those waterproof sensors is providing extra protection from the pressure at depth. I am now beginning to look at thermistors, and I will probably epxoy them inside of the metal caps as well before we put them under water.
Thermistors, e.g. NTC resistors, are accurate and robust. That sounds like the best option.
Mark.
Sorry to revive such an old topic but it's really a good match for my question. I'm a researcher and work with temperature-controlled solutions in small volume chambers. I have a rpoblem with a recent equipment acquisition (from a different, less known manufacturer) and the temperature controller has a probe based on the DS18S20 (maybe it's a typo as I can only find the DS18B20), the problem being that it's just way too large for this specific application. Temperature probes from other manufacturers are based on bead thermistors, so I was wondering if there is a bead thermistor with similar characteristicas that can be used instead. The input in both cases (bead or DS18S20) is BNC so I would like to just make a probe in house that can be connected to the temperature controller that is expecting to have connected a probe based on DS18S20. Can you please help, as this is not my domain? I know enough electronics to assemble the thing, but I'm lost with the overwhelming amount of different thermistors available. One important aspect is for it to be small.
Thanks in advance for any input.
Paulo from Portugal
@pcspinheiro, it sounds as if your temperature controller is expecting a one wire probe, not a thermistor. The two are not interchangeable. It would be extremely difficult to translate a thermistor reading to a one wire signal.
It may be that your temperature controller will accept either type of probe (on separate pins or some reconfiguration). Can you post any information about your controller?
Tom
You can get just the DS18B20 by itself without the waterproof packaging.
https://www.digikey.com/product-detail/en/maxim-integrated/DS18B20/DS18B20-ND/420071
(https://media.digikey.com/photos/Maxim%20Photos/406-TO-92.jpg)
is the same as (I believe)
https://www.adafruit.com/product/381
(https://cdn-shop.adafruit.com/970x728/381-00.jpg)
Quote from: TomWS on December 13, 2018, 09:05:53 AM
@pcspinheiro, it sounds as if your temperature controller is expecting a one wire probe, not a thermistor. The two are not interchangeable. It would be extremely difficult to translate a thermistor reading to a one wire signal.
It may be that your temperature controller will accept either type of probe (on separate pins or some reconfiguration). Can you post any information about your controller?
Tom
Thanks for the reply Tom. The temperature controller we are using is a Supertech Instruments TMP-5x series (don´t have the exact model number as I'm not in the lab). It's hooked up to their low voltage DC heater for electrophysiology applications. The main problem we have is that the chamber for the experiments is really small (this is normal and best left unchanged) and the probe that they sold us is huge in comparison. Warner Instruments, for example, have a temperature controller that uses a thermistor probe that's no bigger than 1x3 mm and this is ideal, but was way off our budget. Actually, the people that bought the system didn't even realize it had no probe included, so I suggested a thermometer-based calibration of the temperature (which works, but needs a long wait before experiments to reach stability). Therefore, not knowing about these differences in the temperature probes I suggested we try to find a thermistor that has the same characteristics as the DS18B20...
Anyway, it seems like it won't be possible then, but I appreciate your help.
Quote from: pcspinheiro on December 13, 2018, 10:06:55 AM
Thanks for the reply Tom. The temperature controller we are using is a Supertech Instruments TMP-5x series (don´t have the exact model number as I'm not in the lab). It's hooked up to their low voltage DC heater for electrophysiology applications. The main problem we have is that the chamber for the experiments is really small (this is normal and best left unchanged) and the probe that they sold us is huge in comparison. Warner Instruments, for example, have a temperature controller that uses a thermistor probe that's no bigger than 1x3 mm and this is ideal, but was way off our budget. Actually, the people that bought the system didn't even realize it had no probe included, so I suggested a thermometer-based calibration of the temperature (which works, but needs a long wait before experiments to reach stability). Therefore, not knowing about these differences in the temperature probes I suggested we try to find a thermistor that has the same characteristics as the DS18B20...
Anyway, it seems like it won't be possible then, but I appreciate your help.
Do you need the external sensor? According to the user manual:
QuoteIt is possible to eliminate the usage of the external temperature
sensor, because in every heated object manufactured by Supertech there is a built-in
internal temperature sensor. Please, do NOT use the external sensor, except under
particular circumstances.
Unfortunately yes, we need the external temp sensor because the perfusion chamber for the electrophysiology recording is not from the same manufacturer and, therefore, it does not have any built-in sensor. We have calibrated the temperature needed at the heating element that gives us 30ºC at the bath using a thermometer, but this will obviously not be accurate anymore once a microscope objective is immersed in the solution and starts conducting heat away, and in this case the thermometer won't fit the chamber for a new calibration. So yeah, we're kinda stuck until we find a probe small enough for the chamber. Whoever bought this should have considered these things, and it would have been better to try and find the additional € than to have something that's not really practical or functional. I guess, based on the info I already got from you, that using a thermistor-based probe is not possible at all?
I'll break the bad news to the person that bought this heating system...
Thanks a lot for your help!
Cheers,
Paulo.
Quote from: pcspinheiro on December 14, 2018, 04:36:34 AM
I guess, based on the info I already got from you, that using a thermistor-based probe is not possible at all?
Well, nothing is 'impossible' so it is 'conceivable' to make such a translator circuit, however, it probably isn't practical. You would need an intermediate circuit that had the analog sensing front end to 'read' the thermistor value, some processing (digital or analog) to linearize the thermistor curve, and then some digital circuit to emulate a DS18B20. It may be worthwhile taking a moment to search for a one wire analog voltage sensor, but then there is no guarantee that the SW in your controller would recognize it.
Sorry for the bad news,
Tom
Did you see my post above about a small DS1820B sensor? Maybe I'm missing something but I thought that was the answer.
Translating from one-Wire to thermistor sounds like more work than just spinning up a new controller that works with bead thermistors. All you need is a Moteino w/o a radio, a SSR, and the thermistor.
Regarding DS18B20 vs DS18S20 they are virtually the same: https://www.maximintegrated.com/en/app-notes/index.mvp/id/4377
EDIT: Sticking a BNC plug on the end of a DS18B20 would not be difficult at all by the way. You'll just need to figure out if the controller is expecting the pullup resistor to be present or not. One can easily configure the uC in such a way that the resistor isn't needed (which I always do).
Quote from: HeneryH on December 14, 2018, 09:38:03 AM
Did you see my post above about a small DS1820B sensor? Maybe I'm missing something but I thought that was the answer.
Thanks, I did see that, but I can't find any data about its physical dimensions. Plus, if the encapsulated version is as big as shown in the picture then it's WAY too big. I need something smaller than the resistor being shown for size comparison...
Right now I think the easiest solution is to just live without the chamber probe and painfully calibrate (once, as the room itself is strictly temp. controlled) the temperature with a thermometer in similar conditions as the ones used for recordings... I was not the one creating this problem (and I strongly recommended the Warner system), so I'm not going to go to great lengths to solve it..
I really appreciate all your help and information!
Cheers,
Paulo.
There is a OneWire emulator available https://github.com/orgua/OneWireHub that might handle the translation piece. You would have to pick an appropriate temperature sensor and figure out how to read the temperature and use the emulator to make it look like a DS18B20. See https://www.instructables.com/id/Arduino-1-wire-Generic-ClientSlave-Device-Sensor/ for an example. Feasible yes, practical not so sure.
Quote from: pcspinheiro on December 17, 2018, 05:23:15 AM
Thanks, I did see that, but I can't find any data about its physical dimensions.
Here are its dimensions https://www.analog.com/media/en/package-pcb-resources/package/pkg_pdf/to-92t/T-3-1.pdf
(https://i.imgur.com/E1Rm7Wr.png)
Quote from: jra on December 17, 2018, 02:29:16 PM
There is a OneWire emulator available https://github.com/orgua/OneWireHub that might handle the translation piece. You would have to pick an appropriate temperature sensor and figure out how to read the temperature and use the emulator to make it look like a DS18B20. See https://www.instructables.com/id/Arduino-1-wire-Generic-ClientSlave-Device-Sensor/ for an example. Feasible yes, practical not so sure.
Great tip! Thanks! This could be useful!
A quick search for Thermistor library yielded quite a few results. I think you may have to review the quality of each of these, but the electrical interface is easy enough. Thermistor and 1 resistor. If anyone has any experience with a decent thermistor library, speak up!
Coupling these two should be straight forward.
Tom
The last time I actually used a thermistor was back in graduate school during the Carter administration when linearization was accomplished via suitable selection of a series or parallel resistor. State of the art has advanced somewhat since then. I would look for a library that uses the Steinhart-Hart equation if you can determine/calculate the coefficients for the thermistor you plan on using.
Quote from: jra on December 17, 2018, 04:48:41 PM
The last time I actually used a thermistor was back in graduate school during the Carter administration when linearization was accomplished via suitable selection of a series or parallel resistor. State of the art has advanced somewhat since then. I would look for a library that uses the Steinhart-Hart equation if you can determine/calculate the coefficients for the thermistor you plan on using.
All the ones I saw cited the Steinhart-Hart equation. This library looked interesting: https://github.com/YuriiSalimov/NTC_Thermistor because the constructor used standard thermistor parameters (from the Thermistor datasheet) for setting the equations internally and the methods were straightforward. That his Fritzing diagram is incorrect is bothersome...
Tom