Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I would really appreciate some advice on this. Being a TOTAL noob I have closely followed a guide on the internet explaining how to use a DS18b20 sensor with my Raspberry Pi. The guide is http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/temperature/ and has been fairly easy to follow.

I changed the raspi.list file to read "deb http://archive.raspberrypi.org/debian/ wheezy main untested" and then run apt-get update and apt-get upgrade. All that went without a hitch.

I then connected the DS18b20 to 3v, Ground and Data (gpio#4) connecting the data and 3v via a 4.7 ohm resistor.

I've then used the console to run;

sudo modprobe w1-gpio
sudo modprobe w1-therm
cd /sys/bus/w1/devices/

This all works fine. However, when type ls, the guide tells me that I should see the serial number of the sensor listed followed by w1_bus_master1.

All I actually get is w1_bus_master1 but no serial number. I've tried everything I can think of (which isn't much). Is anybody able to offer some guidance on what the problem might be?

Many thanks

Raspnoob.

share|improve this question
    
It seems that your RaspberryPi does not see your sensor. Double check that it is connected in the right way (for example if you didn't connect sensor pin 1 as pin 3, etc), double check that you connected data pin to gpio 4, check another sensor (maybe you managed to brake the one you are testing right now). Also, since I don't know if this is a typo, double check if you are using 4.7k Ohm (4700 Ohm) resistor, not 4.7 Ohm. –  Krzysztof Adamski Nov 15 '12 at 12:36
    
Thanks for the response, that was a typo is is a 4.7k Ohm resistor (yellow, violet, red, gold). I have three temperature sensors and none of them work, it is however possible that I've managed to break all three of them through misswiring. At least there seems to be nothing else jumping out as wrong so I'll start by buying a couple more. –  Raspnoob Nov 15 '12 at 14:28
add comment

2 Answers

I suggest double checking your connections. photo of connections
↑ my wiring (which works for me)

Pi header pins ← From pi cheat sheet

screenshot of temp graph and pi commands
↑ commands and example output + RRDTOOL graphs from DS18B20 (the one shown in top photo.)

If a picture is worth a thousand words, why does stack exchange insist on 30 characters?

share|improve this answer
1  
+1 for the "If a picture ..." comment –  HeatfanJohn Nov 15 '12 at 22:16
    
Thanks HeatfanJohn that is exactly what is was. A wiring error. Your picture fixed the problem in seconds. I'm a little confused that though as to me that is pin 7 which a diagram I have labels it as General Purpose Clock. How is it GPIO#4? Thanks again, –  Raspnoob Nov 16 '12 at 10:17
    
@Raspnoob: See pinout in updated answer, numbering is confusing. GPIO numbering is per main system-on-chip makers spec, but the header pins are organised differently and are separately numbered in a zig-zag way instead of along lines of pins. P.S. please click the tick to accept answer if it helped solve your problem. –  RedGrittyBrick Nov 16 '12 at 11:16
    
Can I use a different GPIO? –  Andres Feb 5 at 7:41
add comment

PIN 3 must be grounded in parasite power mode!, per the datasheet.

share|improve this answer
2  
Hi hello welcome. Please expand your answer, e.g. with links, further descriptions, photos or similar. –  myhd Feb 15 at 19:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.