seb312
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm

DS18B20-PAR 1-Wire Parasite-Power bad value

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

Maxion
Posts: 138
Joined: Mon Dec 03, 2012 2:22 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Fri Dec 28, 2012 5:17 pm

You need to connect the third pin to 3.3V.

albundy
Posts: 31
Joined: Tue Jul 17, 2012 4:56 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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.


seb312
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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 ...

repton
Posts: 91
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
Contact: Website

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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/

seb312
Posts: 3
Joined: Sun Aug 26, 2012 7:43 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Wed Jan 02, 2013 7:17 am

Thanks for your feedbacks

dpenezic
Posts: 98
Joined: Sat Dec 22, 2012 2:36 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Wed Jan 02, 2013 8:10 am

Answer on your problem is very simple :) ... documentation.

http://datasheets.maximintegrated.com/e ... 20-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

repton
Posts: 91
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
Contact: Website

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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/

anv
Posts: 3
Joined: Tue Dec 18, 2012 9:15 am

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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...

RPi4IKP
Posts: 1
Joined: Tue Apr 15, 2014 12:51 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

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.

DrooLTU
Posts: 2
Joined: Wed Jan 20, 2016 1:44 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Wed Jan 20, 2016 1:55 pm

Hello, I know this is a really old thread but I mistakenly bought these wrong sensors (the 18B20P ones) :oops: ... And I was looking for a proper way to make them work with no avail. Every info is old and everyone who had the same problem just bought new sensors. But perhaps there were some changes in the w1-gpio to make the P's work? I tried all of the w1-gpio pullup and w1-therm strong_pullup etc. etc. and best I get is some random serials @ devices, like 00-f0000000000, sometimes multiple serials (all of them start with zeros). I know they can't work with non P drivers because the timing is all wrong or maybe I'm dumb enough not to even wire it up properly? Plx help!

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

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Wed Jan 20, 2016 5:38 pm

I haven't got any of the "P" sensors to test this with, but adding this line to /boot/config.txt should work

Code: Select all

dtoverlay=w1-gpio,pullup=1

DrooLTU
Posts: 2
Joined: Wed Jan 20, 2016 1:44 pm

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Wed Jan 20, 2016 7:24 pm

rpdom wrote:I haven't got any of the "P" sensors to test this with, but adding this line to /boot/config.txt should work

Code: Select all

dtoverlay=w1-gpio,pullup=1
That's what I currently have in my config. I spent all day today trying to figure this out and I'm not even sure if I haven't fried the damn thing now... As of wiring it's just ground to ground and DQ split to GPIO 4 and 4.7k ohm to 3v3, right? Also, what that "1" in pullup stand for? GPIO or as "on"? Why then I red somewhere to strong_pullup=4? Also I forgot to mention that I have pi 2 B with Ubuntu mint (Noobs didn't boot for me and when I flashed Raspbian manually locales where screwed, couldn't sudo or do anything pretty much...). Everyting was sooo much simpler with Arduino :lol: Oh well, maybe I wouldn't be so frustrated if I bought the right damn sensors...

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

Re: DS18B20-PAR 1-Wire Parasite-Power bad value

Thu Jan 21, 2016 9:35 am

DrooLTU wrote:[That's what I currently have in my config. I spent all day today trying to figure this out and I'm not even sure if I haven't fried the damn thing now... As of wiring it's just ground to ground and DQ split to GPIO 4 and 4.7k ohm to 3v3, right?
I think that's right. Like I said, I don't have any of the "P" sensors, so can't check :(
Also, what that "1" in pullup stand for? GPIO or as "on"?
It means "on". You can also use "pullup=yes" or "pullup=on".
Oh well, maybe I wouldn't be so frustrated if I bought the right damn sensors...
Write off those sensors as a mistake and get some of the normal ones. I use ebay. If I'm in a hurry I can get one from a UK supplier shipped within a couple of days for just over £1, or if not urgent I buy a batch of ten from China for just a bit more than that.

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: jacekgrab and 29 guests