This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 w resistor
#1
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,
Reply
#2
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.
Reply
#3
(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,
Reply
#4
GPIO4 (pin 7) is occupied by NMEA0183 1 TX

One option is GPIO16 (pin 36) right next to the SEATALK RX pin
Reply
#5
(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,
Reply
#6
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
Reply
#7
(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,
Reply
#8
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.
Reply
#9
(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,
Reply
#10
(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,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)