Can this DS18B20 sensor be used with Arduino internal pull-up or it require exactly 4.7k pull-up resistor?


The Arduino internal pull-up is something like 50k. That is a lot different from 4.7k. You would probably find that the pull-up is not strong enough to get clean pulses from the device. Also if you are using it in one-wire (parasitic) mode notice this from the datasheet:

To assure that the DS18B20 has sufficient supply current, it is necessary to provide a strong pullup on the 1-Wire bus whenever temperature conversions are taking place or data is being copied from the scratchpad to EEPROM.

Notice the words 'strong pullup'. The internal pullup is not strong.

  • Yeah you are right. Also I find out that these internal pull-ups depends also from type of Arduino (Uno, Nano, Mega etc.) so they have different values as well. – ShP Feb 4 '17 at 2:47
  • It varies from chip to chip in the same family, and even pin to pin depending on what other functions the pin has. Last time I measured them on a range of chips they varied from about 25k to 40k – Majenko Feb 4 '17 at 10:32

If the datasheet specifies a 4.7kΩ resistor then a 4.7kΩ resistor is what you need.

  • 1
    Do people not like the fact that the datasheet knows best? They don't put these things in datasheets for fun you know. – Majenko Feb 3 '17 at 19:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.