DS18B20 Temp sensor stopped working

504 views
Skip to first unread message

Brocher

unread,
Feb 6, 2015, 11:13:42 AM2/6/15
to privat...@googlegroups.com
Hi, hoping someone can help a newbie.
I followed the tutorial & surprisingly for me everything worked, well for about 2 weeks.
I had set up 2 separate sensors which were reading flawless.

Today it has just stopped working!!

When now go to /sys/bus/w1/devices there is no folders(there was when I first set it up)

I've tried swapping the 4.7k resistors, replacing the sensors but still nothing.

Not sure what else to try.
The sensors are located in my loft & I've used a cat5 cable to run down into the RPI in my bedroom approx. 8-10m but as I said earlier everything was working fine for approx 2 weeks??

Any ideas what I could try?

Thanks in advance

Gadjet Nut

unread,
Feb 7, 2015, 9:48:25 AM2/7/15
to privat...@googlegroups.com
Try testing it with a circuit that is closer to the Pi. That will rule out a problem with distance.

Otherwise it could be software related. Try run an upgrade in case something changed on your Pi:

·         sudo apt-get update

·         sudo apt-get upgrade



Brocher

unread,
Feb 7, 2015, 4:48:26 PM2/7/15
to privat...@googlegroups.com
Hi,
Tried connecting the sensor/resistor close to the Pi & the doing the update but still the same???
No sign of the sensors & no folders in the device folder??

Very strange knowing that it was up n running for a couple of weeks?

Keith

unread,
Feb 7, 2015, 5:02:31 PM2/7/15
to privat...@googlegroups.com
I'm having the same problem today (almost)

I started doing some testing today on a second (spare) Raspberry Pi, and I did the update/upgrade first, then built my electronics, and my temp sensor is not working either.  The directory is empty.

I wonder if there is some kind of update that is killing the temp readings?

I'm going to play with it some more and see if I can figure anything out.

Gadjet Nut

unread,
Feb 7, 2015, 6:46:57 PM2/7/15
to privat...@googlegroups.com
Can you provide more detail?

Are you using Raspbian Wheezy?

Have you got the sensor connected to GPIO4 (pin 7)?

A picture of your wiring and print screen of the results of the following commands:

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

Keith

unread,
Feb 7, 2015, 7:20:28 PM2/7/15
to privat...@googlegroups.com
Here is a screenshot

I tried taking a picture of my setup, but was not able to get a good picture, however I'm 99% sure it is setup correctly.
I used 3 different DS18b20 sensors, even one that I took out of a working system, and two brand new ones.

Pin 1 on the sensor is connected to Pin 6 on the PI
Pin 2 on the sensor is connected to pin 7 on the Pi
Pin 3 on the sensor is connected to pin 1 on the Pi

And a Yellow / Purple / Red resistor is connected between pin 2 and 3 on the sensor.

All sound correct?
pierror.jpg

Keith

unread,
Feb 7, 2015, 10:26:24 PM2/7/15
to privat...@googlegroups.com
I think I figured it out by reading this thread:  http://www.raspberrypi.org/forums/viewtopic.php?p=675658#p675658

I added 

# 1-wire settings
dtoverlay=w1-gpio,gpiopin=4

to the end of my /boot/config.txt file, and rebooted my Pi.

Gadjet Nut

unread,
Feb 7, 2015, 10:43:14 PM2/7/15
to privat...@googlegroups.com
Interesting, thanks. I`m doing an apt-get upgrade now and will see if I get the same problem. One possible benefit from the fix you found is now allows you to configure the pin so it`s no longer tied to just GPIO-4.

Gadjet Nut

unread,
Feb 7, 2015, 10:43:15 PM2/7/15
to privat...@googlegroups.com

Brocher

unread,
Feb 8, 2015, 4:28:46 AM2/8/15
to privat...@googlegroups.com
Keith, you're a lifesaver, updated the boot confit file as you said & bingo both sensors recognised & now reading the temperatures.

Thanks everyone for your help.

Gadjet Nut

unread,
Feb 8, 2015, 10:16:24 AM2/8/15
to privat...@googlegroups.com
I upgraded my Pi using the apt-get upgrade command, rebooted and then I got the same problem.

Inserting these lines at the end of  /boot/config.txt file and rebooring the Rpi solved the problem. Thanks Keith!

# 1-wire settings
dtoverlay=w1-gpio,gpiopin=4

Reply all
Reply to author
Forward
0 new messages