B4R Question Sensor ds18b20 strange readings

Cesar_Morisco

Active Member
Licensed User
Longtime User
Hello everyone, everything good
I am using ds18b20 sensor on esp8266
When the Temperature exceeds 128 degrees it starts showing Negative Temperature - 123 degrees. Can anyone tell me. Thanks.
Using this example

 
Hello everyone, everything good
I am using ds18b20 sensor on esp8266
When the Temperature exceeds 128 degrees it starts showing Negative Temperature - 123 degrees. Can anyone tell me. Thanks.
Using this example


I have never used it but what you have mentioned forces me to think that it presents the temperature as signed byte. Try to assign to a ubyte variable the result of Bit.And(temperature, 0xff).
 
Upvote 0
I have never used it but what you have mentioned forces me to think that it presents the temperature as signed byte. Try to assign to a ubyte variable the result of Bit.And(temperature, 0xff).
Hi Hatzis How are you?
I think the ds18b20 limit is -55 to 125, even from the research I did
I need a sensor that reads from 0 to 300 degrees
Thank you from the bottom of my heart for your answer

fotos
When the temperature goes above 128 it becomes negative
 

Attachments

  • 20240223_172543.jpg
    20240223_172543.jpg
    74.9 KB · Views: 504
  • 20240223_172606.jpg
    20240223_172606.jpg
    80.2 KB · Views: 543
Upvote 0
Hi
You can use MAX31865 with RTD or MAX31855 with thermocouple for measuring high temperatures. Libraries for both are available for Arduino and we can use them with inline C with B4R. I have used RTD successfully.
 
Upvote 0
Hi Hatzis How are you?
I think the ds18b20 limit is -55 to 125, even from the research I did
I need a sensor that reads from 0 to 300 degrees
Thank you from the bottom of my heart for your answer

fotos
When the temperature goes above 128 it becomes negative

I was not aware of this. Thanks. I suppose my assumption was completely wrong.
 
Upvote 0
Hi
You can use MAX31865 with RTD or MAX31855 with thermocouple for measuring high temperatures. Libraries for both are available for Arduino and we can use them with inline C with B4R. I have used RTD successfully.

Additionally MAX6675 is also Thermocouple Temperature Measurement IC.
Maybe it compete MAX31855 in some features or price. I use it and have good results. Good luck...
 
Upvote 0
Hi
You can use MAX31865 with RTD or MAX31855 with thermocouple for measuring high temperatures. Libraries for both are available for Arduino and we can use them with inline C with B4R. I have used RTD successfully.
Hello rbghongade how are you?
Thanks for your response.
A hug
 
Upvote 0
Back
Top