Hi guys,
I've been tinkering around with the DS18B20 w1 temp probe for about 6+ years now and I've had the same frustrations as most people have had in the past and I'm writing this in hopes that someone will come across this post and try this solution out.
I've had the problems of 00-00000 folders and temp probes that would stop reading after 2 or 3 days. I've had folders disappearing on me after 3 working days. I've had issues with temp probes not reading if it was longer than 30~40 ft away. I've tried various OSs and I2Cs and here's the quick run down. Simply put, it's a capacitance interference issue and a power problem. When the distance is too long, you get voltage drops and that is why you lose communication with the temperature probe. If the voltage drops, you require more amperage. If it's a shorter distance like 30 ft away, switching it over to the 5V power might do the trick. Super short distances don't have this problem because the wire distance is not long enough for the voltage drop to make a significant impact. Yes, you can use repeaters, you can also throw multiple pis throughout your warehouse near the sensor, setup a central server and store all data there via wifi, but this is a cheaper solution.
For the most part, look for DS18B20s with the 4.7k resistor on them, they're pretty standard nowadays. My new setup, I have temp probes that are nearly 200 ft away from the pi and I am getting some reading errors like -3615 F, but no weird 00 folders and no disappearing folders. This is on non-parasitic mode with 3v3 power.
I attached a 10uF tantalum capacitor at the sensor end (200 ft away) and attach it between the GND and VCC. If you are running cable this long, be a good techie and put your stuff in a box with a terminal block to wire all your connections. I did the same near the pi end, where I have the DS18B20 and attached the 10uF tantalum capacitor there as well between the GND and VCC. If you still get inconsistent readings or errors, just add more capacitors. For this setup to run without issue, I had to use 2 caps per sensor at the probe end and then I used 1 at the pi end.
Surprisingly, the readings became more accurate. I take 10 readings and sort them into an array and then take the median, store that into a database then use grafana to graph. This will help exclude the weird outliers like -3615 F or + 2000F. I am not pinging both temp probes at the same time. I'm pinging them one at a time.
I personally think the phone line 26~28 awg works better than the stranded cat6 wires just because the phone lines I used was a single strand of copper wire. I tested this on a 300 ft phone cable and I had to throw 1 capacitor at the sensor end. I did not have any errors with this setup, but I did not run the phone cable through my warehouse, I ended up going with the cat6 cable (22 awg or something). Bigger wire (lower gauge) is better for voltage drop issue.
Good luck!
- justadudemate
I've been tinkering around with the DS18B20 w1 temp probe for about 6+ years now and I've had the same frustrations as most people have had in the past and I'm writing this in hopes that someone will come across this post and try this solution out.
I've had the problems of 00-00000 folders and temp probes that would stop reading after 2 or 3 days. I've had folders disappearing on me after 3 working days. I've had issues with temp probes not reading if it was longer than 30~40 ft away. I've tried various OSs and I2Cs and here's the quick run down. Simply put, it's a capacitance interference issue and a power problem. When the distance is too long, you get voltage drops and that is why you lose communication with the temperature probe. If the voltage drops, you require more amperage. If it's a shorter distance like 30 ft away, switching it over to the 5V power might do the trick. Super short distances don't have this problem because the wire distance is not long enough for the voltage drop to make a significant impact. Yes, you can use repeaters, you can also throw multiple pis throughout your warehouse near the sensor, setup a central server and store all data there via wifi, but this is a cheaper solution.
For the most part, look for DS18B20s with the 4.7k resistor on them, they're pretty standard nowadays. My new setup, I have temp probes that are nearly 200 ft away from the pi and I am getting some reading errors like -3615 F, but no weird 00 folders and no disappearing folders. This is on non-parasitic mode with 3v3 power.
I attached a 10uF tantalum capacitor at the sensor end (200 ft away) and attach it between the GND and VCC. If you are running cable this long, be a good techie and put your stuff in a box with a terminal block to wire all your connections. I did the same near the pi end, where I have the DS18B20 and attached the 10uF tantalum capacitor there as well between the GND and VCC. If you still get inconsistent readings or errors, just add more capacitors. For this setup to run without issue, I had to use 2 caps per sensor at the probe end and then I used 1 at the pi end.
Surprisingly, the readings became more accurate. I take 10 readings and sort them into an array and then take the median, store that into a database then use grafana to graph. This will help exclude the weird outliers like -3615 F or + 2000F. I am not pinging both temp probes at the same time. I'm pinging them one at a time.
I personally think the phone line 26~28 awg works better than the stranded cat6 wires just because the phone lines I used was a single strand of copper wire. I tested this on a 300 ft phone cable and I had to throw 1 capacitor at the sensor end. I did not have any errors with this setup, but I did not run the phone cable through my warehouse, I ended up going with the cat6 cable (22 awg or something). Bigger wire (lower gauge) is better for voltage drop issue.
Good luck!
- justadudemate
Statistics: Posted by justadudemate — Sat Nov 09, 2024 12:20 am — Replies 0 — Views 18