Hello,
I have problems with my 1-wire bus when I connect more than 1 ds18B20 sensor to one line.
The cable is shielded
the cable is 50cm long ( ) first bus and cable with 1 DA18B20 (like no problems) second bus and second cable with 2 DS18B20, and there i get with every second sensor a Checksum problem
i changed the resistors from 4,7K to 3,3K and 2,2K (nothing helps)
The Dallas sensors are all original MAXIM(Dallas) DS18B20 sensors
i try already with different Ds18B20 sensors (same same)
I configured 2 1-wire buses (everywhere the same problem)
I use an ESP32-S2-saola-1
I get the following output in the ESP log
[12:51:47][D][dallas.sensor:082]: Found sensors:
[12:51:47][D][dallas.sensor:084]: 0x3f00000df6546028
[12:51:47][D][dallas.sensor:084]: 0x3100000df746fa28
[12:51:47][C][dallas.sensor:089]: Device 'bigbox/ds18b20/uc_box_stepdown_temp'
[12:51:47][C][dallas.sensor:089]: Device Class: 'temperature'
[12:51:47][C][dallas.sensor:089]: State Class: 'measurement'
[12:51:47][C][dallas.sensor:089]: Unit of Measurement: 'Ā°C'
[12:51:47][C][dallas.sensor:089]: Accuracy Decimals: 1
[12:51:47][C][dallas.sensor:097]: Address: 0x3100000df746fa28
[12:51:47][C][dallas.sensor:098]: Resolution: 12
[12:51:47][C][dallas.sensor:089]: Device 'bigbox/ds18b20/uc_box_temp'
[12:51:47][C][dallas.sensor:089]: Device Class: 'temperature'
[12:51:47][C][dallas.sensor:089]: State Class: 'measurement'
[12:51:47][C][dallas.sensor:089]: Unit of Measurement: 'Ā°C'
[12:51:47][C][dallas.sensor:089]: Accuracy Decimals: 1
[12:51:47][C][dallas.sensor:097]: Address: 0x3f00000df6546028
[12:51:47][C][dallas.sensor:098]: Resolution: 12
[12:51:47][C][dallas.sensor:075]: DallasComponent:
[12:51:47][C][dallas.sensor:076]: Pin: GPIO4
[12:51:47][C][dallas.sensor:077]: Update Interval: 30.0s
[12:51:47][D][dallas.sensor:082]: Found sensors:
[12:51:47][D][dallas.sensor:084]: 0x1b00000df723ec28
[12:51:47][C][dallas.sensor:089]: Device 'bigbox/ds18b20/panel_1_temp'
[12:51:47][C][dallas.sensor:089]: Device Class: 'temperature'
[12:51:47][C][dallas.sensor:089]: State Class: 'measurement'
[12:51:47][C][dallas.sensor:089]: Unit of Measurement: 'Ā°C'
[12:51:47][C][dallas.sensor:089]: Accuracy Decimals: 1
[12:51:47][C][dallas.sensor:097]: Address: 0x1b00000df723ec28
[12:51:47][C][dallas.sensor:098]: Resolution: 12
[12:51:48][C][cd74hc4067:025]: CD74HC4067 Multiplexer:
[12:51:48][C][cd74hc4067:026]: S0 Pin: GPIO6
[12:51:48][C][cd74hc4067:027]: S1 Pin: GPIO7
[12:51:48][C][cd74hc4067:028]: S2 Pin: GPIO8
[12:51:48][C][cd74hc4067:029]: S3 Pin: GPIO9
[12:51:48][C][cd74hc4067:030]: switch delay: 2
[12:51:48][D][dallas.sensor:143]: 'bigbox/ds18b20/uc_box_stepdown_temp': Got Temperature=26.1Ā°C
[12:51:48][D][sensor:094]: 'bigbox/ds18b20/uc_box_stepdown_temp': Sending state 25.06250 Ā°C with 1 decimals of accuracy
**[12:51:48][W][dallas.sensor:261]: 'bigbox/ds18b20/uc_box_temp' - Scratch pad checksum invalid!**
**[12:51:48][D][sensor:094]: 'bigbox/ds18b20/uc_box_temp': Sending state nan Ā°C with 1 decimals of** accuracy
i found this website
and changed my code in dallas_component.cpp file. But that didnāt help either.
But Iām not sure if the compiler read this file again.
i changed the code-section
/config/esphome/.esphome/build/bigbox-lightcontroller/src/esphome/components/dallas/dallas_component.cpp
but some peoples have to use the ESP32 like me.
And i read a lot of bugās with the dallas-lib in esphome if anyone use the ESP32.
I not understood why the programmers have so much problems to fix this bug.
thousends of peoples use in her home or on any place the DS18B20 on a ESP32, iām sure nobody would like change it to any other board like ESP8266 or mnaybe to any Arduinoā¦ oooh i forgetā¦ why not change to a raspberry
I also like to have the latest updates.
I find it best to have a few āsacrificialā devices that have a bunch of sensors but not really doing anything to upgrade first. If they update fine then roll out the updates to working devices.
I am now also getting intermittent scratch pad errors, was working fine for 2 years, canāt pinpoint exact release where it started, but within the last 1 month.
Itās clearly not a great position to be in for the project as a whole, but you can always run older ESPHome firmware on the device if it does what you want. Itās not like internet-connected hardware that has to be kept up to date for security reasons.
No issues with five DS18B20s on a single wire here, but thatās on an ESP8266 that seems to not be affected.
My problem was solved by replacing the power supply for ESP 32. When working from the electrical network through the UPS and step-down DC-DC converter was constantly this error. After connecting the power from the charging for the phone, the problem completely disappeared.
Any further news on this. I have been gradually porting projects that have been running for years based on the Arduino IDE so I know the HW is good. As soon as I build using ESPHome then scratchpad errors stop the Dallas sensors workingā¦
I have the same issue with ESP8266. Iām using original (10x) and a (1x) clone ds18b2 sensors. All sensors report the same invalid scratchpad checksum!.
Commenting the InterruptLock Lock; lines in the read_scratch_pad() function didnāt help.
A possible workaround that works for me is to set each sensor on the string to a different resolution. As soon as I have two or more sensors with the same resolution those ones will report scratch pad errors.
I struggled to get some Wemos D1 mini clones working, turned out the onboard voltage regulator was poor quality. I powered the DS18B20 from a second regulator, added some 1uF Caps on in/out and started workingā¦The genuine WEMOS D1 devices do not have the same issue. However, all can generate scratchpad errors.
Iāll test that theory, maybe it is a hardware issue. I have some 8266 ESP12 modules lying around and some spare ESP32 modules. Iāll test them with a clean power source.
About a year ago, I spent literally weeks with the devs trying to solve this exact problem on some of my ESP32s. The problem goes away on certain devices (some c2/c3 variants) and manifests on others. To add to the complexity, it is sometimes intermittent.
@Ssieb and other devs toiled for days sending me new revs of the Dallas driver. I captured dozens of logic probe traces. Nothing we tried worked. So, basically I settled on the one ESP32 that works if I need Dallas sensors, the Wemos D1 ESP32 mini. Or the wemos D1 mini (esp8266). There are alternate Dallas libraries that can also be tried, but using those also had no effect.
This is a thorny problem for sure!
I just posted a question to the devs on Discord to see if any progress has been made
It is a bizarre problem, I have a LOLIN S2 mini with 5 Dallas sensors running my own code coded via Arduino IDE and the accompanying Dallas / 1-wire Library which works perfectly with zero issues, as soon as I load an ESPHome solution on the same device it has all sorts of scratchpad issues and devices not discovered reliablyā¦
Can I suggest that some notes are added to the ESPHome documentation stating that the Dallas sensors shouldnāt be used for new designs as people are still assuming this is a working solution and then spending days trying to debug and yet there isnāt a single note anywhere in the ESPHome documentation, which in my mind is the biggest failing of the ESPHome, tell your users!!!
The Dev had me run a simple Arduino sketch and it also worked perfectly, and that was in all the chips that had problems. So itās definitely in the ESPHome libraries.
Iām just an end userā¦ itās not my call on what the docs say.
Someone will probably need to send the developer a failing chip with a sensor. Then they can reproduce it and fix it. Short of that I donāt see this problem going away onits own. Remote diagnosing this kind of nasty problem is next to impossibleā¦
Any volunteers willing to step up and send a Dev a chip and a sensor? Iām sure heād send it back once he figures the problem out. Iām asking where he lives. I only use D1 Mini ESP32s any longer. I moved away from all the other variants. Too many strange issues to chase.
Iāll sweeten the deal here in the quest to further our hobby and get this problem fixed once and for all. If someone volunteers a chip and a couple sensors that fail with āchecksum errorā and it does it consistently, I will pay for the postage to send the chip and sensors both to the Dev and back again to you once he fixes the problem. He lives in Canada.
Message me here or email me Jeff at modeltstarters.com. Iāll send you a postage paid label to the Dev and send you a copy of the label heāll use to send it back to you. Iāve got untold hours already invested here, whatās a little more in postage?