Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DS18B20 vs DS18S20
#1
Hi all

In practical terms, is there any difference in using the DS18S20 over the usual DS18B20?

I've read what the differences are, but was wondering in real world application, will I notice a difference on my controller?
Reply to top
#2
Hi Dewd, didn't even know DS18S20 was a thing, I found the datasheet so going to compare and see what I can find. What differences have you found?

https://datasheets.maximintegrated.com/e...S18S20.pdf
Reply to top
#3
Difference seems to be sampling rate and resolution.

I don't think either of those will pose a problem though.
Reply to top
#4
Ah, you'll want to stick with the B version then. 9 bit only shows 0.5 degree changes so it would go 74.15 to 74.65, nothing in between. 12bit shows 0.0625 degree change.
Reply to top
#5
I'm even more confused now - Below from the Maxim website


Introduction
The DS18B20 and DS18S20 1-Wire devices are both popular and excellent choices for any application requiring digital thermometers. Both devices offer the same resolution and accuracy. The two parts differ only in how the data is presented to the user. This application note describes how the devices work and the differences between them. Applications for each device are recommended.

How the Devices Work
The DS18B20 and DS18S20 both use the same base design. Temperature measurements are made using two bandgap-generated voltage sources. One of the voltage sources has a high-temperature coefficient and changes deterministically across temperature. The other voltage source has a low-temperature coefficient and does not change across temperature. An analog-to-digital converter (ADC) converts the difference between these two voltages to a digital value, representing the temperature of the device. The resolution of the temperature conversion can be selected from 9 to 12 bits.

Differences Between the Two Devices
We start the discussion with a short digression back to the original DS1820.

The DS1820 used a dual-oscillator topology to perform a temperature conversion. The resolution of the original DS1820 was only 9 bits. Additional resolution could be achieved by reading two additional register bytes (Count Per °C and Count Remain) and by performing the following calculation. For this calculation, Temp_Read is the value obtained by truncating the 0.5°C bit (bit 0) from the temperature data.

Equation 1.

The DS18S20 was designed to be a drop-in replacement for the original DS1820. To work as a replacement, the ADC in the DS18S20 is factory configured to always perform 12-bit conversions. The 12-bit data is then rounded to a 9-bit value and stored in the temperature register. To allow for greater than 9-bit resolution, a value for the Count Remain register is calculated. The Count Per °C register is set by the factory to be 16. Using the Count Remain and the Count Per °C registers and the formula above, up to 12-bit resolution can be obtained with the DS18S20.

The DS18B20 differs from the DS18S20 in an important respect: the designer can select the desired resolution by using the configuration register. This flexibility allows the user to reduce the ADC conversion time and conserve power if higher resolutions are not required. Table 1 shows the temperature conversion time and LSB for each possible resolution setting.

Table 1. DS18B20 Conversion Times and Resolution Settings
Resolution 9 bit 10 bit 11 bit 12 bit
Conversion Time (ms) 93.75 187.5 375 750
LSB (°C) 0.5 0.25 0.125 0.0625

The temperature registers of the DS18B20 and DS18S20 are weighted differently. The temperature register in the DS18S20 is weighted to match the DS1820; the DS18B20’s temperature register is formatted to provide 12 bits of resolution. This formatting in the DS18B20 eliminates the need to perform an additional calculation (required by the DS18S20) if greater than 9-bit resolution is required. The default power-up state of the temperature register in both devices is +85°C. The formats for the temperature registers are shown in Tables 2 and 3.

Table 2. DS18S20 Temperature Register Format
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
LSB 26 25 24 23 22 21 20 2-1
MSB S* S S S S S S S

Table 3. DS18B20 Temperature Register Format
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
LSB 23 22 21 20 2-1 2-2 2-3 2-4
MSB S* S S S S 26 25 24
*S = Sign

The scratchpad memory in these devices (Table 4) also differ slightly. The DS18S20 lacks the configuration register that allows the DS18B20 to change resolution. The DS18S20 does have the two additional registers that are needed if greater than 9 bits of resolution are required.

Table 4. Scratchpad Memory Map Comparison
DS18S20 DS18B20
byte 0 Temperature LSB (AAh) Temperature LSB (50h)
byte 1 Temperature MSB (00h) Temperature MSB (05h)
byte 2 TH Register TH Register
byte 3 TL Register TL Register
byte 4 Reserved (FFh) Configuration Register
byte 5 Reserved (FFh) Reserved (FFh)
byte 6 Count Remain (0Ch) Reserved
byte 7 Count Per °C (10h) Reserved (10h)
byte 8 CRC CRC

