DS18B20 temperature sensor not recognized

1,085 views
Skip to first unread message

Jeffrey S. LaFavre

unread,
May 12, 2017, 4:09:49 PM5/12/17
to PrivateEyePi
I am following the instructions at http://projects.privateeyepi.com/home/temperature-sensor-project-using-ds18b20
To connect a temperature sensor to my Raspberry Pi 3 running Rasbian ver. 8 jessie, with recent update and upgrade

I am using a DS18B20 temperature sensor connected to the Raspberry Pi as per instructions and have doubled-checked to determine that all wiring is correct.

at the command prompt I run following:

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

this resulted in an empty directory listing

then the following command:

sudo nano /boot/config.txt

and edit file by adding following two lines to bottom of file:

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


save, exit and reboot

then repeat the commands at top of this list (sudo modprobe etc. etc.)

but still I get an empty directory listing 

Can anyone advise on why the Raspberry Pi is not recognizing my temp sensor (I have tried two units with same result)

Thanks very much

Gadjet Nut

unread,
May 13, 2017, 9:07:15 PM5/13/17
to PrivateEyePi
I tested it under Jessie 8 and have no problems. See directory in bold below and Jessie version below. Can you send a picture of your wiring?

pi@raspberrypi:/sys/bus/w1/devices $ ls
28-0415a21f14ff  w1_bus_master1


pi@raspberrypi:/sys/bus/w1/devices $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
pi@raspberrypi:/sys/bus/w1/devices $

Message has been deleted

Jeffrey S. LaFavre

unread,
May 14, 2017, 12:47:46 AM5/14/17
to PrivateEyePi
I discovered my problem:

# 1-wire settings
dtoverlay=w1-gpio.gpiopin=4
 
I had a period instead of a comma between gpio and gpiopin=4

I have everything working now and posting to web site.  However, the temperature is reading 85 degrees C for a temperature probe at room temp (about 20 degrees C).  Do you think I have a faulty device or is some kind of calibration needed?

Thanks

Jeffrey S. LaFavre

unread,
May 14, 2017, 12:14:16 PM5/14/17
to PrivateEyePi
Now I think I have identified problem with 85 degree C readings.  I have part DS18B20+PAR, which I understand can be powered parasitically only.  I was trying to power at pin 3 with 3.3 volts from Raspberry Pi.  Now I am wondering if I can use DS18B20+PAR.  From datasheet, to use parasitically, pin 3 and pin 1 of DS18B20+PAR must be connected.  Just wondering how the 4.7 K resistor fits into the wiring in this case?  Will continue to investigate.
Reply all
Reply to author
Forward
0 new messages