Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:12 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : DS18B20 Maximite problem solved

Author Message
pcaffalldavis

Senior Member

Joined: 17/10/2011
Location: United States
Posts: 187
Posted: 06:03am 18 Feb 2019
Copy link to clipboard 
Print this post

I finally figured out why my DS18B20 sensors were giving inconsistent results.

I'm running on a Maximite CGMMStick1 using MMBasic 4.5

Some of you may recall I’m using a MM to run a wood-fired boiler. It has four temp sensors; boiler water temp; house temp; outdoor temp; and one spare temp circuit to swap in if one of the others fails for any reason.

Early in 2018 I upgraded from LM335’s to DS18B20 for greater precision. But with the DS18B20 sensors I was getting inconsistent temp readings of as much as 3 C or 5 F within most five minute periods. It was driving me nuts (short trip) as to how the results could vary so much in such short periods of time.

Beginning in September the program on the CGMMStick1’s started hanging. It didn’t matter which CGMMStick1 I used. It continued to get worse until it would hang about once a day.

During September and October I started to notice some video noise bands on one of four 7” video monitors I have placed around the house to monitor the boiler functions and temperatures. This video static and rolling dark and light bands only appeared on the monitor in the living area.

Finally on December 12, 2018 I had a CCTV Pan Tilt Zoom camera quit working. This is a completely unrelated system, not even in the same part of the house. The mains to 24 VDC power supply for that camera failed completely that day. The video static on that one boiler monitor cleared up and the MM program hangs ended.

I left that PTZ camera off line and put a 12 V static camera in its place that did not require the 24 V power supply (which failed and for which I still don’t have a replacement). And everything on the MM and the Basic program including the DS18B20 sensors all ran perfectly from Dec 12th until today.

About a month ago the 12 V 1500 mA power supply powering the 7” video monitor for the boiler in the living area stopped working. Today I finally got around to replacing it with a nice 12 V 2 Amp surplus computer power supply that I had. The 7” monitor was working again, but there was more video static and the rolling bands of graphic light and dark were back on only that one monitor. And two hours later the MM program hung reporting it was unable to get a reading from one of the DS18B20 sensors. This was a completely different power supply from the 24V one that had caused the problem two months ago.

So here is what I’ve learned: Power supplies can and do sometimes give off I’m guessing EMF interference that can and will interfere with a Maximite CGMMStick1 communicating with a DS18B20 temp sensor. And this EMF interference can be as far away from the MM, the sensors, and or the wiring to the sensors by as much as 30’ and still cause the sensor communication to fail and the MM program to hang. And, if you have a number of video monitors, the weakest one may also display video static and have rolling bands of light and darker graphics when a poor quality power supply is anywhere in the house. I had no idea these ‘desktop’ type of computer power supplies would or could give off so much EMF interference.

This was a long and hard learned lesson for me. Maybe it will save someone else pulling out a few strands of their own hair. Too late for me; most of mine is already gone.

I’m going to order a new 12 V 5 Amp power supply for the 7” monitor, and a new 24 V 5 Amp for the PTZ camera, and maybe I’ll get ones that don’t give off a lot of EMF noise. I hope so, and I hope this helps someone else too.




We're all here 'cause we're not all there.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:39am 18 Feb 2019
Copy link to clipboard 
Print this post

The joys of switch-mode power supplies.

Jim
VK7JH
MMedit
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 08:48am 18 Feb 2019
Copy link to clipboard 
Print this post

Hi pcaffalldavis,

Good to hear you sorted stuff out. I had a car USB adaptor that used to wipe out weaker FM signals. Most annoying. Some old PC power supplies were good at wiping out some of the AM band. I had of of those.

As a matter of interest, do you use 2 or 3 wire connections to the DS18B20's?

I just use 2 wire connections to my CMM to save wires & just lower the resistor value a bit for longer runs if necessary.

I know others use 3 wires but I was wondering if there are any differences in performance?

May try a 3 wire connection myself one day.

Brian

Edit. Forgot to mention I used LM335's for a while connected to a PICAXE via op-amps for gain & level shifting. Got 0.1deg resolution. The data was then forwarded onto the CMM via the serial port along with other data.

Did away with that system. Didn't really need that resolution Edited by Chopperp 2019-02-19
ChopperP
 
pcaffalldavis

Senior Member

Joined: 17/10/2011
Location: United States
Posts: 187
Posted: 03:10pm 18 Feb 2019
Copy link to clipboard 
Print this post

I used 2 wires for the DS18B20 sensors, and telephony wire and connectors, so no shielding but great connectivity.

I guess I should specify what I mean by computer type desktop power supplies. I mean the type that often come with laptop and tablet computers; like the one in the photo below. So how do I make sure I don't get more noisy ones with lots of EMF interference when I order a new 12 V 5 amp and a new 24 V 5 amp unit? Is there a better type power supply than switch-mode? Or is it just trial and error? How do I tell if the one in the picture is switch-mode?



used
We're all here 'cause we're not all there.
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 05:15pm 18 Feb 2019
Copy link to clipboard 
Print this post

Any power supply that specifies an input range of 100 to 240 v ac is undoubtedly a switcher. You probably need an old fashioned stepdown transformer, a full wave diode rectifier, a capacative input filter, a linear regulator, and a final capacative filter. It will be more expensive and a lot heavier. You might save a little if you build your own.

Paul in NY
 
pcaffalldavis

Senior Member

Joined: 17/10/2011
Location: United States
Posts: 187
Posted: 07:43pm 18 Feb 2019
Copy link to clipboard 
Print this post

Thank you Paul.

So are all switched power supplies EMF noisy? Are some worse than others? Is there a way to tell, other than trial and error? What kind of 12 volt power supply would I search for, say on Amazon, that is not a switcher?

Clearly my 24 V for the PTZ camera worked and slowly got noisier until it finally failed. Is that normal behavior for a switcher?

I'm not looking for several expensive bench power supplies. Is there some more moderately priced type I should be looking at? Or will I just be better off trying a few different low priced switcher types hit or miss until I find one or two that don't seem to give off too much EMF?

Peter
We're all here 'cause we're not all there.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:54pm 18 Feb 2019
Copy link to clipboard 
Print this post

Trial and error is one common way of finding a good one. Price can be a guide but not always.

They usually go bad when the capacitors in them start to dry out.

I use lots of clip on noise suppressors, both on the AC supply side and the DC output side. That helps confine the noise to the power supply. They should be placed as close as possible to the power supply.
I have also put them inside metal boxes with suppressors on the leads where they enter the box,but beware of overheating. That only hastens the capacitors drying out.

Grogster was investigating this recently.
https://www.thebackshed.com/forum/forum_posts.asp?TID=11125&PN=2

Jim
VK7JH
MMedit
 
pcaffalldavis

Senior Member

Joined: 17/10/2011
Location: United States
Posts: 187
Posted: 08:09pm 18 Feb 2019
Copy link to clipboard 
Print this post


Thanks Jim. Do you mean something like these?

https://www.amazon.com/Pieces-Suppressor-Ferrite-Diameter-Assortment/dp/B07L2QZJG4/ref=sr_1_sc_1?ie=UTF8&qid=1550520458& sr=8-1-spell&keywords=clip+on+noise+surpressor
We're all here 'cause we're not all there.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:11pm 18 Feb 2019
Copy link to clipboard 
Print this post

Yep,
that's the beasties.

VK7JH
MMedit
 
pcaffalldavis

Senior Member

Joined: 17/10/2011
Location: United States
Posts: 187
Posted: 08:23pm 18 Feb 2019
Copy link to clipboard 
Print this post

I'll get some. So one on each leg of AC, and one on each leg of DC (4 total)? Or one over both legs of AC and one over both legs of DC (2 total)?

I hesitate to ask this, but does size matter?

Peter
We're all here 'cause we're not all there.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025