Moderators: grovkillen, Stuntteam, TD-er
-
mhoek
- New user
- Posts: 5
- Joined: 03 Nov 2015, 21:58
#1
Post
by mhoek » 03 Nov 2015, 22:05
When i connect a single ds18b20 temperature sensor to an ESP8266 with ESPEASY R39, the temperature is measured with a 12-bit accuracy. When i connect multiple sensors on one GPIO or multiple GPIO's, the accuracy of the temperature reading is lowered to 9-bits. In some cases the first sensors still have a 12-bit accuracy, but the last sensors have 9-bit.
Do you have any idea if this is a bug, or a feature

Last edited by
mhoek on 23 Jan 2017, 21:16, edited 1 time in total.
-
smagghe
- New user
- Posts: 7
- Joined: 01 Nov 2015, 23:28
#2
Post
by smagghe » 03 Nov 2015, 22:26
Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
-
Attachments
-
- _P004_Dallas.zip
- (4.32 KiB) Downloaded 570 times
-
rmtucker
- Normal user
- Posts: 57
- Joined: 04 Oct 2015, 17:14
#3
Post
by rmtucker » 03 Nov 2015, 22:37
I have multiple sensors running on one esp8266 with no problems.
But i recently bought a few on ebay which would only work in 9bit mode (I think they were fakes).
Luckily the seller returned my money.
-
mhoek
- New user
- Posts: 5
- Joined: 03 Nov 2015, 21:58
#4
Post
by mhoek » 04 Nov 2015, 07:17
smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
Thanks, I'll try.
I'm pretty sure the accuracy of the sensors isn't the problem, when i was running my own program, the temperature readings were ok.
-
vmfs1968
- Normal user
- Posts: 42
- Joined: 18 Oct 2015, 23:51
#5
Post
by vmfs1968 » 04 Nov 2015, 12:32
Hello
I see if my DS18B20 is working the 9-bit or 12?
-
mhoek
- New user
- Posts: 5
- Joined: 03 Nov 2015, 21:58
#6
Post
by mhoek » 05 Nov 2015, 07:21
smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
Works like a charm!!
-
mhoek
- New user
- Posts: 5
- Joined: 03 Nov 2015, 21:58
#7
Post
by mhoek » 23 Jan 2017, 21:07
smagghe wrote:Hello,
You can test this version of the dallas plugins. With the one you can set the resolution (accuracy).
please tell me if it's ok and working for you.
Hi there, the plugin you suggested has one minor bug: Every reboot, the resolution must be set again to 12-bits.
I've noticed this plugin isn't compatible with R120. Do you have another version of the plugin that is compatible with R120??
-
mhoek
- New user
- Posts: 5
- Joined: 03 Nov 2015, 21:58
#8
Post
by mhoek » 24 Jan 2017, 20:25
I have made the following changes to plugin _004
Code: Select all
Plugin_004_DS_reset();
Plugin_004_DS_write(0x55); // Match ROM command
for (byte i = 0; i < 8; i++)
Plugin_004_DS_write(ROM[i]); // ROM selection
Plugin_004_DS_write(0x4E); // Write Scratchpad
Plugin_004_DS_write(0x00);
Plugin_004_DS_write(0x00);
Plugin_004_DS_write(0xFF); // set 12-bit resolution
delay(50);
The code above has been inserted before :
Code: Select all
Plugin_004_DS_reset();
Plugin_004_DS_write(0x55); // Match ROM command
for (byte i = 0; i < 8; i++)
Plugin_004_DS_write(ROM[i]); // ROM selection
Plugin_004_DS_write(0x44); // Convert T
delay(800);
I think some of my sensors have been programmed in 9-bit resolution before. This was the most easy fix i think.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 11 guests