Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS18B20 Sensor Failure / Dual Backup System

Status
Not open for further replies.

Wp100

Well-Known Member
Hi All,

Looking for some ideas and methods to program a safety trap for the DS18B20 temp sensors.

Have had a one sensor test system running for a while but do not know how the 18B20 typically fails, do they just stop or start to return incorrect temp values ? -must assume it could be either.

In my new Pic 18F4520 controller / Assembler , it will be used to control the winter temperature of an orchid greenhouse, so sensor failure could be very costly. ( it already has an 433mhz system sending temps, humidity and alarms back to the main house )

I thought if I used two sensors, but each on its own i/o port, then I could provide automatic failure detection and correction.

While a totally non functioning sensor can be readily detected, I’m bit lost as to how best to establish which of the two temp sensor readings would be the correct one.
( the 433 receiver is programmed to alarm should it not receive correct data / 4520 failure etc )

I'm currently sampling the temp every minute to control the heater to a temp of 15 deg C, but can see that more frequent sampling will be needed.

It would seem some method of comparing the new readings against each other and their previous readings, but if one sensor is slowly going out , unlike a sudden 10 degree shift, then the more I think about it, trends and so forth, the more I’m confusing myself - any guidance would be appreciated.
 
I suggest putting two sensors on each one wire bus. If one bus dies you still have two working sensors on the other. If any one or two sensors fail you still have the security of two working sensor.

That may seem excessive but you might place the sensors at different locations in the greenhouse to ensure no part gets too cold. They will not be exactly the same as if placed together but I think you could work that out.

For about 3 years I run a system with 4 18B20's: Outside, Greenhouse, Garage, Pond water.

Regarding failure. They either work or not. I did get one that was off ten degrees from the factory. I have not seen them drift but neither do they agree exactly. I think all my failures have been due to wiring problems.

On my system I occasionally got values that were way wrong aka fliers. I read each sensor several times and rejected the fliers to determine the true value. But my one wire wiring was on the skunky side.

The last time I used the system was about 2 years ago.
 
Hi 3V0,

Thanks for your reply and interesting to hear your experiences of that sensor and will take on board your wiring problems, though I'm only talking about a few yards at most.

Even with the old NTC sensors I do not rely on just one reading but do a good few and create an average so any glitch in a reading cannot adversley affect things.
 
If you are interested I kept a blog at that time.

I put the controller in the garage that was a few feet away from the greenhouse. I was worried about the humidity in the greenhouse. The controller was a hand wired WX175 PIC based weather station from Peter Anderson. He has since discontinued it.

After 2 years of use the wife wants a "better" greenhouse. This one is currently used for storage.

I am slowly working on a more comprehensive distributed monitoring and control system. The plan is to continue using 1 wire sensors.
 
Hi ,

Thanks for the link to your blog - interesting - thankfully we don't get hail like that over here ! - well, not yet anyway !!

You might be interested in this little one wire device, I have a couple but found about 10% humidity variance between them - not very accurate on the temp either as you can see.
**broken link removed**
 

Attachments

  • temp.jpg
    temp.jpg
    48.3 KB · Views: 229
Status
Not open for further replies.

Latest threads

Back
Top