DS18B20 Incorrect Reading

Are either of the libraries (Onewire or DS18B20) in Build working correctly for the DS18B20? I’m currently testing 2 different devices, and each gives me 85 degrees celsius all the time (using either library). I am getting the address fine using the example code in each of those 2 libraries. This is on a Photon running 0.4.9. I’ve hooked up the device using the active power mode (3 wire)

Sorry, false alarm. My particular device is a DS18B20-PAR so it needs to be used differently. I’ll work on getting it to work, and come back if I have problems.

After Edit: The docs for the DS18B20-PAR say that you need to pull the data line up to the positive rail with a MOSFET during the temperature conversion or EEPROM writes. I haven’t tried that yet, but looking at several posts on an arduino site, it was suggested that decreasing the resistance of the pull-up resistor from 4.7 k to 1 k, would fix the problem of not enough power getting to the device. I tried that, and it did work. I don’t know how reliable that is, but so far my readings have been solid.

2 Likes

Hi
can you solve this problem?

@arvand, you need to include more details. What device are you using? What DeviceOS are your using? Which libraries are you using?

I use arduino Uno and Dallastemperature.h
There is something else, i dont use this DS18B20 i use another one without wire, its look like a transistor

@arvand, this is a forum for Particle devices, not Arduino. The platform is substantially different from an Uno so that you are best to post your questions in the Arduino forum. I suggest you do a forum search there as the DS18B20 is a common OneWire temperature sensor.

4 Likes

Thanks buddy

1 Like

i have this question too. i use this peer to peer connection and i have problem whit DS18B20 . can you help me please?

Hi @irenx, can you clarify which Particle device you are working on?

When you have the same question this comment from before still applies