The 8-bit family code in the ROM code is also different for these two devices. The family code for the DS18B20 is 28h; the DS18S20 retains the same family code as the original DS1820, which is 10h.

Recommended Applications for the DS18S20
The DS18S20 is only recommended for an application that is currently using the original DS1820. Used as a drop-in replacement, the DS18S20 will hopefully save the designer from having to make changes to existing firmware or software. Some code changes may be required, nonetheless, because the DS18S20 has a longer conversion time (750ms) than the DS1820 (500ms).

Recommended Applications for the DS18B20
The DS18B20 is recommended for any application that requires 9 to 12 bits of temperature resolution. This device offers much more flexibility and is easier to use than the DS18S20.
Reply to top
#6
Sounds like they made the DS18S20 to replace the DS1820, not sure how you change the resolution though. I just searched the DS18S20 datasheet for resolution and there's no mention of 12-bit so they don't seem to be pushing it for that. It does seem a little strange. My guess is it'll read in 9-bit, if you want 12-bit it takes some effort and why they don't mention in datasheet, not really sure.
Reply to top
#7
(11-01-2020, 02:51 PM)Rob F Wrote: Sounds like they made the DS18S20 to replace the DS1820, not sure how you change the resolution though. I just searched the DS18S20 datasheet for resolution and there's no mention of 12-bit so they don't seem to be pushing it for that. It does seem a little strange. My guess is it'll read in 9-bit, if you want 12-bit it takes some effort and why they don't mention in datasheet, not really sure.

That makes sense from the way I read it as well.  Although it is a little unclear.
Going to stick it out and keep looking for the right "B"

I thought I had hit gold when I found the Sparkfun unit on the Mouser website.  The one with the plastic sensor tip. 12USD each.  Went to order 2 of them.  Shipping 60USD - Not happening.  The search continues.

Des
Reply to top
#8
Yeah so often shipping can be a deal breaker. You can get them at Banggood with the AC socket adapters unless you want the plastic tip.
Reply to top
#9
(11-01-2020, 03:38 PM)Rob F Wrote: Yeah so often shipping can be a deal breaker. You can get them at Banggood with the AC socket adapters unless you want the plastic tip.

Well, maybe I should ask the question here - or start a new thread.  What sensors are the guys using?  And what precautions are they taking to prevent the metal tips from rusting in the marine environment?

I tried various units from the usual "scumbags" (shamelessly stole the comment from AVE) and found that the metal tips rust out very quickly if used untreated.

I now coat the tip in hot glue with a heat gun, allow to cool and then put heat shrink over.  This seems to provide a good seal against salt water ingress and I have had sensors last a couple of years like that.  Yes, the heatshrink does add a layer of insulation, but I believe this will only slow down the rate of temp change, not the actual temp measured.

I have been wanting to try the plastic tip to compare, but they are quite hard to find - well at a reasonable price that is.

What's everyone else doing?
[-] The following 1 user Likes Dewd's post:
  • Rob F
Reply to top
#10
(11-01-2020, 11:59 PM)Dewd Wrote: Well, maybe I should ask the question here - or start a new thread.  What sensors are the guys using?  And what precautions are they taking to prevent the metal tips from rusting in the marine environment?

I tried various units from the usual "scumbags" (shamelessly stole the comment from AVE) and found that the metal tips rust out very quickly if used untreated.

I now coat the tip in hot glue with a heat gun, allow to cool and then put heat shrink over.  This seems to provide a good seal against salt water ingress and I have had sensors last a couple of years like that.  Yes, the heatshrink does add a layer of insulation, but I believe this will only slow down the rate of temp change, not the actual temp measured.

I have been wanting to try the plastic tip to compare, but they are quite hard to find - well at a reasonable price that is.

What's everyone else doing?

I only run fresh water so I guess can't compare but I use metal tip and its about 2 years old still looks new. I agree adding heatsink won't affect the measurement only how long it takes to see a change.
Reply to top
#11
Yeah. Seen reports that the Stainless Steel lasts just fine in fresh water, but I've seen one of mine rust to pieces in Marine very quickly. About 6 months
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not all DS18B20 are Created Equal Dewd 8 5,909 03-07-2022, 09:12 PM
Last Post: Rob F

Forum Jump:

Current time: 04-29-2024, 04:21 AM