-
Notifications
You must be signed in to change notification settings - Fork 8
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
The DS18B20 sensors disconnects after some time. #11
Comments
Hello, It seems like the 1Wire bus is stuck. best regards Rikkert-RS |
Hello @mcfrojd Is the problem still existent? |
Hi Rikkert I do have an issue related to this I have one sensor absolutely fine 5mrt long 4.7k resistor the two new ones have disconnected any advise wires are good to me thanks |
Hello, This is most likely not due to the driver itself but rather the cable length/type or the wiring of the sensors. |
Am sorry am lazy I just gone and checked the connections soldered them and heat shrunk and all ok was using WAGO connectors too “heavy” on the thin wires |
@Rikkert-RS they just disconnected again but weirdly it’s just the two new ones any advise ? |
Hello i can only help if you send a sketch of your wiring / length / cabletyp and the type of sensors |
OK the topology is like line with star at the end. |
Twisted cables are mandatory for 1 Wire! |
The standard cable it came with I obviously don’t know the wire size of that. I think it’s the thinner wire of the two additional ones as it’s thinner and the original one still works. but it’s not run with any power cables |
Some 1Wire Guidelines: Connection example with 5V for Raspi but Attention, all pins are only 3,3V tolerant!!! |
I think the problem is that the extension cable is not twisted or the sensor power supply at the end is bad because of the voltage drop (thin wire gauge). Network cable e.g. cat5 is very suitable |
ok, that's good. Your Setup is ok, but i think your extension cable is not good enough If the driver says that the sensor is not connected but others are still there then it is due to the signal quality and this depends on the cable and wiring. Can you swap the 4m cable for a better one? Network cable Cat5 or better. The cable must be good and not too thin since we only operate the sensor with 3.3V |
So that’s what I’ll do I’ll order one now |
I have the same issue. I mine is connected directly to the Pi without any extensions on the cable. The disconnect is random. Sometimes it will be hours, other times it will be days. The main issue is that you have to shut down and remove power from the Pi to get the sensor back. |
I have the same. I have 5 connected directly at the pi now and they are doing the same except one, my first one I purchased. It’s got a flat bottom rather than round, I have purchased from multiple sellers to try eliminating “cheap” ones |
Hello everyone, So I can't reproduce the error on my side at the moment. To get the log file you need to login with SSH to your Venus OS
Have you already switched to the other cable? If I can make it today, I will test a 50 meter network cable today. I will connect 2 or 3 sensors to the end of the cable for testing. |
I’ll power off and on then wait for it to disconnect and log it today I decided to put the sensors close to the pi and eliminate the “extension” I purchased a few more to eliminate “cheap” sensors I currently have 7 sensors I have all the ground wires split up into different GND pins will log what goes down first one thing I have noticed is in VRM once it disconnects the device shows as “last seen” just minutes ago the entire time but no temp is recorded if i reboot not power down it then shows as last seen xx hours ago if i power cycle everything reappears I must admit I still think cheap sensors as my original first 5m sensor never disconnects Quick log before i power cycle and test again
|
OK first of all nothing unusual in your log file the error at the start with the "settings" is normal there must be a waiting loop because the Venus OS settings service is not yet ready after a reboot. Everything looks ok. The sensors are disconnected because, for example, the path /sys/devices/w1_bus_master1/28-022010ed82ae of the sensor on the 1Wire bus is no longer available. So currently no problem with the "VenusOS-TemperatureService" driver. We now have to see what the 1Wire service itself is doing or why it is taking the sensors off the bus. Can you check via SSH when the sensors are gone again if the appropriate folder of the sensor also gone in the folder /sys/devices/w1_bus_master1/28-XXXX ? |
i agree i dont think its the driver as one of them never disconnects but i just cannot narrow it down and honestly am quite good with electronics |
4 just disconnected
|
Yes, I would also like my service to run well, and I would also like to know why it is not working so that I can set up a small wiki for the FAQ and small tips in the future. |
just edited the above my friend the folders have gone also |
OK can you run the command: "dmesg" on ssh |
yes i can
|
OK the log is directly after the restart. As you can see, the 1Wire sensors are attached. You have to do this again if the sensors lose the connection again. After 7.481933 seconds: -> w1_master_driver w1_bus_master1: Attaching one wire slave 28.3ce1e38061b1 crc a4 I just saw that you are using GPIO 18 for the 1Wire. Maybe there is interference with other drivers on the pin. Can you connect it to pin 4 or 26 for testing purposes? |
Sure can will do gpio 4 now - testing… |
Tested on gpio4 and disconnect again I have three remaining 4 folders in the devices have been removed also |
Here you can see my 50m sensor ist still connected: There must be a problem with the cable or the wiring. Have a look under the link this is also a good description |
i tend to agree but all sensors are connect directly at the pi the 3 5m ones are still active and the 5 1m have disconnected the only way i could test further is cut the 5s down to 1m i feel if the 5m dont disconnect for 48hr ill just use theses 3 sensors lated a couple hours
i do apreacate the help you have provided |
@Sarah-1331 have you got a link for the ones that don't disconnect? I'd like to order some to try. |
Here is also some info about fake Sensors |
https://www.ebay.co.uk/itm/124433541502?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=sf_h7LceQnu&sssrc=4429486&ssuid=45bWpJJDSEe&var=&widget_ver=artemis&media=COPY I have purchased 1m from several sellers and all disconnected |
Confirm 3days with only the 5m sensors and all good so far it must be the cheap crap in the 1m’s |
Cool. Maybe they use larger CSA or better quality wire in the longer ones? Anything is possible with Chinese manufacturing. I'll get some 5m ones to try and will cut one down to 1m to see if it continues to work as expected. |
FWIW, I'm using pin 27. |
I cut one down to a meter and it never failed in any test I found changing gpio had no effect either |
With the temp sensor showing as 'Disconnected'.
|
Directly following a shutdown, power off and power on:
|
Based on that, I believe I have a clone. :(
|
I have this problem too, have ruled out software being the problem in discussion with Rikkert-RS on another forum. I think i need to get rid of that ripple on the top but otherwise the waveforms look good. |
Hello Bob, Very good, I read your post in the Victron forum today, but didn't have time to reply. There I would have asked if you also have a recording of the oscilloscope measurement. I also have an oscilloscope and would probably reconnect my test with the 50m Cat7 cable and also make a recording. I haven't had much time to continue here in the last few days. It's no longer really a problem with my driver. But I will leave the issue open until we have enough information to create a small wiki for a good hardware connection. Best regards |
Thanks Rikkert. |
I have ordered 3 of these... https://thepihut.com/products/ds18b20-one-wire-digital-temperature-sensor |
Quick update from me mine haven’t disconnected once since using the 5m ones |
Thanks Sarah. :-) |
Am unsure the SN but think it would be one of these numbers ??? TemperatureType /TemperatureType 1 |
Thanks Sarah. |
With reference to this- https://github.com/cpetrich/counterfeit_DS18B20 P.S. I've just found another suggestion that might help. it has pro's and con's though. |
Update- |
In my experience it’s cheap sensors buddy |
Hello In the 1Wire Bus, you should only use one pullup resistance on the data line near to the RPi Best regards |
Thank you for quick answers, guys! |
I am running a Raspberry Pi 3b+ with the latest release candidate v3.20~4.
( I have the same problem on my production system, a pi 4 with v3.01 )
VenusOS-TemperatureService version 0.5
Using two DS18B20 temperature sensors with a 4.7kohm resistor.
I have no trubbel setting them up and using them for a couple of days.
But after some time the two DS18B20 temperature sensors will end up disconnected.
And this is the only thing i find in the logs at /data/log/VenusOS-TemperatureService/current
The CPU temperature keeps connected.
Is there any way to find out why they get disconnected?
A reboot wount make them come back to life, instead they disappear.
Running setup with option "i" wount make them come back to life.
But if i disconnect the 3.3v pin and connect it again they will come back.
This is in the log after a reboot, running setup with the option "i" and the disconnect and reconnect the 3.3v pin
The text was updated successfully, but these errors were encountered: