Identifying DS18x20 Sensor's with ROM Codes

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Identifying DS18x20 Sensor's with ROM Codes

Post 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.
the will to learn, should not be stopped by any price

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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
the will to learn, should not be stopped by any price

waligator
Posts: 36
Joined: Mon Mar 12, 2012 9:14 pm
Has thanked: 5 times
Been thanked: 7 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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.

waligator
Posts: 36
Joined: Mon Mar 12, 2012 9:14 pm
Has thanked: 5 times
Been thanked: 7 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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

User avatar
Bachman
Posts: 116
Joined: Sun Sep 07, 2014 11:37 am
Location: Hungary
Has thanked: 9 times
Been thanked: 53 times
Contact:

Re: Identifying DS18x20 Sensor's with ROM Codes

Post 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.

Post Reply