I recently received a DS18B20 that I ordered. Unfortunately it is set to parasitic power mode, which I do not want. How can I turn it off? And where can I find a description of the functions to be used with DallasTemperature and OneWire library.
How do you know it is set to parasitic mode? Parasite mode is a way of powering the device. It is not a mode that is set in an internal register or whatever.
If I am not wrong there are some models who has Vdd connected to ground internally. Maybe their code end with a P. Anyway this is written in the datasheet.
Ah, you're right. There is a DS18B20-PAR which is internally configured for parasite power and there's no apparent way to change that. The pin that is Vdd on a DS18B20 has no connection on a DS18B20-PAR. @aellenni: If you bought a DS18B20-PAR you can't change it to use non-parasite power.
Thank you all for your replies! It is a DS18B20 (not PAR). When Vdd is connected to 5V parasitic is OFF, when not connected to 5V on (as you guys said).
But I guess the sensor is broken: it shows -127 C when not in parasitic mode and 85 C in when parasitic mode is ON. (In both set-ups the pull-up resistor is in place and the other 4 equivalent DS18B20 sensors work fine)
Is there anywhere a description for the functions that can be called with the DallasTemperature and OneWire libraries?
This indicates that the Arduino is not seeing the sensor at all. -127C means that it was reading all ones on the dataline. The pullup resistor holds the data line high (= 1) and the sensor should pull it to ground for a zero. That isn't happening so something's amiss in non-parasite mode - or there's something about the wiring that you haven't told us yet.
85 C in when parasitic mode is ON
That means that the processor is seeing a response from the sensor. When the sensor is first powered up, its temperature register is initialized to 85C. If the sensor returns a value of 85C it means that it hasn't seen a valid request to do a temperature conversion since it was powered on but it is working.
I haven't seen a site which describes all the library functions. I just read the code. On my system I installed it in ...\Documents\Arduino\libraries\dallastemperature
It is conncected just as shown in the picture in Zoomx's post. When I replace this sensor with any of the other 4 sensors, the temperature is being measured and displayed. Just with that one sensor it is not working