Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

reading temperature takes a long time

The 1 Wire Pi Plus and 1 Wire Pi Zero are a 1 Wire interface for the Raspberry Pi

23 hours ago

Posted by:
opa-rudi

opa-rudi Avatar

I am using the 1 Wire Pi Plus HAT with w1 subsystem. Reading the temperature file in /sys/bus/w1/devices/28-.../temperature takes about 5 seconds. Also writing the file for setting the resolution takes very long. So I guess it is an I2C issue. I am using RPI5 with Bookworm. Does anybody have an idea where the problem could be?

report

20 hours ago

Posted by:
andrew

andrew Avatar

Hi

I have just tried setting up a clean installation of bookworm on a Pi 5 to test with the w1 subsystem. On my setup reading from a temperature sensor takes approximately 1 second in 12-bit mode and less than a second in 9-bit mode so I don't think it is an issue with the operating system or the w1 subsystem.

Do you have any other devices connected to the Raspberry Pi on the I2C bus that may be holding the bus open or any processes running in Linux that could be slowing it down?

If you have a spare SD card available it may be worth setting up a clean installation of Raspberry Pi OS to test with. That will let you know if the issue is hardware or software related.

If the problem persists on the new Raspberry Pi OS installation it could be a communication issue between the 1 Wire Pi Plus and the sensor. Try checking your wiring to make sure there are no bad connections and check that the wire does not run across any high voltage cables that could induce interference on the 1-Wire bus. Analog.com have a good article on creating reliable 1-Wire networks.

report

12 hours ago

Posted by:
opa-rudi

opa-rudi Avatar

I will check it. Thanks.

report

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout