DS18B20 vs DS18S20 what is the difference?

Don't know that it really makes a difference in connecting or using with the Arduino, though it surely makes a difference to somebody.

I purchased a DS18S20 off EBay so, naturally, there is no documentation. The actual sensor is encapsulated in a metal tube with a shielded 2-wire cable attached. At the other end is a three-wire plug. In the plug it has the shield, white wire, then red wire, in that order. I think it would be safe to assume the shield is the ground, but does not answer the bigger question as to which is the data line and which is the power.

If we match the sequence on the data sheet, we get that the middle pin (white) is the data and the third pin (red) is the power. Am I going to hurt anything if I try this?

Dave

DS18S20: Fixed 9-bit resolution (1/2°C). Measures temperature in 750 mS. DS18B20: Resolution of 9 to 12 bits (12-1/16°C).

Thank you for that. I tried having both data sheets up in front of me, but got lost trying to find the difference.

I think I will assume, given the ability to function with "parasitic power," that reversing the data and power leads will not cause harm. It just won't work.

Thanx

Well, consider this: Absolute Maximum Voltage Range on any Pin with Respect to Gnd: -0.5V to +6.0V.

So you put +5 on Gnd and Gnd on the data pin? or 5V below the Gnd pin vs an absolute max of 0.5V below Gnd? That could be enough to have caused damage.

No, no! Nothing has been connected to anything, yet.

I meant that I would assume the shield is ground. Then I would put 5v on one pin and data (which is a 5v signal on a digital pin).

Then, the data input to the sensor would be getting either a constant 5v, which it would expect when used in "parasitic power" mode, or a 5v data signal(which it expects). Either way, should be no harm done. The other pin (power) would be getting the opposite - a 5v data signal which should appear like noisy power and cause no harm, or a constant 5v, which it expects. Seems safe to me.

However - you bring up the possibility that the shield is NOT the ground.

Now, that means there are 6 different ways to hook this up. Two of them have ground in the right place. Four do not. Ground in the right place = probably no damage. Ground in the wrong place = not so confident. Hmmmmmmmmmmm.

I feel like such a doof.

Went back to the sellers listing and he has changed it (or I just overlooked) to show the pin out/color code.

I was right - shield is ground. Middle pin (white) is DQ (data) and other pin (red) is Vdd (power).

Thanx to all, I appreciate the input here.

Dave