Dhruvin Pipalia
Posts: 7
Joined: Wed Jan 28, 2015 2:34 pm

Temperature Sensor DB18B20 Not Working

Wed Jan 28, 2015 2:40 pm

I have connected the pins of my sensor to the appropriate pins of raspberry pi and i write following two command

sudo mobprobe w1-gpio
sudo mobprobe w1-therm

after the i go to /sys/bus/w1/devices directory but it shows nothing..
what should i do?
i am using raspberry pi b+ model..

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

Re: Temperature Sensor DB18B20 Not Working

Wed Jan 28, 2015 7:14 pm

Dhruvin Pipalia wrote:sudo mobprobe w1-gpio
sudo mobprobe w1-therm
Is that a typo and you really used "modprobe"?
Check the modules have loaded with "lsmod | grep w1", like this

Code: Select all

[email protected] ~ $ lsmod | grep w1
w1_therm                2866  0 
w1_gpio                 2751  0 
wire                   25349  2 w1_gpio,w1_therm
How have you wired the sensor?
It should be +v to 3.3V pin, gnd to 0v/GND pin, data to GPIO4 pin 7 and 4K7 resistor between data and +v.

Does the sensor get hot?

Which kernel version are you running? There were some changes between the 3.12.xx and the 3.18.xx kernels. Type "uname -r" to find out which one you are running.

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

Re: Temperature Sensor DB18B20 Not Working

Thu Jan 29, 2015 2:11 pm

From experience , check and double check the wiring and orientation of the device.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
RaTTuS
Posts: 10454
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Temperature Sensor DB18B20 Not Working

Thu Jan 29, 2015 2:21 pm

pluggy wrote:From experience , check and double check the wiring and orientation of the device.
and if it is HOT then you have wired it backwards
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

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

Re: Temperature Sensor DB18B20 Not Working

Thu Jan 29, 2015 3:29 pm

RaTTuS wrote:
pluggy wrote:From experience , check and double check the wiring and orientation of the device.
and if it is HOT then you have wired it backwards
I was going to say that but it slipped my mind. The device usually survives being wired backwards in my experience (I've done it a time or three.....)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Dhruvin Pipalia
Posts: 7
Joined: Wed Jan 28, 2015 2:34 pm

Re: Temperature Sensor DB18B20 Not Working

Fri Jan 30, 2015 7:17 am

rpdom wrote:
Dhruvin Pipalia wrote:sudo mobprobe w1-gpio
sudo mobprobe w1-therm
Is that a typo and you really used "modprobe"?
Check the modules have loaded with "lsmod | grep w1", like this

Code: Select all

[email protected] ~ $ lsmod | grep w1
w1_therm                2866  0 
w1_gpio                 2751  0 
wire                   25349  2 w1_gpio,w1_therm
How have you wired the sensor?
It should be +v to 3.3V pin, gnd to 0v/GND pin, data to GPIO4 pin 7 and 4K7 resistor between data and +v.

Does the sensor get hot?

Which kernel version are you running? There were some changes between the 3.12.xx and the 3.18.xx kernels. Type "uname -r" to find out which one you are running.


Typing mistake. i wrote "modprobe"

but hey i found the error since i updated my kernels i add these two links in the /boot/config.txt file

dtoverlay=w1-gpio,gpiopin=4
and now its showing
i read this solution is some post here but forgot the link so couldnt paste it here ..
but thanks for the reply.. :)

Dhruvin Pipalia
Posts: 7
Joined: Wed Jan 28, 2015 2:34 pm

Re: Temperature Sensor DB18B20 Not Working

Fri Jan 30, 2015 7:18 am

RaTTuS wrote:
pluggy wrote:From experience , check and double check the wiring and orientation of the device.
and if it is HOT then you have wired it backwards

I updated the kernel that was the probelm.

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

Re: Temperature Sensor DB18B20 Not Working

Fri Jan 30, 2015 10:30 am

Dhruvin Pipalia wrote:
rpdom wrote:
Dhruvin Pipalia wrote:sudo mobprobe w1-gpio
sudo mobprobe w1-therm
Is that a typo and you really used "modprobe"?
Check the modules have loaded with "lsmod | grep w1", like this

Code: Select all

[email protected] ~ $ lsmod | grep w1
w1_therm                2866  0 
w1_gpio                 2751  0 
wire                   25349  2 w1_gpio,w1_therm
How have you wired the sensor?
It should be +v to 3.3V pin, gnd to 0v/GND pin, data to GPIO4 pin 7 and 4K7 resistor between data and +v.

Does the sensor get hot?

Which kernel version are you running? There were some changes between the 3.12.xx and the 3.18.xx kernels. Type "uname -r" to find out which one you are running.


Typing mistake. i wrote "modprobe"

but hey i found the error since i updated my kernels i add these two links in the /boot/config.txt file

dtoverlay=w1-gpio,gpiopin=4
and now its showing
i read this solution is some post here but forgot the link so couldnt paste it here ..
but thanks for the reply.. :)
Rule number 1, never, ever, run rpi-update......
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Return to “General discussion”