1

I have a rasp pi 2 b+ and a temperature sensor DS18B20.

I can't get my ls /sys/bus/w1/devices command to show anything other than w1_bus_master1.

I suspect it is a problem with my set up but I've tried a number of combinations but still no results.

I'm using a 10kOhm resistor, a Vilros cobbler and just updated raspbian (4.1.19-v7+).

I've tried adding this to my /boot/config.txt dtoverlay=w1-gpio

Pics of setup:

The crocodile clips go to the three connections for the DS18B20

The crocodile clips are connected to the DS18B20 [enter image description here

6
  • I have no idea what the solution is
    – darkace
    Jul 24, 2016 at 15:52
  • 1
    Have you a meter? If so check the breadboard voltages. Is 5V actually 5V and 3V3 actually 3V3? A common error is to connect the ribbon cable the wrong way around.
    – joan
    Jul 24, 2016 at 16:43
  • I don't currently have one but is there another way to tell if it's the wrong way around? I'll set everything up and try flipping it
    – darkace
    Jul 24, 2016 at 16:58
  • nope, nothing has changed
    – darkace
    Jul 24, 2016 at 17:09
  • Do you have a DS18B20 or a DS18B20-P? Jul 24, 2016 at 23:35

1 Answer 1

1

Try this:

  1. Edit your /boot/config.txt line to contain:

    dtoverlay=w1-gpio,gpiopin=4,pullup=on
    
  2. sudo lsmod, check for w1_therm. If it's not loaded, edit /etc/modules to contain:

    wire
    w1-gpio
    w1-therm
    
  3. Use a 4.7k resistor instead as recommended in datasheet. If you only have 10k ones, try to use 2 of them in parallel for a resulting impedance of 5kOhm, for testing purposes.

Reboot after each change. Good luck!

2
  • Sounds good. Will check when I'm home tonight but I remember that I currently already have dtoverlay, gpiopin and the lsmod has everything you suggested. Will try pullup and paralleling the resistors!
    – darkace
    Jul 25, 2016 at 10:52
  • @darkace I used kompf.de/weather/pionewiremini.html for setting up my DS1820. It's in German but you should get the point. I also operate my DS1820 in parasite-powered mode so another idea could be to connect the yellow wire that leads to your DS1820 to GND. (edit: works fine in both modes)
    – Domme
    Jul 25, 2016 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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