danjperron / BitBangingDS18B20

Method to access the DS18B20 sensor using Rapsberry Pi GPIO
41 stars 29 forks source link

Parasitic mode #11

Closed ruberyguy closed 9 months ago

ruberyguy commented 5 years ago

I have a solar heating project where I'm migrating to using a raspberry pi to control the pump. However, issues with the 1 wire temperature sensors are causing the built in drivers to lock up. As the system must work to prevent overheating this is of some concern. The only solution I can find is to power off the pi for a minute which seems to suggest a problem with the 1w devices. This power off can be automated by powering the devices off by using GPIO which seems to work.

So I decided to use your driver as I have more control of the issue and may be able to get to the bottom of the issue.

As an alternative I was contemplating running the devices in parasitic mode which would also enable me to power them off simply by programming the GPIO.

So to my question: Running DS18B20Scan against a device in parasitic mode allows me to see the one device but the temperature is always 85. Two devices prevents both devices from working.

Obviously as it almost works it seems like a timing issue(?) but extending the wait time for conversion is of no help. Any other ideas? I realise parasitic mode is not recommend but it would be nice to try it. The pin GPIO is pulled up.

danjperron commented 5 years ago

What is your PI model?

You are the second one with timing issue! I will need to revisit the timing with the new OS since I code the system to be compatible with the Max31850 also. I did the code before the Pi3 was available.

How long is your cable? The 1 wire has problem with long cable when the capacitance of the wire and gauge of the wire start to be an issue. I prefer using my MultiIO module when the length start to be an issue since it is RS-485. https://github.com/danjperron/PIC_MULTI_10_IO

ruberyguy commented 5 years ago

This is all on a breadboard so only about 10 cm. I just wondered if you had tested devices in Parasitic mode. I've changed the -t parameter but this did not help. I have another Pi so doing my testing on my desk to make sure it all works before I change the one controlling my solar panels.

ruberyguy commented 5 years ago

Forgot, its a Pi3

danjperron commented 9 months ago

Got new code for Pi5. CLose old issue