DS18B20 only 9 bit resolution

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

DS18B20 only 9 bit resolution

#1 Post by Wiki » 06 Jan 2019, 02:53

Hi,

to use the meanwhile enhanced Web Gui I upgrade four Wemos D1 devices in my production from somewhat in April 2018 to the release of 2018-12-31.

Attached to these devices are DS18B20 Sensors. But with the release of 2018-12-31 it is no more possible to set the resolution of the sensor to 12 bit. I am able to choose 12 bit from the dropdown, but after submitting the resolution still is set to 9 bit. The 18B20 are connected to D3, GPIO-0.

Any suggestions?

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#2 Post by grovkillen » 06 Jan 2019, 08:51

They are automatically set to lower resolution if it experiencing timing issues. This is newly added and will be improved if it's not working good.

Please give more information about your setup. Are you using 5V logic or 3.3V? Parasite or proper setup etc.?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#3 Post by Wiki » 06 Jan 2019, 12:05

Hi,

Wemos D1, 3.3V powered, fixed IP. They were running since april flawlessly, not even one WD reboot, max. uptime ca. 100-120 days. The Dallas config is 3.3V parasite, connected to D3 (GPIO-0), cable length approx. 15cm, data sent every 30sec. Additionally attached Sensors INA219 to SDA/SCL D2/D1 (GPIO-4/GPIO-5). Transmitting every 10sec. RSSI around -55dBm to -60dBm. The firmware I used before was dated on 2018-05-22, coming up from 2018-04-21, update due to slow response times.

Btw: just noticed, first WD reboot came up tonight, never happened before.

Need more?

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#4 Post by grovkillen » 06 Jan 2019, 13:59

Did the 9-bit resolution make the readings less accurate?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#5 Post by Wiki » 06 Jan 2019, 16:27

Hi,

yes it does. Temperatures are only read with 0.5 steps. For my application absolutely not acceptable. I do not need the absolut correct reading but the tendence of the different curves. And that was done before and fulfilled my needs.

Currently I am trying to step back to my stable installation. I was that foolish to update the four devices in row. Stepping back to the release of 2018-04-21 doesn't bring the result to be able to configure the 12 bit resolution again (what???). So I will take these devices out of production, blank them and begin from scratch on.

Furtheron since the update I still recognize WD reboots - on devices which have run >100 days uptime before. Not good, really.

I won't trickle around with the update anymore, I'm now going back to the old, stable release.

If you need some more informations feel free to ask me. It will take some time for me to unbox the four devices one after the other, so maybe that at least one device will be running in unstable conditions until somewhat in the evening and I will have a look at this thread before fixing the last device.

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#6 Post by grovkillen » 06 Jan 2019, 17:01

Thanks for the feedback. Lesson learned, update a test device when dealing with nightlies... :?

We'll be able to test the fallback functionality here in a week or two. Much going on behind the scenes.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#7 Post by Wiki » 06 Jan 2019, 17:23

Hi,

don't panic :mrgreen: . I take the moment as a chance - its the right time, the monitored system itself is asleep during the next one or two weeks. Thats why I took the risk...and now the devices get a hardware upgrade (small display, other powersupply) which was planned anyway.

[OT on]
But if there is so much going on behind the scenes let be be curious: One problem with which I ran into really pain is the corruption of the rules. My device connected to my 7" Nextion is running out of rules space, all four rules section are filled up to app. 1K. Putting more in forces the known issue of corrupting the files. Is there any progress going on?
[/OT off]

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#8 Post by grovkillen » 06 Jan 2019, 18:18

Behind the scenes:
I'm working on a new GUI motor which be part of 2.2 release... 8-) So the rules will not be over written as today's implementation will do if you have multiple rule pages :oops:
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#9 Post by Wiki » 06 Jan 2019, 22:36

Hi,

what the hell is going on?

I'm trying to get my resolution of 12 bit back - but seems to be no way for it.

What witchwork has been done to my device? Do I have to dismount the sensor to reprogram it for answering it is able to deliver 12bit resolution?

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#10 Post by Wiki » 06 Jan 2019, 23:44

Hi,

might be I have found a solution resp. the cause. I equipped a testing devices with a Dallas, connected to D7 (GPIO-13), choosen randomly. And it works with 2018-12-31 (normal), setting the Dallas to 12 bit, connected as parasite feeding, 3.3V.

Though I am setting up a hardware upgrade to these four devices in production I will try tomorrow this setup with the first one I am working on. We'll see.....

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#11 Post by grovkillen » 07 Jan 2019, 05:47

Please report back any findings.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#12 Post by Wiki » 07 Jan 2019, 11:23

Well, now I'm lost.

Resoldered the Dallas to D7(GPIO-13): No way to set resolution to 12 bit neither using 2018-05-22 nor 2018-12-20 nor 2018-12-31. Attached to the device beside the Dallas: SSD1306 OLED and INA219. Difference to the test device I was lucky to configure to 12 bit resolution: brand new Dallas, no OLED, no INA219.

What the hell was happening there? Please bring back my 12 bit.

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#13 Post by grovkillen » 07 Jan 2019, 11:35

It's an open PR addressing the DS18b20. Please add your input to that thread as well.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#14 Post by Wiki » 07 Jan 2019, 13:57

Ehm, what a PR? Public Relation?

User avatar
grovkillen
Core team member
Posts: 3152
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: DS18B20 only 9 bit resolution

#15 Post by grovkillen » 07 Jan 2019, 15:14

ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Wiki
Normal user
Posts: 127
Joined: 23 Apr 2018, 17:55

Re: DS18B20 only 9 bit resolution

#16 Post by Wiki » 07 Jan 2019, 16:01

Finally I've got my 12 bit back.

What I have done:
- Deleted the Dallas in config of my Wemos
- Coded a small sketch which searches the Dallas on OneWire, checks for parasite mode, setup to 12 bit, reads temperature and ends.
- Flashed it to a new Wemos
- Connected the new Wemos to my hardware, started and checked per serial monitor if it succeeded - yes, did
- Reconnected my Wemos and configured the Dallas to 12 bit without enabling it (resolution was set again automatically to 9 bit!)
- rebooted the device, went into Dallas configuration, set it again to 12 bit and saved - Gotcha!

A more complicated configuration of a Dallas is pretty impossible.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests