DS18B20 Temperature Sensor Stopped Working

4 posts
by MichaelCropper » Mon Jun 19, 2017 5:24 pm

I've had a good setup with a temperature sensor DS18B20 which has been working absolutely fine. Since getting this all setup, I decided to update the software on the Pi, which I don't think has been done since I first purchased it about 3 years ago (it's been sat in a cupboard, it's a Pi Model A!). Anyhow, since running a bunch of update commands to get all the latest versions of everything, the temperature sensor has stopped working. There are no directories showing within the folder /sys/bus/w1/devices other than the /w1_bus_master1/ directory. Previously there were directories for every sensor connected.

The commands I ran included (from what I can remember!);
- sudo apt-get install ca-certificates
- sudo apt-get update ~~ When I run this command now, I get the following error messages....
- - W: Failed to fetch http://mirrordirector.raspbian.org/rasp ... elease.gpg Could not resolve 'mirrordirector.raspbian.org' (the Y is missing, that is not a typo)
- - W: Failed to fetch http://archive.raspberrypi.org/debian/d ... elease.gpg Could not resolve 'archive.raspberrypi.org'
- - W: Some index files failed to download. They have been ignored, or old ones used instead
- sudo apt-get dist-upgrade
- sudo rpi-update ~~ When running this command I get the following error messages;
- - !!! Failed to download update for rpi-update!
- - !!! Make sure you have ca-certificates installed and that the time is set correctly

I've tested all of the solutions listed in here, https://www.raspberrypi.org/forums/view ... 7&start=25 , none of which have worked for me.

Any ideas?

I'd have to guess that something in one of the updates is now behaving differently and causing the temperature sensors not to be read properly.

Posts: 10
Joined: Sun Feb 21, 2016 4:03 pm
by DirkS » Mon Jun 19, 2017 5:32 pm
You have a network problem that needs to be solved first.
Follow the diagnostic actions that Dougie lists in this post: https://www.raspberrypi.org/forums/view ... 0#p1176940

- - W: Failed to fetch http://mirrordirector.raspbian.org/rasp ... elease.gpg Could not resolve 'mirrordirector.raspbian.org' (the Y is missing, that is not a typo)

What Y is missing?
Posts: 6923
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK
by DougieLawson » Mon Jun 19, 2017 5:36 pm
Stop using Wheezy, it's 21 months since support was dropped for Wheezy. The time to upgrade to Jessie is NOW!
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 28126
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by MichaelCropper » Tue Jun 20, 2017 3:06 pm
Thought the URL in the update should have been, http://mirrordirectorY.raspbian.org/.. etc. Guess that is a genuine sub-domain :-)

Ok, I've updated to Jessie, ran all the updates. Updated the config settings in the preferences menu to enable all of the following interfaces, SPI, I2C, Serial, 1-Wire.

When I ran the script that was working perfectly previously, the same error was still showing (saying that the temperature sensor cannot be found) as the temperature sensor that is plugged in is not being detected and is not visible in the directory, /sys/bus/w1/devices.

Having already checked the wiring on the breadboard multiple times, I decided to give things one last wiggle....and magically the temperature sensor appeared in the folder /sys/bus/w1/devices and the script started to work again.

Good old breadboards and lose connections!

At least this has got everything up to date running the latest operating system now :-)
Posts: 10
Joined: Sun Feb 21, 2016 4:03 pm