nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

DS18B20 and 30-Jan firmware

Tue Feb 03, 2015 8:28 am

Hi all,

Sorry if this is a repost - I've done a quick search, and can't find anything, so I'll risk the (deserved) wrath of the forum and post a new topic. Please feel free to tell me how to use search if this has already been done to death...

I've been using a pair of DS18B20 sensors for ages now, no problems. However, yesterday I upgraded my machine with rpi-update, and noticed that things had stopped working. When I looked in /sys/bus/w1/devices/ it was empty. Tried rebooting, removing and reloading the modules, and even the final solution, switching it off and on again. Nothing. I Tried another sensor, just in case it was a coincidence. Still nothing. So I downgraded the firmware to the previous one (I'm not sure exactly what version, I'll check, but it was from around October last year) and the sensors appeared again, and were working as expected.

So, it seems that at some point in the last few firmware/kernel updates, something has changed. I had a quick look at github and didn't notice anything obvious, but then again, remember what I said earlier about my powers of search?

Anyone else noticed this? Is there anything that's changed that I couldn't find, or is it broken?

Ta,
--
nr.

User avatar
joan
Posts: 14198
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: DS18B20 and 30-Jan firmware

Tue Feb 03, 2015 8:32 am

See http://www.raspberrypi.org/forums/viewt ... 28&t=97314

Summary

Add one or more of the following to your /boot/config.txt and reboot.

I2C
Add dtparam=i2c1=on (or dtparam=i2c0=on on old models)

SPI
Add dtparam=spi=on

I2S
Add dtparam=i2s=on

lirc-rpi
Add dtoverlay=lirc-rpi
Add module parameters to the end of the dtoverlay line,
e.g. dtoverlay=lirc-rpi,gpio_in_pin=16,gpio_in_pull=high

w1-gpio
If you require the external pullup
dtoverlay=w1-gpio-pullup,gpiopin=x,pullup=y
otherwise
dtoverlay=w1-gpio-pullup,gpiopin=x
(where x and y are gpios).

Audio card
Add one of the following
dtoverlay=hifiberry-dac
dtoverlay=hifiberry-dacplus
dtoverlay=hifiberry-digi
dtoverlay=iqaudio-dac
dtoverlay=iqaudio-dacplus

heartbeat LED
dtparam=act_led_trigger=heartbeat

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: DS18B20 and 30-Jan firmware

Tue Feb 03, 2015 9:13 am

Excellent, thank you! For some reason, if I search for w1-gpio or w1-therm, that topic doesn't get found, so I didn't see it. But that's great information, thanks :)
--
nr.

User avatar
Penthux
Posts: 79
Joined: Thu Oct 11, 2012 7:33 am
Location: United Kingdom

Re: DS18B20 and 30-Jan firmware

Wed Feb 04, 2015 8:14 pm

Having a heartbeat pulse on the ACT LED is quite misleading. When the ACT LED is pulsing it looks like it's passing data, as you would expect. A heartbeat pulse on the PWR LED might be more sensible.

Is there any such function: "pwr_led_trigger=heartbeat" ?
Penthux
------------
Slackware ARM on a Raspberry Pi - SARPi
http://sarpi.co.uk
"Slackware ARM - it's not for NOOBS!"

msloan
Posts: 24
Joined: Fri Feb 24, 2012 5:36 pm

Re: DS18B20 and 30-Jan firmware

Thu Feb 05, 2015 5:21 pm

I just made a new noobs installation and the sensors I had working before will not show up either. The Folder for /sys/bus/w1/devices/ is completely empty. I thought I had things wired up wrong or fried my sensors but they are not. Tested on another pi with older version.

jbranko
Posts: 4
Joined: Tue Jul 17, 2012 7:48 pm
Location: Slovenia

Re: DS18B20 and 30-Jan firmware

Thu Feb 05, 2015 7:25 pm

I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.

User avatar
rpdom
Posts: 15028
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: DS18B20 and 30-Jan firmware

Thu Feb 05, 2015 7:41 pm

jbranko wrote:I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.
The only line you should need to put into config.txt in your case is

Code: Select all

dtoverlay=w1-gpio
which should work with the default of gpio 4.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: DS18B20 and 30-Jan firmware

Thu Feb 05, 2015 8:14 pm

