Eavsdropping DS18S20 protocol

mjy58

Member
I am trying to analyse an extremely intermittent fault on my Boilermate 2000 central heating system. It basically uses a micro-controller to control the pumps and receives input from 3 temperature sensors. I suspect one of the temperature sensors is faulty but very intermittent.

I have determined the temperature sensors are DS18S20 devices. Although they are actually encapsulated in a brass housing, they do respond to a readtemp12 command and provide the correct temperature when decoded.

There is one temperature sensor per pin on the CH controller (i.e. not multidrop one wire). Unfortunately I do not know the controller type, other than it is 40 pin.

What I would like to do is monitor the temperature sensor responses whilst in the live circuit. So the CH controller will be working as normal requesting temperatures from the DS18S20s and my AXE110 data-logger would eavesdrop on the conversation and record the data coming back from the sensor. I could then analyse this over time to find which if any sensors are giving bad data.

Does anyone have views if this is possible?

Malcolm
 

westaust55

Moderator
I have determined the temperature sensors are DS18S20 devices. Although they are actually encapsulated in a brass housing, they do respond to a readtemp12 command and provide the correct temperature when decoded.
Are you sure they are DS18S20 and not DS18B20 ?

From PICAXE Manual 2 for the READTEMP12 command:
Note the readtemp12 command does not work with the older DS1820 or DS18S20 as they have a different internal resolution.
This command is not designed to be used with parasitically powered DS18B20 sensors, the 5V pin of the sensor must be connected.
If you try the READOWSN command, what 8 byte values do you receive? That will narrow down the exact part numbers.
The DS18B20 has "family" code $28
The DS18S20 has "family" code $10
 

mjy58

Member
Are you sure they are DS18S20 and not DS18B20 ?

From PICAXE Manual 2 for the READTEMP12 command:


If you try the READOWSN command, what 8 byte values do you receive? That will narrow down the exact part numbers.
The DS18B20 has "family" code $28
The DS18S20 has "family" code $10
I didn't spot the readowsn command! It does return $10 as the family code. The DS18S20 does actually reflect the vintage of the CH controller (circa 2005). I noticed the comment regarding readtemp12 and the DS18S20, however it does seem to work if you use the register values from the DS18S20 datasheet to interpret the temperature.

Technical said:
http://www.saleae.com/logic/
will do this, and also analyise the 1-wire data automatically for you.
I wasn't aware of this device - it looks extremely good. But 129 Euros...
 

Dippy

Moderator
100quid versus how much for a callout?


Tip:
Get British Gas Homecare, suffer for a month, get it fixed, cancel policy. Cost? under £20 and a warranty on the repair.
 

mjy58

Member
That would be a good end point. The actual sensor is potted into brass sleeve and screwed into the water flow. So I would probably replace with the actual proprietary sensor (around £25). I would like to actually ascertain which is the faulty sensor first - if it in fact is the sensor. It could be the control board itself (around £200)

From what I have read the standard method of fault finding on these units by the 'Professionals' is to replace the parts. Which is easy to do and the customer pays.

I asked the original question to try and establish if there is a way of finding out where the actual fault is, rather than randomly replacing parts.

The fault is very intermittent but irritating.
 

MPep

Senior Member
Intermittent faults are ALWAYS a problem.
Pro's use this method to renew 1 part at a time. Unfortunately, they charge a callout fee every time. Eventually they do get there though.
 

mjy58

Member
I think I should have posted this enquiry without the background information:confused: I understand I will have to replace the parts of the CH system if they are faulty and will do this myself without needing assistance from plumbing/heating 'professionals'. However just replacing parts until the fault goes away means you have not actually diagnosed the problem.

I posted the thread to get feedback about the capability of PICAxe to eavsdrop on a one wire protocol where it is not the master. I thought the principle of the Axe110 datalogger sitting on the one wire bus logging the traffic for several days to highlight if there was any bad data was a good approach.

Perhaps Technical's reply:
Technical said:
http://www.saleae.com/logic/
will do this, and also analyise the 1-wire data automatically for you.

There is no way to easily share 1-wire data between two controllers.
says it all and there is no further discussion to have?
 

Dippy

Moderator
Well, it's a nice idea, but, as you say, Technical really answered it.
We all like to have a bit of banter here so don't take it too badly.
At leat the suggestions didn't get as far as making a temp sensor from cardboard and foil ;)


If, as you say you can read the sensors, then why not take them out and data log under various temperature conditions?
I haven't any clue (and only you do) how often this intermittent fault occurs, so the testing may take a while.
If you have several identical sensors can you swap them around to see if the behaviour changes?

While you are waiting maybe you could log the quality of the DC on the board and polish the terminals (I'm not joking).
As you say, eavesdropping (aka 'sniffing') doesn't sound like an easy (i.e. quick/no-cost) option so it looks like a long slog.
Good luck with it and let us know how you get on.

PS. I don't often defend the 'pros' esp after watching BBC Watchdog, but can you imagine how much this kind of diagnostics might cost versus a swapout? (especially when many so called pros have the same electronics experience as a daffodil). Anyway, sounds fun.
 

westaust55

Moderator
Believe your assumption is correct.

The PICAXE acts as a 1-Wire network master Using the inbuilt commands and cannot via the 1-Wire commands monitor the signals.

To try and create your own program, I believe PICAXE BASIC will likely be too slow even at higher clock speeds to monitor the data which uses time increments of differing lengths for reset, 1 and 0, etc.
 
Last edited:
Top