Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upESP8266 parasitic DS18B20 reset during conversion (85°C) #58
Comments
This comment has been minimized.
This comment has been minimized.
Update: Today I debugged a bit further and I find it even weirder now. I poked around here and there in the library but could not find the error. From what I can see, the software says that it should be working fine and my old binary says the hardware works fine too, but obviously it doesn't... After five hours of unsuccessful debugging I gave up again. Maybe someone else can reproduce / has already experienced the issue and is not satisfied with the dirty workaround of using a lower pull-up resistor? |
This comment has been minimized.
This comment has been minimized.
Hi @LeoDJ , I am running latest IDE, latest esp library and latest onewire. With the demo sketches I get -127 or no more addresses, depending on sketch. Go to a different older firmware and it works again. Did you ever figure out the problem? Find it really annoying that I can not update firmware to latest versions or make different devices that require different specs. |
This comment has been minimized.
This comment has been minimized.
At the risk of repeating myself, I'm depending on the ESP community to submit pull requests for ESP8266 specific problems. I do not directly support ESP and I can not get involved in these sorts of changes that happen on the ESP platform. |
This comment has been minimized.
This comment has been minimized.
Hi, I'm experimenting the same problem. |
This comment has been minimized.
This comment has been minimized.
Hi, same thing here....could not DS18B20 sensor work with Arduino IDE 1.8.5 and lastest OneWire/Dallas library... I give up... |
This comment has been minimized.
This comment has been minimized.
@Dooque @fguiet , I beieve we all got some cheap bootleg variation sensor. I ordered one from a sonoff vender directly and that one worked perfectly, even with a 3m extension cable. |
This comment has been minimized.
This comment has been minimized.
Any suggestions where to buy the not-so-good knockoff sensor? (for testing with this library...) All the ones I have are genuine, purchased from Digikey. |
This comment has been minimized.
This comment has been minimized.
Hm, that might be a possiblity, but I for myself definitley have got genuine DS18B20s, because I ordered them directly from Maxim Integrated. |
This comment has been minimized.
This comment has been minimized.
Some updates : got that sketch on my wemos which was working without a glitch for ages...decided to make some changes...and boom impossible to make it great |
This comment has been minimized.
This comment has been minimized.
Yes, all those alternatives sounds good but they are workarounds, I really would like to fix the problem because I already have the hardware. I didn't have the time to take a deeper look at this, I think my subconscious is intentionally avoiding it. |
This comment has been minimized.
This comment has been minimized.
As a library maintainer, I can't begin to tell you how frustrating ESP8266 is. Why do you folks use this terrible platform? (ok, I know why... it's $2... but still) |
This comment has been minimized.
This comment has been minimized.
I have the same issue. Resurrected some old code that I knew worked a while ago and on Arduino IDE 1.8.9, OneWire 2.3.4, DallasTemperature 3.8.0 I get the same 85 degree issue. I had the circuit in powered (non-parasite) mode or parasite mode and got the same result. Replacing the 4.7k resistor with a 1k resistor solves the issue but I am not sure how "safe" that is for the components (considering the datasheet specifically calls out 4.7k). Not sure how I can help solve this one, let me know. |
This comment has been minimized.
This comment has been minimized.
Hello, these days I also started with ESP8266 and temperature sensor DS18B20 84 dsensos on one wire) and I was very disappointed about the behaviour. After some hours all 4 sensors provided a value of -127; this happens very sporadically. I googled a lot but I could not find any real solution. I am using the newest Arduino version and the newest Dalles one as well. Finally i am using a workaround: I check the value and if it is -127 and cut the power from the sensor via software (relais is controlling the power of the sensors and relais is controlled by Arduino pin). Thank and regards |
This comment has been minimized.
This comment has been minimized.
If you get -127, turn around DS18B20. It can be plugged incorrect side. |
This comment has been minimized.
This comment has been minimized.
I am getting similar issues, and I got mine directly from the source, but a very long time ago. |
Description
I was running two
DS18B20+PAR
temperature sensors without any problems for the last two years on an ESP-01 module running on 3.3V using a 4.7K pullup resistor.Now, wanting to develop a new firmware I started the development with new versions of everything (Arduino IDE and libraries), but now, with the exact same hardware setup that worked flawlessly for two years, the sensor always returns 85°C (error code for reset during conversion). I suspect that somehow, I don't know how, the ESP does not leave the data pin powered anymore.
To test this, I recompiled and flashed my old firmware that was running fine for two years and lo and behold, it still returned 85°C. Trying to isolate the issue, I flashed the old binary of the firmware and it returned the correct temperatures again.
To isolate the issue further, I tried numerous versions of the OneWire (2.3 to 2.3.2) and DallasTemperature (3.7.3 to 3.7.9) libraries, but to no effect. I am still getting 85°C all the time.
I also tried to compile it using Arduino IDE and PlatformIO, but both yielded the same issue still.
Trying on another ESP8266 (Wemos D1 mini and nodeMCU) did not change anything.
Slowly I am suspecting that the issue lies in the ESP8266-Arduino framework updating something or a change in the compiler, which now breaks keeping the data pin configured as output during the conversion.
A workaround, of course, is to use a lower value pullup resistor so that the sensors take power through that instead of the powered microcontroller pin. (One parasitic sensor requires 1K, two 470 Ohms) But this is not a solution.
I will update this issue in the following days by testing on other platforms (older Arduino IDE, older Arduino-ESP8266 version, different OS) and hooking a oscilloscope up to the data line to see if the issue really lies in voltage sag during conversion.
Also, I want to try out the library fork from orgua to see if the issue happens in his library too.
So, to conclude: I can rule out a hardware isse, I think it's not an issue with library versions and I suspect something in the ESP8266-Arduino framework or Arduino IDE (compile options).
I am looking forward to help fix this issue soon. :)
Steps To Reproduce Problem
Try to read temperatures with an ESP8266 and a parasitic DS18B20 with 4.7K pullup. Using the newest Arduino IDE, ESP8266-Arduino, OneWire and DallasTemperature versions.
Hardware & Software
Board: ESP8266 (any module, tried ESP01, Wemos D1 mini, nodeMCU
No shields
Arduino IDE version: 1.8.5
Version info & package name (from Tools > Boards > Board Manager): 2.3.4 (but tried all other versions)
Operating system & version: Windows 10
Any other software or hardware? Dallas DS18B20+PAR connected with a 4.7K pullup
Arduino Sketch
Happens with every sketch, not limited to this one (Simple Example)
Errors or Incorrect Output
It returns 85°C all the time.
Looking forward to help fix this issue soon.