Pages: [1]   Go Down
Author Topic: DS18B20 Temperature Sensor: What am I missing?  (Read 536 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just bought this Thermometer from Sparkfun:
http://www.sparkfun.com/commerce/product_info.php?products_id=245

Installed on my Arduino and tried to run the OneWire example:

http://www.arduino.cc/playground/Learning/OneWire

But all I get is CRC error and no temperature readings..
What am I missing here??  :-?

The sensor is correctly wired to the Arduino: VCC to 5V, GND to GND and DG to pin 10 (and I tried Analog 0 too with same results)
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1643
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

a 4.7k pull-up resistor must be connected to the 1-wire bus.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 572
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The sensor is correctly wired to the Arduino: VCC to 5V, GND to GND and DG to pin 10 (and I tried Analog 0 too with same results)

Not quite sorry...


pwillard has it:
Quote
a 4.7k pull-up resistor must be connected to the 1-wire bus.
Although the arduino playground page implies you only need the 4.7k resistor in parasite mode (which you are not using), it needs to be there in the direct-power mode too.

« Last Edit: August 07, 2009, 12:33:54 am by trialex » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ran into this same problem after updating my Arduino dev environment from 0010 to 0016.  The onewire sample program ran in the 0010 version, but generated crc errors in 0016.  

To fix the problem, I deleted onewire.o from the 0016 hardware/libraries/onewire directory, then restarted the arduino dev environment.  That forces a recompile of the .ccp file which creates a new object file that works in 0016.  Hope this helps.
Logged

Pages: [1]   Go Up
Jump to: