![]() |
Forum Index : Microcontroller and PC projects : CMM2: DS18B20 Temp sensor problem
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
These screens are with the DS1820? device mentioned above, using 800 ms conversion time stops 1000 error. Result multiplied by 8 as noted by Jim in an earlier post, gives the correct temp to +- 1/2 a deg. ![]() ![]() Mike NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2398 |
see here for an explanation: https://www.maximintegrated.com/en/design/technical-documents/app-notes/4/4377.html the DS18S20 is designed to be a drop-in replacement for the DS1820 (note: no letter between the digits). as such, it performs a 12-bit conversion by default, taking 750ms. using just the function I=DS18B20(pin), the micromite attempts to do a 200ms conversion, which isn't supported. it looks like this may be why things fail. Daniel, would you mind trying the following with your problematic sensor: DO DS18B20 START pin, 3 PAUSE 1000 PRINT DS18B20(pin)*8 LOOP i suspect you will then see sane values from the 'fake' sensor. the multiplication by 8 is due to the temperature being made available in a different format to that used by the DS18B20. getting extra bits of resolution out of the DS1820/DS18S20 requires a bit more trickery. it could well be that the sensors we have been calling 'fake' are in fact just old-stock DS1820 or DS18S20 parts. it may also be that the arduino library the original poster has been using checks the type of the sensor and adjusts its timing and behaviour accordingly. cheers, rob :-) Edited 2020-07-22 15:41 by robert.rozee |
||||
KeepIS![]() Guru ![]() Joined: 13/10/2014 Location: AustraliaPosts: 1828 |
Hi Rob, you may have my post mixed up with another, however as an FYI, delays make no difference to its use in the CMM2, and it still displays 1000 as expected with delays as this device is not the device that should be used in the CMM2, however it works ok with the resolution change. I can get full data from it with the Test program used for testing fakes, and yes the jury is out on that fake report for this device, likely the program is not fully accounting for the variation in this old sensor. Mike. NANO Inverter: Full download - Only Hex Ver 8.1Ks |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2398 |
i think you're right! have also just been looking through the arduino library Daniel was using, and it looks like it supports around half a dozen variation on the device. so there may be half a dozen different 'genuine' parts, with various 'clones'/'fakes' of each one. all entirely confusing!!! cheers, rob :-) |
||||
blade Newbie ![]() Joined: 20/07/2020 Location: AustraliaPosts: 6 |
i would not be connecting the ground and vcc terminals together..u could still use the internal power supply but put an 1n4004 into your main power line input i see you have the fet there ..but now add power to the vcc input but draw it before the power comes into the 1n4004..u may need to regulate for 3.3 volt or 3.0 volt etc,, but you should have the regulator to give 3.0 volt or what ever it requires,,probably just a zener and a resistor would do it i think for the reference voltage to the sensor.... reference your first schematic..i am looking at .it`s getting noisy power supply i think....throwing it to give an either high briefly. EDIT:::sozz i made a mistake with the input power to the sensor module there. Edited 2020-07-22 20:13 by blade |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 528 |
Hi all, to "close" this topic and give some final feedback after the 100% original DS18b20 sensors arrived: As I said: no problem on my maximite. The original DS18b20 work just fine! ![]() Although my fake sensors work with my arduino library on the atmega328p, I couldn't get them to work with the maximite. The only soloution was to buy original ones. Problem solved. I am posting this in case anybody comes across the same problem in the future. Some fake sensors will work on the maximite, some will not. Greetings Daniel |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi All, I went and ordered some "DS18b20" devices and found the following The 2 I bought from MOUSER.COM proved to be genuine. I bought one from Jaycar Electronics which is mounted on a small PCB substrate and whilst both read a temperature and responded as expected when I held a soldering iron near them the Jaycar module comes up as a FAKE. Stay away from these Jaycar Modules Now when I run the tests, the fake returns a value in 232 ms whereas the genuine was 692ms (I think from memory) However there was a temperature difference of approximately 2 degrees C (fake was lower) between the 2 just measured at ambient room temperature (fake read 24.5 the genuine 26.5). I will run some tests with both bonded together so I should be able to see the variations at various temperatures. But the difference is quite pronounced and I pose the argument that you should not use the fakes unless you have calibrated against a known source but even then how reliable are they? Kind Regards Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
Too late Mick, I bought one early this week but haven't plugged it in yet. Jim VK7JH MMedit |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
Now I have a 'suspect' chip to play with, I will refine the testing program. Mick, The first time I ran the program, time was 720mS Then I used the inbuilt TEMPR function and then ran my program again. This time the time was 180mS So the Jaycar chip is responding to the command to set resolution. > RUN MM.ONEWIRE 1 Conversion time: 720.095 The temperature is: 18.812 degrees C on DS18B20 (FAKE!!!) with ROM Code 28 AA 42 A3 41 14 01 D5 using External Power. > print tempr(42) 18.75 > RUN MM.ONEWIRE 1 Conversion time: 180.292 The temperature is: 18.750 degrees C on DS18B20 (FAKE!!!) with ROM Code 28 AA 42 A3 41 14 01 D5 using External Power. > Can you run the program on the suspect chip again and tell me what ROM code you get? Jim VK7JH MMedit |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2398 |
are you using an MX170/470 based micromite, or a CMM2? based upon the source code of the interpreter, the CMM2 seems to use quite different (although still in the ballpark) timing for one-wire communications. cheers, rob :-) |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
I am using a CMM2. IT has no trouble reading my suspect module. With the Jaycar modules, the "fake" claim comes from the serial number not complying with known ranges. It is possible that Maxim have started using the high value serial numbers. So far, I know that the one I have correctly changes between 10 and 12 bit resolution and the time taken for each resolution is correct. The only chips we have had that can't be read with the CMM2/micromite code are the ones that started this thread. I would love to have one of them to play with but too far away... The DS1820/DS18S20 chips are not catered for with the builtin TEMPR function but can be read with a basic subroutine OK. I will convert the rest of the Arduino code into MMBasic and see what else I can find. Jim VK7JH MMedit |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi Jim, All, Ok No worries, I am using a CMM2 as well directly on the 3 pads near the ARM chip Here are my results The Jaycar Module MM.ONEWIRE 1 Conversion time: 176.335 The temperature is: 23.500 degrees C on DS18B20 (FAKE!!!) with ROM Code 28 AA EE 63 3F 14 01 E5 using External Power. The Mouser Part MM.ONEWIRE 1 Conversion time: 610.162 The temperature is: 26.125 degrees C on DS18B20 (Genuine) with ROM Code 28 98 4F 9B 09 00 00 73 using External Power. EDIT **** Note the different temperatures. they were stored in the same bag.. My CMM2 was on less than 30sec each time Kind Regards Mick . Edited 2020-08-08 15:17 by bigmik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 868 |
Hmmm, I have ten DS18B20s chips in use around the house all giving sensible results (ie +/- a degree). I also have several new ones. I've tried Jim's program on two of the new ones - each on a MM170 and CMM2. All four trials say "FAKE" but give realistic temperatures. I've also tried one of my long-cabled waterproof ones on the MM170 - "FAKE" but again with OK temperatures. Cheers, Andrew |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
OK, The "Fake" claim is based on the 6th and 7th bytes of the rom code. They are supposed to be zero. It is possible that that assumption is no longer valid. Mick's device has the same values as mine. "14 01" so probable from the same source Here is some code to try. The first run should be after applying power to the DS18B20 to see what the reset values are. The first 2 values of the scratchpad should be "50 05" immediately after power-up. The program cycles through all valid resolutions and times them. There are a few other checks that can be made but that's enough to start with. 'DS18x20 test code by TassyJim DIM INTEGER PinNbr = 42 PRINT "Family name: ";FamilyName$(PinNbr) PRINT "Rom Code: ";getRomCode$(PinNbr) PRINT "ScratchPad: ";getScratchpad$(PinNbr) IF powerMode(PinNbr) THEN PRINT "Power mode External" ELSE PRINT "Power mode Parasitic" ENDIF FOR n = 9 TO 12 x = setResolution(PinNbr, n) PRINT "ScratchPad: ";getScratchpad$(PinNbr) TIMER = 0 PRINT "Temperature: ";getTemp(PinNbr);" ";TIMER;"mS,";n;" bit" NEXT n END FUNCTION getRomCode$(PinNbr AS INTEGER) ' get ROM Code - useful if you want more than 1 device on wire LOCAL INTEGER a1,a2,a3,a4,a5,a6,a7,a8 ONEWIRE WRITE PinNbr,1,1,&h33 'read ROM code ONEWIRE READ PinNbr,0,8,a1,a2,a3,a4,a5,a6,a7,a8 getRomCode$ = HEX$(a1,2)+" "+HEX$(a2,2)+" "+HEX$(a3,2)+" "+HEX$(a4,2)+" "+HEX$(a5,2)+" "+HEX$(a6,2)+" "+HEX$(a7,2)+" "+HEX$(a8,2) END FUNCTION FUNCTION getScratchpad$(PinNbr AS INTEGER) 'ONEWIRE Write PinNbr,1,9,&h55,a1,a2,a3,a4,a5,a6,a7,a8 'read from scratchpad ONEWIRE WRITE PinNbr,1,2,&hcc,&hbe ONEWIRE READ PinNbr,0,8,a,b,c,d,e,f,g,h getScratchpad$ = HEX$(a,2)+" "+HEX$(b,2)+" "+HEX$(c,2)+" "+HEX$(d,2)+" "+HEX$(e,2)+" "+HEX$(f,2)+" "+HEX$(g,2)+" "+HEX$(h,2) END FUNCTION FUNCTION powerMode(PinNbr AS INTEGER) AS INTEGER ' check whether power external (1) or parasitic (0) ONEWIRE RESET PinNbr ONEWIRE WRITE PinNbr, 1,2,&hcc, &hb4 ONEWIRE READ PinNbr,4,1,powerMode END FUNCTION FUNCTION getFamily(PinNbr AS INTEGER) AS INTEGER getFamily = VAL("&h"+LEFT$(getRomCode$(PinNbr),2)) END FUNCTION FUNCTION FamilyName$(PinNbr AS INTEGER) LOCAL INTEGER fn fn = getFamily(PinNbr) SELECT CASE fn CASE 16 FamilyName$ = "DS1820/DS18S20" CASE 34 FamilyName$ = "DS18S22" CASE 40 FamilyName$ = "DS18B20" CASE ELSE FamilyName$ = "Unknown" END SELECT END FUNCTION FUNCTION setResolution(PinNbr AS INTEGER,r AS INTEGER) r = r-9 IF r < 0 THEN r = 0 IF r > 3 THEN r = 3 r = r*32+31 ONEWIRE WRITE PinNbr, 1,5,&hcc, &h4E, &hFF,&hFF,r END FUNCTION FUNCTION getTemp(PinNbr AS INTEGER) AS FLOAT LOCAL INTEGER fn, t, T1, T2, a,b,c,d,e,f,g,h LOCAL FLOAT Value fn = getFamily(PinNbr) power = powerMode(PinNbr) ONEWIRE RESET PinNbr ' reset before command ONEWIRE WRITE PinNbr, 8, 2, &hcc, &h44 ' start conversion 'read external when b goes high, for parasitic just wait IF power = 0 THEN PAUSE 750 ELSE t = TIMER DO IF TIMER - t > 1000 THEN Value = 1000 EXIT DO ENDIF ONEWIRE READ PinNbr, 4 , 1 , b ' conversion done? LOOP UNTIL b = 1 ENDIF IF Value = 0 THEN ' we have not timed out yet ONEWIRE WRITE PinNbr, 1, 2, &hcc, &hbe ' command read data ONEWIRE READ PinNbr, 2, 2, T1, T2 ' get the data ONEWIRE RESET PinNbr SELECT CASE fn CASE 16 'DS18S20 or DS1820 ONEWIRE WRITE PinNbr,1,2,&hcc,&hbe ONEWIRE READ PinNbr,0,8,a,b,c,d,e,f,g,h IF T2 AND &h80 THEN 'if MSB of T2=1 then negative 'Read 12bit resolution and adjust 'truncate 0.5deg value (or use integer division \) T1 = T1 AND &hFE T1=T1 / 2 'make whole degrees 'add compensation values read from scratchpad T1=T1*16 'make lsb 1/16 degree T1 = T1 -4 +(16 - g) 'add 12 bit value 'take 2s complement T1 = (T1 XOR &hFF) + 1 Value = -T1/16 'make decimal value in degrees ELSE 'positive temp Value = T1 / 2 '9bit value 'Read 12bit resolution and adjust T1 = T1 AND &hFE 'truncate 0.5deg(or use integer division \) Value = T1/2- 0.25 + (16 - g) /16 '12 bit value ENDIF CASE 34, 40 ' DS18S22 or DS18B20 IF T2 AND &b1000 THEN 'negative temp 'make 2s complement (1s complement+1) T2 = (T2 XOR &hFF) T1 = (T1 XOR &hFF)+1 IF T1=1 THEN T2=T2+1 'add the carry if required Value = -((T2 AND &b111) * 256 + T1) / 16 ELSE 'positive temp Value = ((T2 AND &b111) * 256 + T1) / 16 ENDIF CASE ELSE Value = 1000 END SELECT ENDIF getTemp= Value END FUNCTION Jim VK7JH MMedit |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi Jim, All, I have done my test with the 2 types bound together with a small cable tie. The Mouser unit on pin(35) the Jaycar on pin(37) Using this code mik: print "Mouser = "; tempr(35),"Jaycar = ";tempr(37) pause 2000 goto mik: I got these results after heating, carefully, with my heat gun from around 20cm away to roughly 60c and letting them gradually cool... each check is 2 seconds apart. Mouser = 54.25 Jaycar = 54 Mouser = 53.75 Jaycar = 53.5 Mouser = 53.25 Jaycar = 52.75 Mouser = 52.75 Jaycar = 52.25 Mouser = 52.25 Jaycar = 51.75 Mouser = 51.75 Jaycar = 51.25 Mouser = 51.25 Jaycar = 50.75 Mouser = 50.75 Jaycar = 50.25 Mouser = 50.25 Jaycar = 49.75 Mouser = 49.75 Jaycar = 49.5 Mouser = 49.25 Jaycar = 49 Mouser = 48.75 Jaycar = 48.5 Mouser = 48.25 Jaycar = 48 Mouser = 47.75 Jaycar = 47.75 Mouser = 47.5 Jaycar = 47.25 Mouser = 47 Jaycar = 46.75 Mouser = 46.5 Jaycar = 46.5 Mouser = 46.25 Jaycar = 46 Mouser = 45.75 Jaycar = 45.5 Mouser = 45.25 Jaycar = 45 Mouser = 45 Jaycar = 44.75 Mouser = 44.5 Jaycar = 44.25 Mouser = 44.25 Jaycar = 44 Mouser = 43.75 Jaycar = 43.5 Mouser = 43.5 Jaycar = 43.25 Mouser = 43 Jaycar = 43 Mouser = 42.75 Jaycar = 42.5 Mouser = 42.5 Jaycar = 42.25 Mouser = 42 Jaycar = 42 Mouser = 41.75 Jaycar = 41.5 Mouser = 41.5 Jaycar = 41.25 Mouser = 41.25 Jaycar = 41 Mouser = 40.75 Jaycar = 40.75 Mouser = 40.5 Jaycar = 40.25 Mouser = 40.25 Jaycar = 40 Mouser = 40 Jaycar = 39.75 Mouser = 39.5 Jaycar = 39.5 Mouser = 39.25 Jaycar = 39.25 Mouser = 39 Jaycar = 39 Mouser = 38.75 Jaycar = 38.75 Mouser = 38.5 Jaycar = 38.5 Mouser = 38.25 Jaycar = 38 Mouser = 38 Jaycar = 37.75 Mouser = 37.75 Jaycar = 37.5 Mouser = 37.5 Jaycar = 37.25 Mouser = 37.25 Jaycar = 37 Mouser = 37 Jaycar = 36.75 Mouser = 36.75 Jaycar = 36.5 Mouser = 36.5 Jaycar = 36.5 Mouser = 36.25 Jaycar = 36.25 Mouser = 36 Jaycar = 36 Mouser = 35.75 Jaycar = 35.75 Mouser = 35.75 Jaycar = 35.5 Mouser = 35.5 Jaycar = 35.5 Mouser = 35.25 Jaycar = 35.25 Mouser = 35 Jaycar = 35 Mouser = 34.75 Jaycar = 34.75 Mouser = 34.5 Jaycar = 34.5 Mouser = 34.25 Jaycar = 34.25 Mouser = 34 Jaycar = 34.25 Mouser = 34 Jaycar = 34 Mouser = 33.75 Jaycar = 33.75 Mouser = 33.5 Jaycar = 33.5 Mouser = 33.5 Jaycar = 33.5 Mouser = 33.25 Jaycar = 33.25 Mouser = 33 Jaycar = 33 Mouser = 33 Jaycar = 32.75 Mouser = 32.75 Jaycar = 32.75 Mouser = 32.5 Jaycar = 32.5 Mouser = 32.5 Jaycar = 32.25 Mouser = 32.25 Jaycar = 32.25 Mouser = 32 Jaycar = 32 Mouser = 32 Jaycar = 31.75 Mouser = 31.75 Jaycar = 31.75 Mouser = 31.75 Jaycar = 31.5 Mouser = 31.5 Jaycar = 31.5 Mouser = 31.5 Jaycar = 31.25 Mouser = 31.25 Jaycar = 31.25 Mouser = 31 Jaycar = 31 Mouser = 31 Jaycar = 31 Mouser = 31 Jaycar = 30.75 Mouser = 30.75 Jaycar = 30.75 Mouser = 30.75 Jaycar = 30.5 Mouser = 30.5 Jaycar = 30.5 Mouser = 30.5 Jaycar = 30.25 Mouser = 30.25 Jaycar = 30.25 Mouser = 30.25 Jaycar = 30.25 Mouser = 30 Jaycar = 30 Mouser = 30 Jaycar = 30 Mouser = 29.75 Jaycar = 29.75 Mouser = 29.75 Jaycar = 29.75 Mouser = 29.5 Jaycar = 29.5 Mouser = 29.5 Jaycar = 29.5 Mouser = 29.25 Jaycar = 29.25 Mouser = 29.25 Jaycar = 29.25 Mouser = 29.25 Jaycar = 29.25 Mouser = 29 Jaycar = 29 Mouser = 29 Jaycar = 29 Mouser = 29 Jaycar = 28.75 Mouser = 28.75 Jaycar = 28.75 Mouser = 28.75 Jaycar = 28.75 Mouser = 28.5 Jaycar = 28.5 Mouser = 28.5 Jaycar = 28.5 Mouser = 28.5 Jaycar = 28.25 Mouser = 28.25 Jaycar = 28.25 Mouser = 28.25 Jaycar = 28.25 Mouser = 28.25 Jaycar = 28 Mouser = 28 Jaycar = 28 Mouser = 28 Jaycar = 28 Mouser = 28 Jaycar = 28 Mouser = 27.75 Jaycar = 27.75 Mouser = 27.75 Jaycar = 27.75 Mouser = 27.75 Jaycar = 27.75 Mouser = 27.75 Jaycar = 27.5 Mouser = 27.5 Jaycar = 27.5 Mouser = 27.5 Jaycar = 27.5 Mouser = 27.5 Jaycar = 27.5 Mouser = 27.5 Jaycar = 27.25 Mouser = 27.25 Jaycar = 27.25 Mouser = 27.25 Jaycar = 27.25 Mouser = 27.25 Jaycar = 27.25 Mouser = 27 Jaycar = 27 Mouser = 27 Jaycar = 27 Mouser = 27 Jaycar = 27 Mouser = 27 Jaycar = 26.75 Mouser = 27 Jaycar = 26.75 Mouser = 26.75 Jaycar = 26.75 Mouser = 26.75 Jaycar = 26.75 Mouser = 26.75 Jaycar = 26.75 Mouser = 26.75 Jaycar = 26.5 Mouser = 26.5 Jaycar = 26.5 Mouser = 26.5 Jaycar = 26.5 Mouser = 26.5 Jaycar = 26.5 Mouser = 26.5 Jaycar = 26.25 Mouser = 26.25 Jaycar = 26.25 Mouser = 26.25 Jaycar = 26.25 Mouser = 26.25 Jaycar = 26.25 Mouser = 26.25 Jaycar = 26.25 Mouser = 26.25 Jaycar = 26 Mouser = 26 Jaycar = 26 Mouser = 26 Jaycar = 26 Mouser = 26 Jaycar = 26 Mouser = 26 Jaycar = 26 Mouser = 26 Jaycar = 26 Mouser = 25.75 Jaycar = 25.75 Mouser = 25.75 Jaycar = 25.75 Mouser = 25.75 Jaycar = 25.75 The cooling curve is almost exactly identical and all readings are within 0.25degrees If the Jaycar unit is a fake it's a good fake. This is how I tested them. ![]() This is the markings for each, both appear to be laser etched. ![]() Kind Regards Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2946 |
Hi Jim, All, This is the results of your test code MOUSER Family name: DS18B20 Rom Code: 28 98 4F 9B 09 00 00 73 ScratchPad: 64 01 00 00 3F FF 0C 10 Power mode External ScratchPad: 64 01 FF FF 1F FF 0C 10 Temperature: 22.5 93.301mS, 9 bit ScratchPad: 68 01 FF FF 3F FF 08 10 Temperature: 22.5 169.566mS, 10 bit ScratchPad: 68 01 FF FF 5F FF 08 10 Temperature: 22.375 322.199mS, 11 bit ScratchPad: 66 01 FF FF 7F FF 0A 10 Temperature: 22.25 627.221mS, 12 bit JAYCAR Family name: DS18B20 Rom Code: 28 AA EE 63 3F 14 01 E5 ScratchPad: 64 01 00 00 3F FF 20 10 Power mode External ScratchPad: 64 01 FF FF 1F FF 1F 10 Temperature: 22.5 104.914mS, 9 bit ScratchPad: 68 01 FF FF 3F FF 3F 10 Temperature: 22.5 192.78mS, 10 bit ScratchPad: 68 01 FF FF 5F FF 5F 10 Temperature: 22.5 368.593mS, 11 bit ScratchPad: 68 01 FF FF 7F FF 7F 10 Temperature: 22.4375 720.245mS, 12 bit Kind Regards Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
I tend to agree that the Jaycar ones are usable. Comparing my two devices, the Jaycar is slower but does do all resolutions. A genuine device: Purchased from RS within the last 12 months Family name: DS18B20 Rom Code: 28 A6 56 79 0B 00 00 03 ScratchPad: 50 05 4B 46 7F FF 0C 10 Power mode External ScratchPad: 50 05 FF FF 1F FF 0C 10 Temperature: 19.5 93.463mS, 9 bit ScratchPad: 38 01 FF FF 3F FF 08 10 Temperature: 19.5 169.916mS, 10 bit ScratchPad: 38 01 FF FF 5F FF 08 10 Temperature: 19.5 322.736mS, 11 bit ScratchPad: 38 01 FF FF 7F FF 08 10 Temperature: 19.4375 628.411mS, 12 bit A suspect device: Purchased from a Jaycar reseller last week Family name: DS18B20 Rom Code: 28 AA 42 A3 41 14 01 D5 ScratchPad: 50 05 4B 46 7F FF 0C 10 Power mode External ScratchPad: 50 05 FF FF 1F FF 1F 10 Temperature: 20 107.037mS, 9 bit ScratchPad: 40 01 FF FF 3F FF 3F 10 Temperature: 20 196.968mS, 10 bit ScratchPad: 40 01 FF FF 5F FF 5F 10 Temperature: 20.125 376.948mS, 11 bit ScratchPad: 42 01 FF FF 7F FF 7F 10 Temperature: 20.125 736.821mS, 12 bit Jim VK7JH MMedit |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 868 |
Jim, I get this from my CMM2 using one of the "Fake" units Is this what you expect? Andrew |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6219 |
According to https://github.com/cpetrich/counterfeit_DS18B20 Your rom code is wrong due to the "20 02" last two numbers which should be zeros. Based on the timing for 12 bit conversion, your device is group A2. "significant number of sensors with offsets outside the ±0.5 C range at 0 °C" Jim VK7JH MMedit |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 868 |
Thanks Jim. I read the Github article - very interesting. Yes mine are clones/fakes/imitations in the A2 group (and there is nothing on the indent) but they could be worse. Whilst I'd prefer genuine, and am happy to support the genuine supply chain, I can live with the 0.5C error margin (I calibrate them against an assumed good one and apply a correction (which I can update via HC-12) - at least they are all consistently wrong. I'm not sure what the error at 0C means but fortunately all mine are at >10C as I use a DHT22 outside. Any new ones I'll get from RS. Cheers, Andrew |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |