Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

How to enable parasitic power pull-up?

5168 Views - Created 25/01/2017

25/01/2017

Posted by:
Lomax

Lomax Avatar

Location:
At sea

While the DS2482-100 datasheet says this is available, I haven't been able to figure out how to enable it. I've tried adding "dtoverlay=w1-gpio,pullup=1" to /boot/config.txt, and tried adding "activepullup" to /etc/owfs.config but syslog still shows "w1-gpio onewire@0: gpio pin 4, external pullup pin -1, parasitic power 0" and a DS18S20 temperature sensor connected to the 1-Wire bus remains stuck on 85 degrees, indicating it's not getting power. Help appreciated!

25/01/2017

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

I am not sure if owfs does support the active pull-up mode. I just tried writing a python script to update the configuration register manually but after updating the register owfs refused to read from the 1 wire bus and restarting owfs resets the configuration register. It may be worth posting a question on the owfs support forum to see if anyone there knows how to enable the active pullup.

The 1 Wire Pi should be able to read a DS18S20 in parasitic mode without enabling active pullup, I have a dev board with one of the DS18S20 iButton sensors connected to the DS2482-100 using a short cable and the temperature can be read using owfs. Can you check that you have the wires connected correctly to the sensor? You need to connect the DQ pin on the DS18S20 to OW on the 1 Wire Pi and GND to either GND or RT.

26/01/2017

Posted by:
Lomax

Lomax Avatar

Location:
At sea

Quote from andrewI am not sure if owfs does support the active pullup mode. I just tried writing a python script to update the configuration register manually but after updating the register owfs refused to read from the 1 wire bus and restarting owfs resets the configuration register.It does have a configuration option for it, though this is poorly documented.Quote from andrewThe 1 Wire Pi should be able to read a DS18S20 in parasitic mode without enabling active pullup, I have a dev board with one of the DS18S20 iButton sensors connected to the DS2482-100 using a short cable and the temperature can be read using owfs.Interesting. How does that work? I thought the DS18S20 sensor required a raised voltage on the data pin prior to being queried, with the energy needed to read out the value being stored in an internal capacitor? Aka, "active pullup".Quote from andrewCan you check that you have the wires connected correctly on the sensor? You need to connect the DQ pin on the DS18S20 to OW on the 1 Wire Pi and GND to either GND or RT.I'm using the RJ-12 cable that came with my weather station, an AAG TAI8515. The other (non-parasitic) sensors on board (windspeed & wind-direction) work as they should. Only the thermometer remains stuck on 85 degrees.

26/01/2017

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

I tried connecting a logic analyser to the I2C bus on the Raspberry Pi so I could see what was happening with owfs when the Raspberry Pi boots and the values it writes to the DS2482-100 do not appear to change when adding "activepullup" to /etc/owfs.conf so I don't think that functionality has been enabled in owfs.

Without the active pull-up option enabled I am measuring 4.6V at around 3.5mA on the OW pin on my 1 Wire Pi so there should be enough power there to run a sensor in parasitic mode. The DS2482-100 must have a pull-up resistor or some other circuitry that provides some power even when the active pullup is disabled.

Can you check your owfs.conf to make sure the line "server: FAKE = DS18S20,DS2405" is commented out with a #? If this line is still active then that could explain why the sensor is stuck at 85 degrees as it would be reading from a fake sensor instead of the real one.

Would it be possible to replace the DS18S20 on your weather station with the DS18F20 powered version?

29/01/2017

Posted by:
Lomax

Lomax Avatar

Location:
At sea

Thanks Andrew. Yes, the "fake" server is commented out. And I only see three sensors on the 1-Wire bus, which match those expected from the AAG station. Lost patience with it all, now looking for alternatives to the AAG unit.

29/01/2017

Posted by:
Lomax

Lomax Avatar

Location:
At sea

Curious. I just decided to try Domoticz, which I already use on another Pi to control the lights here. It required enabling file level access to the 1-Wire bus (using FUSE). Lo and behold - after adding the 1-Wire interface as a "device" in Domoticz and waiting a minute, all the sensors on the AAG unit came up - and the temperature is correct! Not sure what I've done there, but damn, Domoticz FTW!

29/01/2017

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

I am glad you got it working. I haven't used Domoticz before but I might have a look at the source code and poke around the I2C bus with the logic analyser to see what it is doing to enable the active pullup.

29/01/2017

Posted by:
Lomax

Lomax Avatar

Location:
At sea

It could be that accessing the sensors as file system objects (/mnt/1wire) does things differently to when using owhttp.

24/12/2018

Posted by:
nprater

nprater Avatar

I'm successfully using parasitic power with the 1 Wire Pi Zero board and DS18B20 temperature sensors.

I'm not using owfs, but instead accessing the devices via /sys/bus/w1/devices/...

As per the original post, I was initially getting temperature readings stuck at 85 degrees.

The fix:


echo 0 > /sys/bus/w1/devices/w1_bus_master2/w1_master_pullup


My DS18B20 devices are connected between the ESD-protected IO and Return (pins 3 and 4) of the interface board RJ12 connector. GND and VDD pins of the DS18B20 are linked.

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.