mega-20190630, DS18b20: Wrong temp

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

mega-20190630, DS18b20: Wrong temp

#1 Post by M*I*B » 08 Nov 2019, 18:12

Hi there,

I have reactivate an older SONOFF S20 with an DS18b20 on GPIO1. The Plug is used outside and at the moment we have arround 6°C. But the Software like to tell me I can go out in T-shirt: Shows 16,4°C :?: :?: :?:
Ok, maybe broken. Replaced with a brandnew DS18b20 ... Same ... Another brand new? ... nope! Hu????

Any idea what's going on here?
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 416
Joined: 17 Jun 2018, 20:41
Location: USA

Re: mega-20190630, DS18b20: Wrong temp

#2 Post by ThomasB » 08 Nov 2019, 19:33

Any chance your sensor is physically close to the Sonoff?
My story: I was getting elevated temperatures on my Sonoffs with DS18b20 sensors. Sonoffs run warm and my sensors were too close. I solved this by moving the DS18b20 several inches from the Sonoff.

Is the sensor and Sonoff sharing space in the same protective enclosure?
If they are in the same enclosure then the sensor will need to be relocated.

- Thomas

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#3 Post by M*I*B » 08 Nov 2019, 19:49

... nope ... The Sensor is outside the enclosure and plugable on the bottom of the S20. The S20 is still outside without load placed on a small table.

Meanwhile we have arround 6°C outside (four sensors on each side of our house under the roof overhang), the DS see it as 16.25°C...
hmmm... Can it be that the 1st digit is wrong? 6.25°C can match it... Just an upcomming idea...
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 416
Joined: 17 Jun 2018, 20:41
Location: USA

Re: mega-20190630, DS18b20: Wrong temp

#4 Post by ThomasB » 08 Nov 2019, 20:06

Interesting. I grabbed my IR gun and checked a Sonoff Basic that has a DS18B20. Being in North America I use the formula option (%value%*9/5+32) to convert to F. The reported temperature matches my IR measurement.

Maybe there's a formula corruption in your plugin. As a test, if your DS18b20 device formula option entry is empty, then enter %value% in it.

Lastly, clear the flash and update to the latest firmware.
The Sensor is outside the enclosure and plugable on the bottom of the S20. The S20 is still outside without load placed on a small table.
FWIW, my Sonoffs do not have a AC load either. They are just used as remote sensors. The Sonoff's plastic case gets warm even when running idle without a load. The short wire leads to the sensor were conducting this heat. Solved by remotely mounting the sensor with a few inches of wire.

- Thomas

TD-er
Core team member
Posts: 1776
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#5 Post by TD-er » 08 Nov 2019, 20:31

GPIO1 is connected to the TX of the ESP serial.
Are you sure the serial port has been disabled in Tools => Advanced?
See also this table: https://espeasy.readthedocs.io/en/lates ... on-esp8266

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#6 Post by M*I*B » 08 Nov 2019, 22:56

... sorry for late response ... Fridays are shooting club time... And before christmas time to shoot an half Pork... :mrgreen:

ThomasB:
Formular- field are empty. Also insert %value% don't change anything

TD-er:
Jupp, that's deactivated

Thing is, that I have used this plug former inside and I remember that all temp- data are plausible.
I just take a look at the real outside- temp. It's now arround 5.6°C. But the S20m show me 12.13°C. Looks like my digit-idea was wrong...

Tomorrow I will try to update the newest version and then let's see what's happend
DLzG
Micha

TD-er
Core team member
Posts: 1776
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#7 Post by TD-er » 09 Nov 2019, 01:06

Maybe also for testing, try to run an older version also.
Maybe some version of 2 months ago, give or take.

The one I run in my weather station is from 24th September (self built), so maybe take a nightly build from the next build after the 24th.

Just to make sure any recent changes in the Dallas plugin does not cause these issues.

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#8 Post by M*I*B » 09 Nov 2019, 17:54

... ok, any is wrong ...

I have try different versions with the exact same result. Now I have flash the newest version to two S20 and set one to use GPIO1 and the other one to use GPIO3 for 1W-Data. And now we have a difference between both!

