-
-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS18B20 Issue #1393
Comments
Please describe the details of your wiring. |
What is the length of wire? Have you tried 5 VDC? |
Have you verified the resistance of the resistor? |
Yes, tried the 5 VDC and still same behavior |
Have you tried one sensor at a time? |
Yes, right now I have only one DS18B20 connected and still same behavior. Even swapping DS18B20 and behavior is the exact same. Keep getting phantom IDs and no data reads |
You've enabled 1wire after reinstalling? |
yes, it is enabled. Config file shows that. Also tried rebooting a few times |
Sounds like damaged hardware. Have you tried other software and hardware to communicate with the sensors? |
Ouch, guess I will have to find a new RPi. I will try that. Thank you so much for the quick responses!
|
I would try assigning 1wire to another pin besides 4 and testing. Do you have an arduino-compatible microcontroller? |
And by try other software, there are many available to communicate with 1wire sensors, the ds18b20 in particular, since it's probably the most populate 1wire sensor in existence. |
There's also the possibility you have counterfeit sensors (very common). Did you buy from a reputable vendor? |
I bought from Adafruit… pretty reputable. I purchased a new rpi 4 to test
it out as I do not have an arduino or other microcontroller to test. I have
use for the other rpi so it will come in handy.
I tried a different gpio pin but got the same result. Digging through rpi
forums i found a similar issie that was the rpi. I’ll test the new rpi
that’s coming in soon and report back for completion so we can close this for future reference
|
I've had various problems with the DS18B20 stopping to work on the RPi. Usually it works for a while and the just stops. At least once it started working again when I disabled the input in Mycodo and re-enabled it but usually it starts working when I reboot the RPi. I remember one instance where using RPi routine independent of Mycodo I was able to read the temp and recovered it by reimaging the SD and reloading Mycodo. I think one time that it stopped working, the RPi was bad. I've also had broken connections that have caused it to stop working. I suspect at least part of the problem is a bug in the RPI DS18B20 library I'm using. In my view, it's not very reliable and is likely a result of the multi tasking RPi trying to talk using a bit-bang serial interface. My thought for the future is to not use the RPi to read it and use an Arduino connected to the RPi through some interface. |
I have several Pis reading ds18b20 in production systems that have run without issue for years. There's likely something about the setup of your systems that cause them to fail. |
I received the new Raspberry Pi and the sensors worked right away. It was my raspberry pi all along. Not sure it can be fixed…
We can close this ticket as resolved
|
After a few days of without any issues, I had this behavior overnight. For 3 hours the temp sensor was gone and the EC/PH measurements were erratic/noisy. Even after the temperature sensor coming back online by itself, the measurements were fairly jumpy. At around 8:40 AM I performed a reboot of the raspberry pi and the measurements stabilized again. Not sure what could be causing this issue? Maybe a surge or drop in the wall outlet? I am running the 15 W Raspberry Pi power supply, and measure ~7 W usage with a power meter. |
Is the power to the water sensors isolated? |
The power to the sensor is coming from the 3.3v or 5v pin of the raspberry pi. Do you recommend using a separate power source for it? |
There are almost always some type of electrical issue when you use pH and EC sensors without isolated power sources. It would certainly be something I would test. |
For the pH and EC sensors, I am using an analog signal isolator in between them and the raspberry pi. Not sure if there is anything like that for the 1-wire. I could try to get an isolated external power supply for them |
Your DS sensor is submerged? |
Yes it is. Same reservoir as the pH and EC |
Do any erratic measurements cease when you remove any sensor or combination of sensors from the fluid? |
Describe the problem/bug
DS18B20 Temperature sensor stopped working overnight and got stuck at 0C. Config page for w1thermsensor shows two "00-00000000." device ID
Tried a config page for OW-Shell and device ID shows 2 different unique IDs
The input with ow-shell library provides erratic measurements ranging from 0C to 96C jumping all around.
I bought a new sensor (both from adafruit) and same behavior happens with brand new sensor. Sensors are installed with 4.7k pullup resistor between signal and VCC.
Versions:
Screenshots
Additional context
Logs show:
2024-08-23 23:40:33,446 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:40:36,663 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Initialization errored 3 times; giving up. Maybe the following traceback can help diagnose the issue.
Traceback (most recent call last):
File "/var/mycodo-root/mycodo/abstract_base_controller.py", line 57, in try_initialize
self.initialize()
File "/home/mfittipaldi/Mycodo/mycodo/inputs/ds18s20.py", line 98, in initialize
self.sensor = W1ThermSensor(
^^^^^^^^^^^^^^
File "/var/mycodo-root/env/lib/python3.11/site-packages/w1thermsensor/core.py", line 154, in init
raise NoSensorFoundError(
w1thermsensor.errors.NoSensorFoundError:
Could not find sensor of type DS18S20 with id 2e0000000000
Please check cabling and check your /boot/config.txt for
dtoverlay=w1-gpio
2024-08-23 23:40:36,664 - DEBUG - mycodo.controllers.controller_input_f2982e8f - get_measurement() found
2024-08-23 23:40:36,665 - DEBUG - mycodo.controllers.controller_input_f2982e8f - listener() not found
2024-08-23 23:40:36,665 - INFO - mycodo.controllers.controller_input_f2982e8f - Activated in 10172.7 ms
2024-08-23 23:40:36,665 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:40:41,669 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:40:48,471 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:40:56,683 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:40:56,683 - ERROR - mycodo.controllers.controller_input_f2982e8f - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
2024-08-23 23:41:03,487 - ERROR - mycodo.inputs.ds18s20_f2982e8f - Error 101: Device not set up. See https://kizniche.github.io/Mycodo/Error-Codes#error-101 for more info.
2024-08-23 23:41:03,487 - ERROR - mycodo.controllers.controller_input_f2982e8f - StopIteration raised 3 times. Possibly could not read input. Ensure it's connected properly and detected.
The text was updated successfully, but these errors were encountered: