Uncategorized

DS18B20 pull down resistor notes

Asked 
Active today
Viewed 12 times
1

I have a RPi zero W and am reading four ds18b20 temperature sensors (with a 10K ohm resistor between the data and vcc line). Now and then I keep getting “SensorNotReadyError” from the sensors.

My previous design had one sensor less and didn’t have an additional LED and it worked fine. Could it be that the LED + additional sensor consume too much power? I’m using a 2A power brick. Could a 3A solve the problem? Any ideas how to read 4+ sensors with a Rpi zero?

 New contributor
  • Hi @Jake B, Welcome and nice to meet you! 🙂 Ah, Let me see. It is not the problem of the power from the Rpi 3v3 rail. It is the power of the 1-Wire (sort of I2C) GPIO pin trying to pull down the voltage at the pull up resistor connecting DBS18B20 input pin and Vcc. I have no problem connecting 16 DBS18B20 connected to one GPIO pin (ie, 64 DBS18B20s for 4 GPIO pins for Rpi4B) (1) imgur.com/gallery/9LzPqvB, (2) raspberrypi.stackexchange.com/questions/100203/…, / to continue, … – tlfong01 19 mins ago   
  • (3) raspberrypi.stackexchange.com/questions/102078/…, (A) Let me try to use my calculation (usually dodgy) to show the current needed to pull down the voltage at connection point of the pull up resister connecting DBS18B20 Vcc and 1-Wire data input. Suppose the pull down resistor value is 4k7 (typically used in I2C modules, though 10k is not uncommon). To pull it down, you need V ~= (3V3 – 0) ~= 3V = I * R => I = 3V / R = 3V / 4k7 ~= 3V / 5K ~= 6mA. Now the fun begins when you add one more DBS18B in parallel. Now R + R in parallel =~ 4k7 /2 ~= 2k4, – tlfong01 9 mins ago   
  • So adding one more DB guy doubles the current GPIO pin needed to sink to pull down. Now the more happy DB guys you add, the higher the poor Rpi GPIO pin need to sink current to struggle to pull down its voltage, until the pin circuit melts down, or Rpi explodes, whichever comes sooner, … Now read my answers referred above on (1) How to subtract down (REMOVE) the 4k7 instead of adding up. (2) Why I use a special GPIO pin and remove ALL 4k7 of each DB guy. Just a quick and dirty, short reply. Sorry for typos and unorganized jumping around ppoints! 😦 – tlfong01 just now   Edit   

2 Answers

1

A suggested pull up resistor is 4.7K ohm. Current of the sensor is not an issue as its active current is 1mA. Try with the above mentioned resistor value.

 New contributor

0

These sensors require only a few milliamps to operate. I do not believe the power supply is the problem.

I would use the suggested 4k7 pull-up to 3V3 rather than 10k.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: