3

I am using a Raspberry Pi 2 Model B and trying to hook up a DS18B20 temperature sensor to it. Current Running Raspbian Jesse which was installed onto SD card about a month ago. Running uname -a returns:

Linux raspberrypi 4.1.18 v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 arm7l GNU/LINUX


It currently will not acknowledge that the sensor is hooked up.

I have successfully connected it to an Arduino and read temperature so I know the temperature sensor is fine and I have correctly identified the power/ground/data wires and hooked up the 4.7K resistor correctly. I have viewed the post here.
I have tested my GPIO pins with the script given in the comments and they test out fine.

My current set-up method:

  1. Wire to Pi as follows:
    enter image description here

  2. Add the following to /boot/config.txt:

    dtoverlay=w1-gpio-pullup,gpiopin=4


Note: I have also tried it without the "-pullup" with no success.

  1. Reboot

  2. Type in the following commands:

    sudo modprobe w1-gpio

    sudo modprobe w1-them

    ls /sys/bus/w1/devices

The last command gives me the following:

00-08000000000  00-f00000000000  w1_bus_master1

After searching extensively, all of the posts that I have found are at least a year old so maybe there was a change since then?

4

I think you've got your connections backwards.

You've got the 3.3v power on pin 40, not pin 1.

enter image description here

Turn the Pi over and look for the square solder point. That is pin 1. Pin 1 is the pin closest to the PWR led.

  • Thanks a ton! This is a bit embarrassing....I spent hours trying to figure this out. – Eric B Mar 14 '16 at 20:53
  • 1
    @EricB No problem! And no worries, I've done the same and worse, it happens to all of us! – Patrick Cook Mar 14 '16 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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