I have three DS18B20 sensors from a few years ago. I got them out today, wired them up, and loaded the DallasTemperature Single example. Hooking them up one at a time, the DallasTemperature library ALWAYS reports parasite power mode is on. I believe it is reporting correctly, as when I revert to the OneWire library on it's own, and send a write(0x44, 0), which is power off after measurement, the value read from the scratch pad is always minimum temp (-127c). I have verified 5vdc is making it to Vdd (pin 3), and clearly the other pins are connected properly because parasite power works perfectly. I have tried 4.7k, 2.2k, and 1.5k resistors on DQ with no success.
I've had these sensors since before I had any clue of what to do, and certainly could have hooked them all up backwards a time or two years earlier. Is it possible the Vdd is simply burned up?
docdockstader:
I believe it is reporting correctly, as when I revert to the OneWire library on it's own, and send a write(0x44, 0), which is power off after measurement, the value read from the scratch pad is always minimum temp (-127c). I have verified 5vdc is making it to Vdd (pin 3), and clearly the other pins are connected properly because parasite power works perfectly.
.......... certainly could have hooked them all up backwards a time or two years earlier. Is it possible the Vdd is simply burned up?
It is all pretty scrambled, but DS18B20s can stand abuse, even abuse like this, but I submit that the only way they can be "stuck in parasite power mode" is because you wired it up that way, and probably badly. This might go some way to explain why you get a reading of -127, which usually indicates "no connection". In the unlikely event that you need to use parasite power, Vdd is connected to ground, as clearly shown on page 6 of the manual.
In general its best to avoid parasite power mode if you can, and power them normally with a decoupling capacitor for each sensor. Less chance of issues. Parasite power precludes proper decoupling and increases
the chance of problems especially for multiple sensors or long cables.
At the very least test the sensors in normal power mode first, without a cable, then start adding complications,
you'll be able to figure out if there's an issue with cable or mode more readily if you start with the easiest setup
first.
I'm no expert, but I am very confident it is wired correctly in regular power mode. My original post was confusing, in parasite power mode I do ground the Vdd pin, but even when I wire it in regular mode with Vdd on 5vdc, it still reports and acts like parasite power mode.
I've attached an image similiar to how I have wired the two sensors.
"Somewhat" sounds like just wishful thinking, and the same might be said about "similar". What is clear, though, is that you actually have good information on how to connect the sensors in the proper manner. In the light of that, you might test each sensor individually, using exactly the connections in the diagram. If they don't behave in the proper manner, it is time to conclude that you are right, and they have been abused beyond redemption.
docdockstader:
I'm no expert, but I am very confident it is wired correctly in regular power mode. My original post was confusing, in parasite power mode I do ground the Vdd pin, but even when I wire it in regular mode with Vdd on 5vdc, it still reports and acts like parasite power mode.
I've attached an image similiar to how I have wired the two sensors.
No decoupling capacitors, I'm just on a breadboard at the moment, 22 gauge jumper wires about 6 inches in length. I have a bunch of new sensors on order, should be here Tuesday. That'll go a long ways to rule out simple wiring issues.
I wouldn't necessarily throw these away when the new one arrive. I have never heard of the DS18B20P but I'm guessing there are two possibilites as to what is going on.
The DS18B20P is an obsolete device, and you are the last to have them. They may have been made obsolete by the ordinary DS18B20, which had other improvements and was just as good at running on parasite power.
As I believe was obliquely suggested in the data sheets, running the DS18B20 on parasite power was always a bad idea, and only for the obstinate and the desperate. This now more evident by the production of a brand new version, the DS18B209P, which is specifically designed for parasite power. This is a good idea, and you are the first to have them. Further, these new devices are designed for longer cable runs, and they will thus replace the DS18B20 entirely.
As the data sheet is from Dallas rather than Maxim, I believe my speculation #1 is correct. This does not mean they are junk, the performance appears to be the same, and you just need to know what you have in your hand.