Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

DS18B20 - strange issues

2 posters

Go down  Message [Page 1 of 1]

1DS18B20 - strange issues Empty DS18B20 - strange issues Wed Jun 15, 2022 7:23 pm

n3645



I had a bit of time to test current version in repository (rev 1248, your implementation). It act a bit weir...

My example with 6 sensors (it is in dev. thread) and example with OneWire lib. Instead of 6, it detects 30 sensors and temp. reading is often wrong. Some errors with timing are also present in the log...

DalasTemperature library example also doesn't work correctly.

Something is quite problematic here, perhaps project file is messed up?
Or something missing in the code?

All related with multiple sensors present.

Perhaps also to remove some notes in the log, as "sent byte" and similar, as that make a problem to spot important note if there is more than one sensor...

With my last DS18B20 code, all seems to work as should be.

2DS18B20 - strange issues Empty Re: DS18B20 - strange issues Wed Jun 15, 2022 10:37 pm

arcachofo

arcachofo

Ok, I will have a look.

3DS18B20 - strange issues Empty Re: DS18B20 - strange issues Sun Jun 19, 2022 1:22 pm

n3645



Since rev 1260, sensors enumeration seems to be fixed.
However, reading temp. is still weird. For each sensor, no matter what is there it shows 127.9375 C, With DallasTemperature library, all seems to be fine.

Probably timing issue...

4DS18B20 - strange issues Empty Re: DS18B20 - strange issues Sun Jun 19, 2022 10:37 pm

arcachofo

arcachofo

Probably timing issue...
Yes, there are still some issues there.

5DS18B20 - strange issues Empty Re: DS18B20 - strange issues Mon Jun 20, 2022 8:48 am

arcachofo

arcachofo

I think there are still some problems apart from timing.

For example during SEARCH_ROM command, each device should ignore the rising edges, if not there are inreactions betwen devices.

"Since rev 1260, sensors enumeration seems to be fixed." because I returned to use a wrong timing:
I corrected the previous timing and SEARCH_ROM started to fail, allegedly because the interaction mentioned above.

But using the wrong timing can be causing problems somewhere else.
Now it is somehow working just by chance, and differences in procedures betwen libraries could make it to work or not work.

In conclusion:
1 wire protocol is a headhache.
Not as much as I2C, but not far.
The less wires a protocol uses the more of a headhache you will have with it.

6DS18B20 - strange issues Empty Re: DS18B20 - strange issues Mon Jun 20, 2022 9:01 am

n3645



I can't agree more, 1-Wire protocol is not simple at all, existence of clone sensors which works at some point close or worst to original, parasite and external power differences, numerous libs and direct approaches not quite well made...

However, my last version works fine with both libs (OneWire and DalasTemperature), because I have introduced timing rages. I have not yet tested deeply these examples communicates directly, avoiding any lib.  However, it is not enough to have one conditional value (less then or grater than), but need to be between the acceptable ranges, in order to accept these others implemented and which supposed to work (at some point) with real device.

Also, in the source of my version they are some notes what original real device accept, collected during initial tests. I will try to find a time to implement busy state during each command operation (as supposed to be) in my version and alarm search, parasite mode, double check all...

I will also make a soundcard oscilloscope I have mentioned recently, then I will double check all commands on multiple real sensors. And then you may rely on that as reference point for your official version.

7DS18B20 - strange issues Empty Re: DS18B20 - strange issues Mon Jun 20, 2022 9:35 am

arcachofo

arcachofo

I will try to find a time to implement busy state during each command operation (as supposed to be) in my version and alarm search,
That is already implemented.
Also copy Scratchpad, write Scratchpad, read Scratchpad and recallE2;

Btw: DS18B20_test 2022-06-01.zip doesn't contain the source code for Ds18b20.

8DS18B20 - strange issues Empty Re: DS18B20 - strange issues Mon Jun 20, 2022 9:37 am

n3645



No, the last DS18B20 source is one or two posts above. In that test archive are test files only.

9DS18B20 - strange issues Empty Re: DS18B20 - strange issues Mon Jun 20, 2022 3:25 pm

arcachofo

arcachofo

No, the last DS18B20 source is one or two posts above. In that test archive are test files only.
Ah ok I was not sure if I missed last version.

Fixed some timing issues a Rev 1268.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum