DS18B20. Changing w1-therm reading resolution.

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
no1knows89
 
Posts: 2
Joined: Thu Sep 18, 2014 8:42 pm

DS18B20. Changing w1-therm reading resolution.

Post by no1knows89 »

Based off the docs for the DS18B20, It's temp resolution can be between 9 and 12 bits. Reading tells me that at 12bits it takes 750ms for the DB18B20s to answer. I have read it will take less than 100ms at 9 bits. By default the w1-therm kernel mod (Used by the Raspberry Pi) is set to 12bits and seems to have no way of changing it. The Arduino's DB18B20's library has options to change the resolution and timing.

I'm running five DS18B20 that feed data into a PHP front end. The backend Python script takes 4.7 seconds to read all 5 sensors... Does anyone know of a kernel driver or modified w1-therm module that allows you to crank down the resolution?

The DS18B20 is a very popular sensor. I find it pretty odd that the Pi's built in module for this sensor is so limited. Unless I'm missing something...

Thanks.

Page 3 of the datasheet:

"The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the
temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5°C,
0.25°C, 0.125°C, and 0.0625°C, respectively. "

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: DS18B20. Changing w1-therm reading resolution.

Post by Franklin97355 »

Have you asked these guys?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”