Electronic – arduino – 1-Wire and the resistor

1-wirearduino

I have been playing around with some 1-Wire components and got these questions

schematic

simulate this circuit – Schematic created using CircuitLab

  1. Can I break anything if I forget the 4.7 k resistor ________?
  2. Does it have to be 4.7k _________?

Came across an Adafruit lib that used 10 k but changing between the two resistors (4.7k and 10k) didn't seem to influence the readout. But is it the lib that defines what resistor size I should use or should it just be between an interval..?

I'm a newbie when it comes to electronics and right now I'm just learning-by-doing. Reading the theory behind thing doesn't help me that much since I don't understand half of the terms used..

Best Answer

1) "Can I break anything if I forget the 4.7 k resistor?"

No. You might damage the external device if you drive the Arduino output active HIGH instead of high-impedance. Usually the libraries take care of this.

digitalWrite( 1 , HIGH ); pinMode( 1 , OUTPUT );  // Bad, active HIGH
digitalWrite( 1 , LOW );  pinMode( 1 , INPUT );   // Good, high impedance.

2) "Does it have to be 4.7k"?

No. Check the datasheet for details and considerations. Depending on speed and power requirements pull up resistors usually vary from 1kΩ to 100kΩ. Your 4k7 is about as good as my usual 10kΩ.