Just to confirm, that everything is good for me on the latest update - it works just fine! I just added the one line to my config.txt file (I don't have access to the machine right now, so can't confirm exactly the syntax, but it was exactly as explained in the README file), rebooted, and all is good.

Thanks,
--
nr.

jbranko
Posts: 4
Joined: Tue Jul 17, 2012 7:48 pm
Location: Slovenia

Re: DS18B20 and 30-Jan firmware

Thu Feb 05, 2015 8:26 pm

rpdom, thank you for help. It work's. You save me few hours with downgrade.

matyoo
Posts: 1
Joined: Thu Feb 05, 2015 5:47 pm

Re: DS18B20 and 30-Jan firmware

Sun Feb 08, 2015 6:20 pm

thank you very much.
it's good.

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: DS18B20 and 30-Jan firmware

Sun Feb 08, 2015 7:48 pm

rpdom wrote:
jbranko wrote:I have the same problem. I added a few lines into config.txt, but without success. I have connected ds18b20 to GPIO4. Can someone tell me, what exactly should I do? Othervise I will do downgrade to previous version. Most likely there is only few lines to resolve the issue. Unfortunately I don't know which one. Thanks for all help.
The only line you should need to put into config.txt in your case is

Code: Select all

dtoverlay=w1-gpio
which should work with the default of gpio 4.
Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.

Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt

Possibly I plugged the pin header wrong. Sorry for wasting your time.

Voltar
Posts: 5
Joined: Sun May 12, 2013 1:36 am
Contact: Website

Re: DS18B20 and 30-Jan firmware

Sun Feb 08, 2015 10:50 pm

1st off, awesome opening post to this thread. LOL!

2nd, I had exactly the same issue as the OP. Added the dtoverlay=w1-gpio line to config.txt and all is well.

Thanks to all!
My projects and stuff: www.whiskeytangohotel.com

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: DS18B20 and 30-Jan firmware

Mon Feb 09, 2015 4:26 pm

Groan, some work to do before I dare update my Pis with digital thermometers attached.....
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: DS18B20 and 30-Jan firmware

Sun Feb 15, 2015 7:52 pm

cacb wrote: Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.

Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt

Possibly I plugged the pin header wrong. Sorry for wasting your time.
Hello again.
As seen above, I had the problem with ds18b20 and apparently fixed it by updating /boot/config.txt

Today, I did another
sudo apt-get update
sudo apt-get upgrade

and now my ds18b20 sensors are gone *again* - sigh. Please, what is going on? This is a machine I am setting up for a friend.

I have tried adding/removing dtoverlay=w1-gpio to boot/config.txt, but now this does not help either. When I list the contents of /sys/bus/w1/devices (dtoverlay=w1-gpio is activated in boot/config.txt) i get a varying number of subfolders, but they do not have the proper names (serial numbers)

Right now I have 2 sensors attached, I know the serial numbers, they are
28-00005a013a4
28-00005a01d5f

but when I list /sys/bus/w1/devices , I get
00-300000000000
00-b00000000000
00-d00000000000
w1-bus-master1

The characters 3, b, d keep changing in the names above, and sometimes there are only 2 folders.

Please, this used to be dead simple, now it is broken. I would really appreciate some help.

forzalaquila
Posts: 2
Joined: Tue Feb 17, 2015 3:17 pm

Re: DS18B20 and 30-Jan firmware

Wed Feb 18, 2015 11:33 am

cacb wrote:
cacb wrote: Hi I was just about to post a longish explanation that I've read everything here and I am still unable to get my ds18b20 to work.

Update: Please ignore, it does indeed work now. I am not sure what I changed, but suddenly it is normal. I did add dtoverlay=w1-gpio to /boot/config.txt

Possibly I plugged the pin header wrong. Sorry for wasting your time.
Hello again.
As seen above, I had the problem with ds18b20 and apparently fixed it by updating /boot/config.txt

Today, I did another
sudo apt-get update
sudo apt-get upgrade

and now my ds18b20 sensors are gone *again* - sigh. Please, what is going on? This is a machine I am setting up for a friend.

I have tried adding/removing dtoverlay=w1-gpio to boot/config.txt, but now this does not help either. When I list the contents of /sys/bus/w1/devices (dtoverlay=w1-gpio is activated in boot/config.txt) i get a varying number of subfolders, but they do not have the proper names (serial numbers)

