DS18B20 vs DS18S20 are they directly swapable?

I recently bought a thermometer, it uses a DS18B20 sensor.
11 years ago I built a system to monitor the temperature of 12 freezers, I downloaded a program to my computer, so every morning I could hit my mouse and see all 12 freezers were operating properly. It worked great. Hurricane demolished most of it. But I still have many DS18S20 sensors.
Today’s problem; I bought this thermometer from Amazon, https://tinyurl.com/vp5wq3k that uses a DS18B20, can I just hook up a DS18S20 and have it work?
I read the page about the differences but it doesn’t say if the are forward or backward compatible.
1-Wire Protocol PDF of DS18S20 vs DS18B20 Digital Themormete

Thanks, Mikek

FWIW, I connected the DS18S20 the the thermometer that comes standard with a DS18B20. When powered up the reading was 39.9* F and didn't change, the room was 70*F. I have a little lack of understanding, The thermometer has 3 wires out, Plus, minus and data. So, I connected Plus, minus and data to the proper pins of the DS18S20. Some schematics with DS18S20 have a pull up resistor in the circuit. I assume the DS18B20 also needs a pull up, so that pull up must be internal to the thermometer. Your thoughts, Mikek

No, they are not interchangeable. You really need to spend some time with the data sheet to see what the differences are. 12 bits versus 9 bits resolution, for one, so the output is not the same.

Google "arduino ds18s20" for some examples. This Arduino library claims to support both sensors, but i haven't tried it.

You must have a pullup resistor on the data line for both sensors (4.7K is standard).

Qmavam: 11 years ago ........ But I still have many DS18S20 sensors.

Ancient technology, and the best thing you can do is ditch them. A quote from from an application note of similar vintage to your junk:

"..........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). " which rather suggests the DS18S20 was a rather forlorn solution even then.

Hi,

80 US Cents each and get them Monday:

https://www.amazon.com/DS18B20-Temperature-Raspberry-Separate-Antistatic/dp/B07STT9H74/ref=sr_1_5?keywords=ds18b20&qid=1579867678&sr=8-5

I'm all for understanding Old Stuff.. I have a LOT of it :grinning:

I have had these in my Amazon cart for a several days.

https://www.amazon.com/gp/product/B00M1PM55K/ref=ox_sc_act_title_1?smid=A30QSGOJR8LMXA&psc=1

Just want to make sure, I can't use what I have and if I really need to follow through on this project. I probably will, we have a greenhouse and I'd like to be able to monitor outdoor temperature and inside the green house temperature. We had two nights below freezing this year and I got the thermometer installed just in time for those two nights. Lowest outdoor temp was 30.1*F.

BTW, this is the thermometer I have. https://www.amazon.com/gp/product/B01MSOI9Y4/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 How does a device like this, handle switching in different DS18B20 sensors? ie, how does it negotiate the unique 64-Bit serial code stored in an On-Board Rom. Or does it just look at the one connected. I'd like to be able to switch just the data lines from several DS18B20 sensors and have it read each one individually. Mikek

Qmavam:
. . .
BTW, this is the thermometer I have.
https://www.amazon.com/gp/product/B01MSOI9Y4/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
How does a device like this, handle switching in different DS18B20 sensors? ie, how does it negotiate the unique 64-Bit serial code stored in an On-Board Rom. Or does it just look at the one connected.
I’d like to be able to switch just the data lines from several DS18B20 sensors and have it read each one individually.
Mikek

Typically a device like this just looks at the one connected . . . BUT it does the looking when the program starts (when the power is connected).

This means that you will almost certainly have to remember to switch the power off while you switch the data lines which is of course the most sensible way to do a component swap.

Don

Qmavam: how does it negotiate the unique 64-Bit serial code stored in an On-Board Rom. Or does it just look at the one connected.

Since there is only one sensor, there is no need to remember its address, it may simply take the address that is available. Indeed it is very likely that it doesn't even do that, since there is no need to used the one-wire facility, or any of that Arduino-type stuff.

You should have no trouble switching between several sensors. The device indeed starts looking when power is on but looks again when the duty cycle comes round. That is how you get changes. If you want to use a rotary switch, the worst that can happen is that you get a momentary -127 signifying that the sensor wasn't connected at the moment of reading. If that happens, the real reading would follow in about 1/10th second.

Hi, IF you want to do several DS18B20’s,on an arduino, here is the code for an example:

https://arduinoinfo.mywikis.net/wiki/Brick-Temperature-DS18B20#Multiple_DS18B20_Example:

And here’s the overall information:

https://arduinoinfo.mywikis.net/wiki/Brick-Temperature-DS18B20