Page 1 of 1

Identifying DS18x20 Sensor's with ROM Codes

Posted: Mon Mar 18, 2013 9:14 pm
by Jordy101091
In a project that i'm doing I need to monitor 8 temperature sensors attached to 8 heatsinks.
In flowcode I'm able to read the rom code of one DS18S20 sensor, the only problem i'm facing is when I connect 8 DS18S20 devices, How do I know
which rom code belongs to a curtain device.

I could connected one sensor at a time, and register there rom code but there must be another way of doing this.
I hope somebody can and want to help me with this.

regards Jordy.

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Mon Mar 18, 2013 9:24 pm
by kersing
Jordy,

After connecting the sensors you could use something hot/cool to heat/cool the sensors one by one. Read the temperatures of all sensors, the one with the highest/lowest value should be the one you're targetting. There is no 1-wire way of distinguishing the sensors if they are all connected to the same bus. (You could get the address of each sensor before wiring them into you circuit, but that would probably be too easy? ;) )

Regards,

Jac

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Mon Mar 18, 2013 9:49 pm
by Jordy101091
I can make a small test app where you can plug-in a sensor and read back the romcode. and that you would know which sensor is connected to what heatsink.
I just tought maybe some smartpants has figured out a type of system that would let you do this when the whole system is wired up.

I will let you know what the progress is.

Thanks for your quick reply,
Regards Jordy

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Thu Mar 18, 2021 3:24 pm
by waligator
Hello,
Sorry to pull out an old post but I am facing the same problem.

How to interrogate a DS18B20 probe on several connected according to its ROM address? (I know in advance the ROM address of my probes) It's still more professional than heating each probe to find out which is which!

I searched and searched on the forum but found nothing :roll:

Thanks for your help

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Thu Mar 18, 2021 8:17 pm
by Bachman
If you're smart enough, you can do it: https://www.maximintegrated.com/en/desi ... 1/187.html Please don't ask me anything about it, i don't understand how it's working (my primary language is not english)...

Maybe the GetDeviceCount will help, but test it before using.

Other solutions:
A: use an analog multiplexer. You have to use 1 x OneWire component and some more legs (three, to count from 0 to 7) to control the multiplexer.
B: one sensor = one controller leg. You have to use 8 x OneWire component and 8 chip legs. In this case, you'll need much more RAM and ROM in the controller.

pro: If you replace a sensor, the different ROM code will not affect the system because you're not using it.
con: You will need multiple cables, more resources from the microcontroller.

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Fri Mar 19, 2021 3:59 pm
by waligator
Thanks Bachman,

English is not my main language either, but as you said, if you are smart enough, there is Google translator :mrgreen: .

I am very familiar with this component but the GetDeviceCount function does not work the way I want it to. In fact the Match ROM function (55h) is missing.

Yes, if I change the probe and the ROM code changes, after a scan, the order can be changed. But that's not what I talked about. What I am saying is that I want to query by ROM code only the chip that matches.

But anyway, I found a trick (I'm smart enough :lol: ) to control the chips according to their place in the array.

Steve

Re: Identifying DS18x20 Sensor's with ROM Codes

Posted: Fri Mar 19, 2021 8:39 pm
by Bachman
If you know the ROM codes, there is no problem:

bus reset
match ROM
[send ROM code]
convert
...

The original problem:
I could connected one sensor at a time, and register there rom code but there must be another way of doing this.