Right now I have 2 sensors attached, I know the serial numbers, they are
28-00005a013a4
28-00005a01d5f

but when I list /sys/bus/w1/devices , I get
00-300000000000
00-b00000000000
00-d00000000000
w1-bus-master1

The characters 3, b, d keep changing in the names above, and sometimes there are only 2 folders.

Please, this used to be dead simple, now it is broken. I would really appreciate some help.
hello,same problem to me.Do you have fixed?
bye
cesare

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: DS18B20 and 30-Jan firmware

Wed Feb 18, 2015 8:33 pm

forzalaquila wrote: hello,same problem to me.Do you have fixed?
bye
cesare
Hi, I had this problem a couple of times, and I had difficulties finding the causes. Now it seems there were a couple of things at the same time. Initially, a system upgrade broke it. That was fixed by adding "dtoverlay=w1-gpio" to /boot/config.txt

The second time it happened, I did not really find out why, but it seems most likely I had some kind of hardware connection issue (my sensors are on a home made board connected to the GPIO pins via a pin header). After disconnection everything and re-connecting, I found that it "suddenly" worked again.

lmqr15
Posts: 4
Joined: Sun Mar 22, 2015 7:42 pm

Re: DS18B20 and 30-Jan firmware

Sun Mar 22, 2015 7:55 pm

this is the second time DS18B20 goes wrong because of an upgrade.
I wonder why there were no update doc's warning for this issue, now my solarheater went into safe modus again after an upgrade made the thermistors not doing their thing,
safe modus means here open the valves to the accumulator even when temps might be too low, Resulting in a possible cooling off. To say the truth I really hate this kind of stuff going haywire because no one takes the courtesy to tell anyone.
A reason the more to setup a test environment of a few Raspi's before implementing an upgrade.

Agsom
Posts: 1
Joined: Wed Mar 25, 2015 3:02 am

Re: DS18B20 and 30-Jan firmware

Wed Mar 25, 2015 3:08 am

cacb wrote:After disconnection everything and re-connecting, I found that it "suddenly" worked again.
This simple suggestion worked for me. Thanks a lot! I was having the same issue, instead of seeing 28-* in /sys/bus/w1/devices/ I was seeing some weird names like:

Code: Select all

[email protected] /sys/bus/w1/devices $ ls
00-300000000000  00-b00000000000  00-d00000000000  w1_bus_master1
Unplugging and rewiring solved it.

User avatar
NikThePlumber
Posts: 11
Joined: Sun Jan 05, 2014 10:30 am
Location: Rugby, Warwickshire, UK
Contact: Website

Re: DS18B20 and 30-Jan firmware

Sun Mar 29, 2015 9:57 am

I've had this same odd problem. I don't have a solution yet, but my experience may help someone...

I've been continuously running 4 x DS18B20 probes in parallel on a Pi model B as part of a home temperature experiment for a few months now with no problems at all. I recently swapped to a Pi model A+ but I've encountered the same problem described above where I can see some folders in the w1/devices folder but they don't match up with the serial number in the actual sensors (I have these captured in my code on the model B so am 100% sure that they work and know what they should be). This is what it looks like when I list the folder contents:
[email protected] /sys/bus/w1/devices $ ls -l
total 0
lrwxrwxrwx 1 root root 0 Mar 29 09:49 00-774000000000 -> ../../../devices/w1_bus_master1/00-774000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:49 00-b74000000000 -> ../../../devices/w1_bus_master1/00-b74000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:50 00-f74000000000 -> ../../../devices/w1_bus_master1/00-f74000000000
lrwxrwxrwx 1 root root 0 Mar 29 09:49 w1_bus_master1 -> ../../../devices/w1_bus_master1
I've ensured I'm apt-get up-to-date and have tried different hardware configurations and various boot options with no success.

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: DS18B20 and 30-Jan firmware

Sun Mar 29, 2015 2:52 pm

Agsom wrote:
cacb wrote:After disconnection everything and re-connecting, I found that it "suddenly" worked again.
This simple suggestion worked for me. Thanks a lot! I was having the same issue, instead of seeing 28-* in /sys/bus/w1/devices/ I was seeing some weird names like:

Code: Select all

