DS18B20 Are they susceptible to electrical noise?

whiteoaks7

New Member
I've been using LM35 sensors into the ADC but despite all the recommended filtering and screened leads they remain very flaky in an electrically noisy environment like my boat's engine compartment. So bad are they that I've converted to NTC thermistors in frustration but their non-linearity is problematic. Hence my question - are DS18B20s robust in this sense? Anyone had any problems?
 

BeanieBots

Moderator
They are certainly far more tollerant to noise than an LM35 but it will still depend on cable length and run.
You can decrease the pullup resistor value to help improve the tollerance.
 

westaust55

Moderator
Personally I have had no problems and experimented with 5 DS18B20's as a 1-Wire network on the end of both 40 metres of shielded 2 core audio cable and also with 100 metres for CAT5 cable using an X1 part and the 1-Wire network commands.

Have a read of this thread: http://www.picaxeforum.co.uk/showthread.php?3802-DS18B20-and-noise.

Points to think about:
1. Use a separately powered supply to the DS18B20's not parasitic mode
2. screened cable increases the capacitance on the signal line - better to use twisted pair and with CAT5 for example leave spare cores unearthed.
3. Use a smaller pull up resistor on the data line for longer cable lengths.
 

geoff07

Senior Member
I used a number of sensors when measuring for a solar pump controller. They each have a local Picaxe08M and the picaxes report by sending a serial message every few seconds which interrupts the master controller. This has worked well for several years now with no noticeable problems. The link is twin core plus screen cable, max distance maybe 20m, with power sent up the cable. I did this to avoid any issues with noise or capacitance, though I didn't try the sensor without the local picaxe. The direct approach may well work but this method certainly works well.

As you are measuring temperature, the sensor can be on the inside of a metal box and be totally shielded. My roof panel sensor+picaxe pcb is inside a short length of 15mm copper water pipe with an end-stop soldered on, and thermal grease between the sensor and the pipe, with the cable exiting through a tight grommet and quantities of sealant, the whole thing embedded in the panel.
 

Captain Haddock

Senior Member
I have 5 DS18B20's in the engine bay of my boat all on a one wire network, one on each cooling system and one on each oil filter plus one for ambient temp clinging on to peugeot diesels, they have been fine for nearly a year now with a good few miles clocked up on both inland and sea, no reading or network problems, occaisionally my lcd screen will go pear shaped when using the autostart bit but no problem started on the keys.
EDIT: Of course if you have petrol engines it may be a different story from the ignition system.
 
Top