ds18s20 & crc errors

marco

New Member
Hi,
I'm using digitemp to get temperature readings from a few DS18S20s I bought recently.

I have a DS9097U plugged into a USB-Serial adapter. It is working fine.

I have gotten only one DS18S20 to work properly. I'm not sure if it's user error (I'm pretty new to soldering) or something wrong with the sensors.

The error I'm getting is "CRC Failed. CRC is 63 instead of 0x00". The exact command I'm running is digitemp -a -s /dev/ttyU0

I am attempting to wire everything up using some 2-port (RJ11/12) jacks I had laying around. Since phone cable does a crossover, I'm connecting the green cable of port "A" and the red cable of port "B" to GND on the DS18S20, and the red cable of port "A" and green cable of port "B" to DQ. This should be ok.

I've tried wiring them up directly to phone cable as well. Green cable to GND, red to DQ. Same error. With the sensor I do have working though, it worked fine on the phone cable.

Am I doing something noticeably wrong? Perhaps it's my soldering technique? Any tips for a newbie? =)

Thanks!
marco
 
Marco,

I'm not very familar with DigiTemp. Can you try the same thing with the OneWireViewer?

If one of them is working correctly then I don't think it would be a wiring problem. Also it shouldn't be a soldering problem if you don't have any solder bridges (solder across two pins) and you are not holding the soldering iron on the DS18S20 for too long.

Eric
 
Hi Eric,
Ok, I tried OneWireViewer

It is able to see the devices on the bus, but when I click the Temperature tab, it doesn't report back an accurate temperature (100 degrees C).

At the bottom, there is an error message:

Error reading device! java.lang.NullPointerException

I tried the box that works too, same java.lang.NPE ... hmm

I had someone check out my solder joints and they said they looked ok. They resoldered them just in case, and still no dice.

I've tried 5 sensors so far, and 4 exhibit the same CRC Failed ... error

The one sensor that is working I did clip the Vdd pin (#3) before realizing I needed it to mount it to the box securely. That shouldn't have any effect though because it's not wired to anything, right?

Thanks!
marco
 
Marco,

I think I may know the problem.

Are you running the sensors in a parasite mode (where they draw their power from the 1-Wire data line)? If so then the VDD pin should be tied to ground. The DS18S20 can operate strangely otherwise. I'm not sure if it would cause CRC errors but it could happen.

Eric
 
Hi Eric,
I am actually.

I just tried one soldered directly up to phone cable straight from the serial adapter and I got the same CRC error.

I will try your suggestion and post back.

I had been following instructions from http://ssli.ee.washington.edu/people/nomad/thermalcube/ which doesn't mention it ... but when I was looking into digitemp some more, the author has a quick guide and he does mention connecting Vdd to GND.

Thanks!
marco
 
Hi Eric,
No dice. =( I tried with both a little wire between Vdd and GND, and then just bending Vdd around to GND.

digitemp is able to see the sensor, but when I try read data from it, it gives me that CRC error again.

Non-working sensor:

$ sudo ./digitemp_DS9097U -w
DigiTemp v3.4.0 Copyright 1996-2005 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
..
Devices on the Main LAN
10564DC20008002A : DS1820/DS18S20/DS1920 Temperature Sensor
090138BC03000026 : DS2502/DS1982 1Kbit Add only memory

$ sudo ./digitemp_DS9097U -a
DigiTemp v3.4.0 Copyright 1996-2005 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
CRC Failed. CRC is 63 instead of 0x00
CRC Failed. CRC is 63 instead of 0x00
CRC Failed. CRC is 63 instead of 0x00

Working sensor:
$ sudo ./digitemp_DS9097U -w
DigiTemp v3.4.0 Copyright 1996-2005 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
..
Devices on the Main LAN
109C8CC80008008E : DS1820/DS18S20/DS1920 Temperature Sensor
090138BC03000026 : DS2502/DS1982 1Kbit Add only memory

$ sudo ./digitemp_DS9097U -a
DigiTemp v3.4.0 Copyright 1996-2005 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Nov 18 09:22:02 Sensor 0 C: 26.50 F: 79.70

So ... the non-working one is kind of working. It sees it's identifier (using -w), (as it does again with the working one) but when I try to read data (-a), it gives me the CRC error.

These were done hooked up straight to phone cable ... not in the little telco boxes, so it should have been fairly simple. Green phone cable to GND, Red cable to DQ. Vdd to GND.

Thanks!
marco
 
Back
Top