DS18B20 ain't begging for resistors....why tutorials say so!!

Hello folks !B
could ya'll amazing people tell me why do tutorials out there keep preaching put the resistors for DS18B20 is a parasite .....but my works fine with or without this resistor......Now is it a newbie concept of "pull up" resistors thing???? if so cant we mark that particular pin HIGH in our code.....And ya if resistor is required ""WHY"" >:( 4.7 k????
Ain't no tutorial sayin that.....
WARNING: i ma moron,i cant understand easily....so a lil explination might help :slight_smile: :slight_smile:
thanks already

Ain't no tutorial sayin that.....

Oh Yes there is, its called the device datasheet.

The resistor is there because the datasheet for the DS18B20 says it should be, datasheets for devices can often provide a lot of useful information about devices and how to use them properly.

That the DS18B20 might work in 'some' circumstances without the resistor is irrelavent, if you want it to work reliably across the whole range of rated temperatures and voltages, follow the datasheet advice.

thanks srnet
i'll go for it

srnet:
That the DS18B20 might work in 'some' circumstances without the resistor is irrelavent,

Most likely you can operate them using the internal pull-up of the Arduino (but not in parasitic power mode). Those pull-ups are 20-30k, probably enough to pull up the line. That's the same way you can operate I2C without pull-ups. But it's out of spec, and therefore not recommended.

The Arduino itself will drive the line high/low so for communication to the sensor likely no pull-up needed at all, it's for communication from the sensor to the Arduino.

They can run in “parasitic “ mode , but this isn’t suitable for long runs of multiple sensors , or a three wire powered connection. The data sheet gives both modes of use, both of which have a resistor !

This is worth a read

As smet says, use the datasheet first - Maxim have some experience here - then tinker afterwards. If the datasheet suggests using the resistors, or not, you have nothing to lose by including them. If you ignore the suggestion, you could be spending a lot of time working out why it didn't work.
It's the same with decoupling capacitors on IC power pins. It should be second nature to fit. After all, the pull-up resistors and decoupling caps are cheap enough.