DS18B20-PAR 1-Wire Parasite-Power bad value


11 posts
by seb312 » Fri Dec 28, 2012 9:25 am
Hello,

I have bought several DS18B20-PAR in order to use them for getting the temperature of my house with my Raspberry Pi. I have seen that the DS18B20 sensor works very well with the Raspberry Pi, therefore I think it's possible to do it also with the paraside mode.

After checking the following link (http://shop.snootlab.com/attachment.php ... achment=65), I have connected my sensor as below :
The DS18B20-PAR pin 1 is connected (GND) to the ground of my raspberry PI ;
The DS18B20-PAR pin 2 is connected to the data (GPIO 4) of my raspberry PI and I have put a 4.7K resistor between the pin 2 of my sensor and the VCC (3.3) of my raspberry PI ;
and the DS18B20-PAR pin 3 is not connected.

But when I try to read the value, I obtain the following information :
more /sys/devices/w1_bus_master1/28-00000*/w1_slave
50 05 4b 46 7f ff 0c 10 1c : crc=1c YES
50 05 4b 46 7f ff 0c 10 1c t=85000

Do you have an idea why the sensor gives me a bad value ?

Thank in advance for your help.

seb312
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm
by Maxion » Fri Dec 28, 2012 5:17 pm
You need to connect the third pin to 3.3V.
Posts: 138
Joined: Mon Dec 03, 2012 2:22 pm
by albundy » Fri Dec 28, 2012 5:34 pm
Maxion wrote:You need to connect the third pin to 3.3V.


This is not true for the DS18B20-PAR.
The 3rd pin is internally not connected.
Posts: 25
Joined: Tue Jul 17, 2012 4:56 pm
by hitman80 » Fri Dec 28, 2012 5:35 pm
Posts: 18
Joined: Sun Nov 04, 2012 5:55 pm
by seb312 » Fri Dec 28, 2012 6:58 pm
The datasheet indicates that the DS18B20-PAR doesn't require to have the third pin connected to 3.3V and the pins must be connected as below :

PIN DESCRIPTION
DALLAS 18B20P
1 -> Ground
2 -> Data In/Out
3 -> No Connect
pull-up resistor -> 4,7K

Nevertheless, this configuration doesn't work with my Raspberry PI :'(

I will check of other solutions this weekend (to connect the first pin with the third pin (GND), to connect the third to 3,3V ...) but I think I will finish by ordering the DS18B20 without parasite power ...
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm
by repton » Fri Dec 28, 2012 8:02 pm
I don't think you will get the -PAR sensor to work with the GPIO driver on the RasPi as it doesn't provide the right pull up signal on the 1-Wire data line to power the sensor so it will not work in parasite mode.

You either need some "normal" DS18B20 sensors or to use something that does provide power down the data line such as a USB connected DS9490R or an I2C based master such as the RPI2.

Paul
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 86
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
by seb312 » Wed Jan 02, 2013 7:17 am
Thanks for your feedbacks
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm
by dpenezic » Wed Jan 02, 2013 8:10 am
Answer on your problem is very simple :) ... documentation.

http://datasheets.maximintegrated.com/en/ds/DS18B20-PAR.pdf

Your temperature sensor operate on follow condition :
(-55°C to +100°C; VPU=3.0V to 5.5V)

In theory it is suitable for direct connection to RPi, how ever RPi provide in ideal condition minimum VPU, which isnt enough for normal operation of temperature sensor.

Also from my experience, parasite power using 1-Wire network isnt best solution at all, if you expect normal, predictable work of system.

Regards,
Dubravko
Posts: 81
Joined: Sat Dec 22, 2012 2:36 pm
by repton » Wed Jan 02, 2013 12:39 pm
dpenezic wrote:In theory it is suitable for direct connection to RPi, how ever RPi provide in ideal condition minimum VPU, which isnt enough for normal operation of temperature sensor.


Not with the kernel 1-Wire driver though as (to the best of my knowledge) it doesn't provide the strong pull on on the data pin required for parasitic operation to work.

dpenezic wrote:Also from my experience, parasite power using 1-Wire network isnt best solution at all, if you expect normal, predictable work of system.


I have had no problems running fairly large 1-Wire networks (up to about 15-20 temperature sensors on up to about 100m of cable) using parasitic power.

Paul
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 86
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
by anv » Tue Feb 18, 2014 2:07 pm
I am facing the same problem: just replacing an arduino installation with a more powerfull raspberry pi system. But I can't use the already working sensor network because it uses only 2 wires.

The arduino libraries automatically detects the power mode and sends the appropiate pulses.

I also found that when a device is disconnected, the module continues showing it at /sys/bus/w1/devices/

Anybody knows where is the source code for this kernel module? May be it is no difficult to add parasite power mode...
Posts: 3
Joined: Tue Dec 18, 2012 9:15 am
by RPi4IKP » Tue Apr 15, 2014 12:57 pm
Hi,

I also ran recently into this problem when giving some hands-on exercises with the RPi and DS18B20 sensors which turned out to be DS18B20-PAR versions.

If one loads the kernel modules in that way:
Code: Select all
sudo modprobe w1-gpio pullup=1
sudo modprobe w1-therm strong_pullup=1

it works, same also with 'strong_pullup=2' option. I haven't tested the second variant with DS18B20 but the first works with both DS18B20 variants.
Posts: 1
Joined: Tue Apr 15, 2014 12:51 pm