PaulStoffregen / OneWire

Library for Dallas/Maxim 1-Wire Chips
http://www.pjrc.com/teensy/td_libs_OneWire.html
579 stars 382 forks source link

ESP8266 and sensor DS18B20 provides -127 sporadically #76

Open Harald2019F opened 4 years ago

Harald2019F commented 4 years ago

Hello, these days I started a project with ESP8266 and temperature sensor DS18B20 . I used 4 sensors 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. Sometimes it happens after a few minutes, sometimes after a few hours. I checked the voltage of the data line of the sensors and noticed that whenever the error occurred it was about 1 V instead of 3.,3V. So, anything must cause the data line of the sensor to be put to 1 V (low) constantly. Only switching of the power of the sensor brings it back to a normal state. I am using the newest Arduino version and the newest Dalles one as well. Finally I am using a workaround as follows: I check the values provided by the sensors and if it is -127 I am cutting the power from the sensor via software (relais is controlling the power of the sensors and relais is controlled by Arduino pin).

Has anybody found a proper solution for this issue ?

Thank and regards Harald

skandragon commented 4 years ago

I have a similar issue where I am getting a consistent -0.06 most of the time (all 0xff data except first byte) but sometimes I am getting -127. I have 5 setups, all similar in build, but this seems to occur mostly when I am using a DS18B20 that has a very short cable length (in this case, PCB traces.) I do have a 4k7 resistor in use; I cannot easily change this at this point.

Humancell commented 4 years ago

I've run into this periodically, and simply re-request the temperature and wait for the conversion to complete, and I usually get a good value.

Harald2019F commented 4 years ago

In my case a re-request is not possible because the sensor is hanging up from time to time. Only switching of that means disconnecting from the power for a short time brings the sensor to working again. I implemented the switching of process automatically via software when the program (Arduino) recognize the hanging up of the sensor.


Von: Scott C. Lemon [mailto:notifications@github.com] Gesendet: Donnerstag, 10. Oktober 2019 01:49 An: PaulStoffregen/OneWire Cc: Harald2019F; Author Betreff: Re: [PaulStoffregen/OneWire] ESP8266 and sensor DS18B20 provides -127 sporadically (#76)

I've run into this periodically, and simply re-request the temperature and wait for the conversion to complete, and I usually get a good value.

- You are receiving this because you authored the thread. Reply to this email directly, view https://github.com/PaulStoffregen/OneWire/issues/76?email_source=notificati ons&email_token=AM5UR3N5QN33MOMU32YQXN3QNZUW5A5CNFSM4IMQB642YY3PNVWWK3TUL52H S4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAZZWJY#issuecomment-540252967 it on GitHub, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5UR3LT4GKU4GKBRH6EB3LQN ZUW5ANCNFSM4IMQB64Q . https://github.com/notifications/beacon/AM5UR3KFWW2HJXLXLA6GG3DQNZUW5A5CNFS M4IMQB642YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAZZWJY .gif

skandragon commented 4 years ago

I solved this for me by giving someone else all my DS18B20-PAR devices, and just supplying power directly.