orkj
Posts: 4
Joined: Fri May 23, 2014 10:29 pm

Problems with my GPIO / ds18b20

Fri May 23, 2014 10:51 pm

Hey guys.

I must admit that I registered on this forum to ask this question, so let me just start by saying that I have had much joy of your content even if I never registered. So thank you for that!

I have been using my rpi to temperature logging from time to time (beer brewing actually) and it has been working great for me. However, when I tried to attach my setup again today, things did not go as smoothly as they used to.

After I enable the modules I used to (wire, w1-gpio and w1-therm) there is no sign of any devices attached. When I do

Code: Select all

cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
i just get

Code: Select all

not found.
I have done some googling, and found out (and tried) the following things for debugging:
- Enable modules with verbose mode (and syslog logging). Nothing interesting popped out.
- Seems some mean that the modules are named w1_gpio and w1_therm. I tried all combinations.
- Some like to enable these on startup. I tried that too.

In addition I have done update/upgrade/rpi-upgrade/dist-upgrade. No difference there.

For reference. I am running raspbian 7 Linux raspberrypi 3.12.20+

Now, I am beginning to think this might be a hardware issue. But as this is by far my weakest ability when it comes to hacking with the rpi, I have to ask a few questions:
- What is the most common error when faced with the problem above (specifically this):

Code: Select all

[email protected] ~ $ cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves 
not found.
- How would I go on about finding out if some of my GPIO pins/ground/what have you/ have started to fail?
- What would be the output if my setup was correct (I mean, it hasn't really changed) and for example one of my wires have stopped working.
- Wouldn't I at least get some kind of bogus reading off my sensor if that stopped working and was the cause of it all? (I mean instead of not being able to see anything about any sensors).

I am sorry if this is a question often answered. Especially since I really tried to find the answer by searching before I resorted to this. So if any one has any hints in any direction, you would level up awesome-wise. At least in my book :)

Thanks, have a nice weekend.

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: Problems with my GPIO / ds18b20

Sat May 24, 2014 7:23 am

Cross-check with a tutorial such as https://www.cl.cam.ac.uk/projects/raspb ... mperature/

This differs from that example:

Code: Select all

cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
I think it needs to be something like:

Code: Select all

cat /sys/bus/w1/devices/10-000802824e58/w1_slave
(Obviously you need to substitute the unique device number returned by your own sensor.)

If there is no device entry created in /sys/bus/w1/devices, maybe you have mis-wired the sensor when you re-connected it?
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

orkj
Posts: 4
Joined: Fri May 23, 2014 10:29 pm

Re: Problems with my GPIO / ds18b20

Sat May 24, 2014 8:31 am

Hey, thanks for answering!

I probably jumped a bit ahead when I did not say why I tried to

Code: Select all

cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
. The reason is, as you also write, that no device directories are inside of /sys/bus/w1/devices/, so naturally I can not cat something inside of there. So the file I try to read from is supposed to contain a list of devices (f.example 10-000802824e58), but instead it just says "not found.".

Also, I am pretty certain that I wired it correctly, as I was looking at a picture from when it was in use (and I also wired it exactly as the person in the link you posted). And I did it over again like 3 times when it was not working. So this is why I am fearing that something hardware-wise is broken, but I do not know where to start looking.

orkj
Posts: 4
Joined: Fri May 23, 2014 10:29 pm

Re: Problems with my GPIO / ds18b20

Sat May 24, 2014 8:42 am

Also, for reference. I have actually 2 ds18b20 sensors. The one I have used up until now is a waterproof one, but plugging in the "regular one" (the same as in the article mentioned above) gives me the same result.

orkj
Posts: 4
Joined: Fri May 23, 2014 10:29 pm

Re: Problems with my GPIO / ds18b20

Sat May 24, 2014 9:10 am

OK, this is really weird (aside from the fact that I am just talking to myself :)). I just plugged in the waterproof one (after testing the regular), and now it magically works. If only there were some pattern that I could reuse if this happens one more time... :?

Anyway, thanks for reading and answering. Hope it keeps stable through the day as I am brewing a batch of beer later. Have a nice weekend everyone.

Return to “Automation, sensing and robotics”