Both don't show the correct temp but both on GPIO1 show similar. Now the one on GPIO3 shows arround 6 Kelvin less but 8 Kelvin to much (real on this place are 6°C). It makes no difference if I swap the sensors over cross; same result
.
.
capture_001_09112019_174634.jpg
capture_001_09112019_174634.jpg (308.46 KiB) Viewed 136 times
.
.
I'm shure there must be a bug that only comes up if the real temp goes under a unknown level. At roomtemp maybe it's going well but this thing is not useable outside to control some about the real outside temp ...


BTW: It isn't possible to set the resolution of the sensor to 9 or 10 bit. Only 11 or 12 are possible. This is occure since I know and work with ESPeasy ...
DLzG
Micha

TD-er
Core team member
Posts: 1776
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#9 Post by TD-er » 09 Nov 2019, 18:02

BTW: It isn't possible to set the resolution of the sensor to 9 or 10 bit. Only 11 or 12 are possible. This is occure since I know and work with ESPeasy ...
It is possible, the settings will be stored in the sensor itself.

But recently we have had quite some discussions about the Dallas sensors and it appears a lot of these issues are caused by using not original Dallas sensors.

About the lower temperature, I will place one outside and check.

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#10 Post by M*I*B » 10 Nov 2019, 11:53

... just temp showing in the morning today.

Real outside temp on this place: +3,3°C

GPIO 1 : +18,62°C
GPIO 3 : +12,50°C

Swap DS18B20 over cross

GPIO 1 : +19,25°C
GPIO 3 : +13,00°C

(maybe a little more while touching)
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 416
Joined: 17 Jun 2018, 20:41
Location: USA

Re: mega-20190630, DS18b20: Wrong temp

#11 Post by ThomasB » 11 Nov 2019, 02:10

This is quite the mystery.

Try this:
1. Unplug the Sonoff device and leave it outside near the AC outlet. Your trusted reference thermometer should remain next to it.
2. Wait one hour, then plug-in the Sonoff device to the outlet.
3. Immediately after the device connects to Wifi observe the DS18b20 temperature. Compare it to the reference thermometer.

Is the "cold boot" power-up temperature accurate?
Watch it for a couple hours. Does it slowly get worse as the device continues to run?

- Thomas

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#12 Post by M*I*B » 11 Nov 2019, 16:38

... just start that...

Real 4,9

6,12
9,38

... and fast rising !!!

You have the right idea! It looks like the sensor is picking up too much energy and heating itself up.

Since the sensor is located outside the housing, only the current consumption of the sensor itself can be the cause. The power supply is eliminated because the sensors tolerate up to 5V and are only operated at 3.3V. So only the "outgoing" current remains over the data line.
Suppose, that's the case, then the GPIO's are too low resp. there is still some internal or external resistance that causes these problems.
DLzG
Micha

User avatar
ThomasB
Normal user
Posts: 416
Joined: 17 Jun 2018, 20:41
Location: USA

Re: mega-20190630, DS18b20: Wrong temp

#13 Post by ThomasB » 11 Nov 2019, 17:05

Since the sensor is located outside the housing, only the current consumption of the sensor itself can be the cause.
Being outside of the housing does not stop the temperature rise from the Sonoff. Heat is also conducted from the warm PCB to the wire leads on the DS18b20. That is one of the reasons why I recommend using long wire leads.

Here is a photo of one of my Sonoffs that is installed in the attic. It shows the DS18b20 at the end of 3-inch long 26AWG wire leads. The long thin wire provides conducted heat isolation from the PCB. It also moves the chip away from the warm plastic housing. Your installation should do this too.
ds18b20.jpg
ds18b20 installed on 3-inch wire leads.
ds18b20.jpg (149.4 KiB) Viewed 48 times

Please post a photo of the DS18b20's installation on your existing Sonoff. It will be interesting to see how you have it connected.

- Thomas

TD-er
Core team member
Posts: 1776
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#14 Post by TD-er » 11 Nov 2019, 20:56

Are you able to measure the current consumption of the sensor?

User avatar
M*I*B
Normal user
Posts: 88
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: mega-20190630, DS18b20: Wrong temp

#15 Post by M*I*B » 11 Nov 2019, 21:32

... yapp, I will messure the current, take pictures a.s.o. but ... tomorrow... :roll:
DLzG
Micha

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests