Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
2024-08-26, 12:12 PM
(This post was last modified: 2024-08-26, 12:26 PM by Lazzz.)
Ever since I upgraded to my Pi5 with MacArthur hat with OP4, my 1w DS18B2 sensors are spiking - each one at different times & either up or down.
Previously, with the Pi4 & OP3, no Macarthur hat & using the recommended 4.7kΩ resistor there was no spiking with the same sensors.
I notice that the MacArthur hat is using a 1.6k resistor & I am thinking this is the cause of the spiking - from my research: "Weak Pull-up Resistor: The DS18B20 sensor uses a 1-Wire protocol, which requires a pull-up resistor on the data line (typically 4.7kΩ). If this resistor is too high or too low, it could cause unstable readings. Double-check that the pull-up resistor is correctly rated and connected."
Would it be possible to add a 3k resistor between the VCC & Data terminals to bring it to 4.6k???????
Or, would it be best to connect the 1w to the GPIOs, (GPIO4 or GPIO19 for data) with the 4.7kΩ resistor as it was previously, bypassing the hat??
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Posts: 75
Threads: 1
Joined: Mar 2023
Reputation:
5
2024-08-26, 05:53 PM
(This post was last modified: 2024-08-26, 06:01 PM by Adrian.)
You are right, the value of resistor R28 is too low. It probably fell victim to some BOM optimization, but even then 3.3K would have been the more sensible pick.
That being said, hard to tell if the low resistor value is the cause of the errors you see, without trying a different resistor. Unfortunately, it's not possible to get a higher resistor value without removing R28 first. Ideally you'd use a hotair station, but you might be able to remove the resistor with a big blob of solder.
If you can't do that yourself, where are you located? US? Europe? Somewhere else?
Connecting to a different GPIO would also be a good way to test whether the errors go away with a different resistor value.
Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
(2024-08-26, 05:53 PM)Adrian Wrote: You are right, the value of resistor R28 is too low. It probably fell victim to some BOM optimization, but even then 3.3K would have been the more sensible pick.
That being said, hard to tell if the low resistor value is the cause of the errors you see, without trying a different resistor. Unfortunately, it's not possible to get a higher resistor value without removing R28 first. Ideally you'd use a hotair station, but you might be able to remove the resistor with a big blob of solder.
If you can't do that yourself, where are you located? US? Europe? Somewhere else?
Connecting to a different GPIO would also be a good way to test whether the errors go away with a different resistor value.
Thanks Adrian. I'm in Australia.
I'll try testing using a different GPIO.
Could I go back to GPIO4 & change back in the GPIO App??
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Posts: 75
Threads: 1
Joined: Mar 2023
Reputation:
5
GPIO4 (pin 7) is occupied by NMEA0183 1 TX
One option is GPIO16 (pin 36) right next to the SEATALK RX pin
Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
(2024-08-27, 05:53 AM)Adrian Wrote: GPIO4 (pin 7) is occupied by NMEA0183 1 TX
One option is GPIO16 (pin 36) right next to the SEATALK RX pin
OK, thanks Adrian.
I have all my GPIOs taken so I'll free up GPIO17 (pin 11) because that is the least needed!!
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Posts: 3,025
Threads: 63
Joined: Mar 2016
Reputation:
284
If I am not wrong we keep that resistor low to make it work using long cables.
MacArthur HAT pinout: https://macarthur-hat-documentation.read...inout.html
Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
(2024-09-01, 10:44 AM)Sailoog Wrote: If I am not wrong we keep that resistor low to make it work using long cables.
MacArthur HAT pinout: https://macarthur-hat-documentation.read...inout.html
My longest cable would only be 3mt long.
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Posts: 3,025
Threads: 63
Joined: Mar 2016
Reputation:
284
2024-09-01, 12:11 PM
(This post was last modified: 2024-09-01, 12:11 PM by Sailoog.)
In development tests it also worked with 1 meter and 10 meters cables. If you test it with another GPIO and a 4.7K ohm resistor we can compare the results.
Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
(2024-09-01, 12:11 PM)Sailoog Wrote: In development tests it also worked with 1 meter and 10 meters cables. If you test it with another GPIO and a 4.7K ohm resistor we can compare the results.
I'll do that as soon as I get a chance. Thank you.
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
Posts: 206
Threads: 45
Joined: Mar 2017
Reputation:
2
(2024-09-01, 12:11 PM)Sailoog Wrote: In development tests it also worked with 1 meter and 10 meters cables. If you test it with another GPIO and a 4.7K ohm resistor we can compare the results.
Just to be clear, the sensors work great, but there are some spikes in each sensor each day & these just upset my Node Red graphs. I could probably fix this with some code to ignore the spikes.
I'm in the process of completely re-wiring all my sensors!!
Pi5 8GB, NVME SSD 512GB, MacArthur hat, OP4,
|