DS1820, DS18B20 Support

LOL You are interchanging "precision" with "resolution accuracy".  This may be culture dependant somewhat and definitely semantics and not productive to the discussion at hand. Perhaps a discussion for elsewhere?
 
This is definitely interesting as I stated before my WC board does not report better than 0.5c resolution from my DS18B20 sensors. I have just checked the WEBSET results and they only move in 0.5c clicks also.
 
I have been researching the ICs and the DS18B20 is definitely not interchangeable with the DS1820. However the DS18S20 and the DS1820 are and designed to be. The temperature reading registers are different formats and couldn't be interchanged without some bit twiddling.
 
Two 8 bits registers need to be read and concatenated into one 16 bit signed temperature reading value. If only 9, 10, or 11 bits are desired, and set in the configuration register, the LSBits are 0 filled and would typically need to be purposely shifted right, out of the result to be right justified. If the IC has been set for 9 bit resolution accuracy the readings would only change by 0.5 degrees C. The manufacturer spec sheet claims the IC boots up as 12 bit resolution. Somehow this doesn't appear to be happening in my WC board.
 
Code:
http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
 
I may have found a possible answer for this resolution. Have a look at this chart. Figure 7

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf?#7

 
Take special notice of the bottom note on the figure 7.  Also note that the resolution register is included in those affected.
    "Power-up state depends on value(s) stored in EEPROM."
 
If the PLC firmware writers assumed the chip defaults to 12 bits, as stated in the spec sheet,

From DS18B20 datasheet page 8 first paragraph, it stated:

The power-up default of these bits is R0=1 and R1=1(12 bit resolution).

So we did not write anything to change that. Unless Maxim datasheet is wrong, that is what we are based on.


 
and some have been factory left as 9 bits from testing etc. then these particular units would never produce more than 9 bits of resolution in WC usage unless initialised back to 12 bits.
 
This could explain why some of us are getting 0.1 degrees C resolution and some of us only getting 0.5 degrees C of resolution from the same IC sensor.
 
These DS18B20 sensors need to be initialised to 12 bits of resolution, at least once.
 
I'm using slightly outdated WC firmware but all my temp sensors update in .1F (I'm a non metric luddite) I assume there is some additional rounding error when WC does the C to F conversion.
 
When I first used the WC I was using some 1820 9-bit temp sensors from another project and got very confusing results as the temperature registered format is different from the 18B20. The 18S20 also has different reg definition then the B.
 
Interesting idea about possible residual testing effects have on NVROM code but at least in my case have never encountered your problem with multiple batches of 18B20. Having said that it is good programming practice for CAI to set correct resolution. It will be interesting to see if that resolves your problem.
 
/tom
 
Great, we will try to add programming the configuration bit during start up to see if that helps.
We got all our sensors directly from Maxim, they send those sensors for us to test for free.  But in late batches, we got 0.5V increment also.  we never changed our temperature bits conversion logic for many years, so that the change must be in some DS18B20 internally.
If this discussion leads to a better resolution on temp readings, that will be good for a lot of us.
 
Even a utility to initialise each unit to 12 bit as they are supposed to keep their settings forever.... yeah right! 
 
I hope this doesnt eat too much code space but there will be some happy people over at the UDI ISY forums too. Some could buy a WC just to initialise their probes for use on every other board. Who knows? If this works I will definitely spread that word! This opens up a big opportunity for the use of these sealed probes for the HA guys in HVAC.
 
I also hope the 750msec sample time isn't a burden. I assume WC doesn't wait  for a response, impatiently, with it's foot tapping. :lol:
 
If the initialisation works it would also mean Maxim's spec sheet is incorrect. Imagine that?
 
Thanks!
 
We have confirmed DS18B20 default power up configuration is 31 or 11111b, instead of 1111111b stated in the datasheet.
Those DS18B20 sensors were directly obtained from Maxim last year.  Thanks for Larry and Automate point out this possibility. 
We will make change to the code so that DS18B20 will always be programmed into 1111111b in the configuration byte to enable 12 bit resolution.
 
I will try it out, as soon as I see the new version, and report any success as I have two 9 bit initialised sensors.
 
My guess is people tried these some time back and saw 0.1 degrees C resolution, Maxim or somebody changed the initialisation while most users still assume they are still 0.1C. 
 
You may make some users very happy with this update. This is such a cheap and easily available sensor and the higher resolution changes the whole seriousness for HVAC people.
 
Thank you! The support is appreciated.
 
Thanks, Larry.
 
We opened a ticket with Maxim Integrated about this problem. We want to find out the extend of this problem.  At the same time, we are working on the code to force the 12 bit for DS18B20 with family code 28H sensors.
 
It seems there are DS18B20 in TO-92 package, those sensors mostly read 12 bit,
DS18B20Z, and DS18B20U both listed as DS18B20 family, they by default read 9 bits.
We tried to re-program the configuration bits. DS18B20U can be programmed to 12 bits, DS18B20Z does not take configuration change at all.
We opened ticket with Maxim for this problem. 
 
Larry, if you want to test this testing firmware with your DS18B20U sensors, we can arrange that for you.  Or if you want to wait for Maxim answer, that is up to you. Thanks.
 
Just got a first reply from Maxim support saying that they never had problem for DS18B20 sensor, the problem we saw might be caused by customer testing without restoring the default.
 
The testing we done all with factory refresh sensors directly from Maxim. So we know that person did not know what he talked about.  In addition, DS18B20Z does not even take the configuration at all.
 
Larry, if you want to test this testing firmware with your DS18B20U sensors, we can arrange that for you. Or if you want to wait for Maxim answer, that is up to you. Thanks

The units I have are claimed to be DS18B20 with the additional claim of adjustable 9-12 bits.
 
I have no commitment of my equipment, yet, so I would like to try the added init code. "v3.02.18c  Beta"  ;)
 
Larry, do you have anyway to take a close up picture for the DS18B20 chip you are using?
Mixim claimed the problem chips we have are older stock, they did not have any problem with newer stock.
They said there was zero report of DS18B20 by default only reading 9 bits from their world wide customers.
So we will need to send them picture from top the chip with detailed marking, for them to track down the manufacture date and supplier info.
 
Larry, do you have anyway to take a close up picture for the DS18B20 chip you are using?


These are encapsulated into a hermetically sealed capsule. Nothing to see.
Code:
http://www.ebay.ca/itm/370778143520?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
 
Back
Top