[email protected] /sys/bus/w1/devices $ ls
00-300000000000  00-b00000000000  00-d00000000000  w1_bus_master1
Unplugging and rewiring solved it.
It is a weird problem. The numbers you list are the exact same I saw (on a PI1 Model B) when the sensors stopped working. A few days ago, my SD card got corrupted, I had to erase it and reinstall latest version of Raspbian (NOOBS). I added dtoverlay=w1­gpio to /boot/config.txt and it worked fine with the same sensors as before.

It would be nice to understand why this sometimes happens though. Apparently, it is not a unique one-off problem.

User avatar
NikThePlumber
Posts: 11
Joined: Sun Jan 05, 2014 10:30 am
Location: Rugby, Warwickshire, UK
Contact: Website

Re: DS18B20 and 30-Jan firmware

Sun Mar 29, 2015 5:53 pm

hmm, the reason that I swapped to my A+ was that the B suddenly stopped working one day following a reboot, so because I'm logging data I just grabbed the spare A+ to try and minimise the data gap. I haven't revisited the B until today but when I investigated the B, I've found it's completely dead - won't even wake the screen up so I can't even tell if it's doing BIOS things. I put the SD card in my laptop and found my user data was OK, although I've not checked out the OS folders. I've no idea if this is related - perhaps I've fried the B and the probes, although I had a 2x16 LCD display plugged in which is still working with the A+

Weird...

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: DS18B20 and 30-Jan firmware

Sun Mar 29, 2015 8:15 pm

NikThePlumber wrote:hmm, the reason that I swapped to my A+ was that the B suddenly stopped working one day following a reboot, so because I'm logging data I just grabbed the spare A+ to try and minimise the data gap. I haven't revisited the B until today but when I investigated the B, I've found it's completely dead - won't even wake the screen up so I can't even tell if it's doing BIOS things. I put the SD card in my laptop and found my user data was OK, although I've not checked out the OS folders. I've no idea if this is related - perhaps I've fried the B and the probes, although I had a 2x16 LCD display plugged in which is still working with the A+

Weird...
Don't know if it is of any help, but this is what my PI1 Model B looked like when it had suddenly crashed (after 88+ days with no reboot) and refused to boot
http://arnholm.org/tmp/Weathercam_noboot.jpg

It complained about corrupted "group descriptors" and was just hanging with the screen as shown. I just wiped the card and reinstalled Raspbian on the same card, no problem.

My PI is a weather camera capturing an image every minute, it has done that since the beginning of September last year, you can compute how many writes that is yourself :P After this crash, I have enabled a tiny RAM drive and write images + an XML file with temperature readings to the RAM drive instead of the SD card, before offloading both to a network drive in the house. This should reduce the problem of another SD card corruption, I hope.

But the original sensor problem is unrelated to the crash I had, I believe.

ferniematt
Posts: 26
Joined: Thu Jun 19, 2014 5:18 am
Location: Fernie, BC, CANADA

Re: DS18B20 and 30-Jan firmware

Tue Jun 02, 2015 3:28 am

Thanks for the Fix!
Bring Karma Points to the Forum.

garyk1968
Posts: 16
Joined: Thu Feb 09, 2012 8:50 am
Location: Bedfordshire
Contact: Website

Re: DS18B20 and 30-Jan firmware

Fri Jun 05, 2015 6:25 pm

Anyone still having issues because I am.

I have 4 x DS18B20s and have been working a prototype using a 9 month old Pi with no problems whatsoever. (3.18.7+)

I hook up to a new Pi I got last week and did the update and upgrade. Ran

Code: Select all

sudo modprobe w1-gpio && sudo modprobe w1_therm
and also added those 2 modules to etc/modules.

I also have:

Code: Select all

dtoverlay=w1-gpio,gpiopin=4
Whatever I do I just cannot get this Pi (3.18.11+) to recognise the temp sensors. I have double and triple checked the wiring.

Anyone have anything else I can try?

Thanks


Gary

frafrichile
Posts: 42
Joined: Wed Mar 05, 2014 3:11 pm

Re: DS18B20 and 30-Jan firmware

Fri Jun 05, 2015 7:00 pm

I am waiting on my DS18B20 . about 5 of them
Thanks for posting this useful information

Return to “Automation, sensing and robotics”