Go Down

Topic: DS18B20 Temperature Sensor: What am I missing? (Read 583 times) previous topic - next topic

Alex_Venom

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)

pwillard

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

trialex

#2
Aug 07, 2009, 07:33 am Last Edit: Aug 07, 2009, 07:33 am by trialex Reason: 1
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.


tharperidaho

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.

Go Up