Bad readings from DS18B20 temperature sensors

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: Bad readings from DS18B20 temperature sensors

Post by john444 »

Wap,
wapcaplet wrote:As far as I can see, it's equivalent to your schematic,
This may (or may not) be the source of the problem.
The difference is your schematic has a length of wire common to the motor & sensor circuit.
This is the stretch of wire from where the batt (-) connects to GND and the FET source connects to GND.
wapcaplet wrote:measured about 0.1V when Pin8 was off.
I had to think about this for a minute.
With the gate of the FET @ 0-v, the resistance from S to D should be many Meg-ohm. If your meter
has an input resistance of 10M-ohm (typical) then you have a voltage divider with the FET being 1,000M-ohm.
Just to check, put a 100K or 1M resistor across your multi-meter leads and see if the voltage indicated by the meter drops.
wapcaplet wrote:I understand (correctly, I hope) that they need a common ground so that (a) the Gate voltage is relative to Source (to turn on the FET)
You are correct. We just do not want current to the motor be be in the GND ckt wiring to the sensors.

I see your photo and will check out the 'Wing Shield' that you are using and see if I can spot a possible issue.

Later, John

User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: Bad readings from DS18B20 temperature sensors

Post by john444 »

Wap,

Ok, I see from the board layout that the sensors are not in the motor circuit.
That means that I am mistaken. Motor noise on the GND is probably not the problem.

I recognize no issues with the bullet points except for #5.
wapcaplet wrote:The 1N4001 diode is reverse-biased across the pump terminals
If it is at all possible, solder this diode directly onto the motor terminals.
Otherwise, the entire length of motor wiring radiates motor noise.
Also, a 0.1-uF cap in parallel with the diode would not hurt.

Do the temp-sensor leads run in parallel with the motor leads?
That would not be good. Keep them as far apart as possible.

Before I offer more suggestions, try the diode & cap on the motor.

Good Luck, John

wapcaplet
 
Posts: 9
Joined: Fri Jun 15, 2012 5:30 pm

Re: Bad readings from DS18B20 temperature sensors

Post by wapcaplet »

With the gate of the FET @ 0-v, the resistance from S to D should be many Meg-ohm. If your meter has an input resistance of 10M-ohm (typical) then you have a voltage divider with the FET being 1,000M-ohm. Just to check, put a 100K or 1M resistor across your multi-meter leads and see if the voltage indicated by the meter drops.
I had to think about this for a minute too. I think I follow what you're saying. However, this may also have been an artifact of my bench/breadboard test. Last night I was testing a bunch of desoldered/recycled resistors and was puzzled about why my 100ohm to 1K resistors were measuring correctly on my multimeter, but my 220K resistors were consistently measuring as 120K to 140K. Then I realized it was because I was holding the leads with my fingers--looks like my skin has about a 250K resistance. Pressing the leads against my desk, I got much more accurate readings. Seems obvious in retrospect, but just goes to show that I'm still learning :-)
If it is at all possible, solder this diode directly onto the motor terminals. Otherwise, the entire length of motor wiring radiates motor noise. Also, a 0.1-uF cap in parallel with the diode would not hurt.
Easy enough; I have extra diodes, so I'll give that a try. I guess it'd be OK to leave in the diode that's already on the circuit board, to catch any stray electrons coming back up the wire?
Do the temp-sensor leads run in parallel with the motor leads? That would not be good. Keep them as far apart as possible.
They do, actually, at least for the first 5 or 6 feet. I hadn't really thought about that; the 12V running along the pump supply could be inducing some irregularities in the sensor wires.

Thanks for all the tips; I'll keep you posted. Meanwhile, the FET circuit is doing its job, despite the occasional flaky reading (and the LCD is working out great for monitoring it).

User avatar
john444
 
Posts: 443
Joined: Sun Mar 04, 2012 2:42 pm

Re: Bad readings from DS18B20 temperature sensors

Post by john444 »

wapcaplet wrote:it'd be OK to leave in the diode that's already on the circuit board
You are right, won't hurt to leave it in place.

I am very curous to find out if putting the diode on the motor eleminates the bad sensor readings.

Good Luck, John

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”