Hello,
I'm new to Arduino and electronics too, so that might be a stupid question... but let's go:
I connected to my Aduino this termometer: http://www.dx.com/p/ds18b20-waterproof-digital-temperature-probe-black-silver-204290
The thing is, I cannot get a stable temperature. I read from the termometer each 5 seconds, and in each reading it gaves me values between 8 and 30 (I assume it is in Celsius? I don't really know...). I put it in hot water, it goes to 120~130 and start to fall down, with a variation of aproximatelly 6 (for example: 128-125-130-124-120-114-108-106-110-...) as the water goes cold.
But I think this readings are wrong (how it indicates 130ºC for a hot water?).
This is why I come to you. I simply connected the VCC cable in "5V", the ground cable in "GND" and the data cable in "A0". What I don't know is, should I have connected resistor or anything else (remember: I'm new to electronics
) between the termometer and the arduino? Or is the termometer broken?
Very thank you!
I HAVE NEWS FLASH FOR YOU .......ARE YOU LISTENING ?
PAY ATTENTION .
THE TEMP SENSOR YOU ARE USING IS NOT ANALOG ! IT IS A ONEWIRE DIGITAL SENSOR WITH A 64-BIT LASERED ID CODE AND 16-BIT PRECISION THROUGH A SERIAL INTERFACE THAT CAN ACTUALLY WORK WITHOUT VCC ! (It's called parasitic power, but don't try it just yet. )
Also, it requires a 4.7k ohm pullup resistor to +5V on the yellow data wire. Also, the attached sketch has the temp sensor configured for arduino pin D10 OneWire ds(10); // on pin 10 (a 4.7K resistor is necessary) so if you want to use one of the other DIGITAL (YES DIGITAL NOT ANALOG) pins be sure to change it.
NEXT TIME READ THE DATASHEET BEFORE YOU START PLUGGING STUFF IN.
(That goodness it was a premade cable with red and blk color coded power leads and not a TO-92 package..)
READ THIS !
http://playground.arduino.cc/Learning/OneWire
The attached sketch won't work until you install the library and that's where it came from.
DS18B20_Temperature_serial_ok.ino (2.96 KB)
OK, now I know I have been doing shit :~
I will look the links you both have posted. Thank you.
Looking is not going to get you anywhere. (you may learn something though) .
Nothing is going to happen until you install the ONEWIRE library I linked.