parasite power

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

parasite power

#1 Post by Rob73 » 29 Dec 2023, 15:12

I have 4 ds18b20 temp sensors connected to GPIO13 on a D1 Mini ESP8266. They are the sealed variety with what appears to be a stainless steel end. 3 of the sensors in their Device menu are returning that they are parasite powered and one is not showing to be parasite powered. They are not wired up to be parasite powered. Two sensors are on a somewhat longer run of about 6 feet of cable and the other two are just the standard foot or whatever they come in. I started noticing some dropped readings occasionally so I looked into it and the parasite powered status on the menu caught my eye. Does this mean I have a sensor that is shorted over to ground or a bad sensor or something? Any advice on how I troubleshoot this situation? How does it know, or how does it determine it is parasite powered? Why would 3 of the 4 report that and not all of them when they are all tied on the same one wire line? I would think if its a wiring or sensor issue, it would tag them all as parasite powered. BUT, I dont understand those inner workings enough to know. Do the microcontrollers detect this parasite power or is this specific to espeasy? I really couldnt tell from the docs.

I spent some time putting it into a water proof enclosure and installing it all nice & its mounted outside. I am fairly sure nothing is wet, it just reads temps inside the enclosure, outside the enclosure, inside my well house temp and water line temp. Then enclosure is mounted on the outside so that I get good wifi connection without being blocked from the well house. But if that reporting that its parasite powered is an indicator of a bad sensor or wiring issue thats where I will start.

I have tried it with the latest normal firmware, latest climate firmware, and I reverted back to normal 20230930. It seemed like the latest firmwares had a very sluggish gui, like it was struggling with the wifi connection. Which was odd because I never lost connection and the mqtt messages kept rolling fine. But I didnt spend much time playing with it because I feel i need to get this parasite power thing addressed first and I dont feel I know enough about how to diagnose it. Is there some logs that I can watch or something first or do I just need to start disconnecting sensors?

I should add that the sensors all do report what seems to be valid accurate readings all around the clock. I may get 3 readings in a 12 hour period that are errors or it couldnt read or whatever. And it seems to be on all sensors about the same times. All sensors are on 12 resolution. I have been filtering out the bad readings by setting the error state value to 125 and the mqtt message to node red I just disregarding any reading over 120.

Rob

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: parasite power

#2 Post by TD-er » 29 Dec 2023, 16:50

As far as I remember, this parasite powered state is read from a register in the chip itself.
So if it is working fine, it might be some indication of the sensor being not a genuine sensor and maybe not all registers are being implemented like the original ones.
Or... maybe the supplied voltage is a bit too low and/or the resistor isn't of the right value, or some bad soldering/connection.

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#3 Post by Rob73 » 29 Dec 2023, 18:02

Ok… Thanks. I think my connections are solid, but it can always be that. Very possible that the sensors arent genuine. I will try some tests with a similar setup to see if its the resistor value or supply volts. I would guess its the voltage or resistor value, i am using other sensors from the same batch and they dont report parasite power true.

Thank you for giving me some help on this!

Rob

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: parasite power

#4 Post by TD-er » 29 Dec 2023, 21:39

Keep in mind your soldered joints aren't the only ones that can fail as the sensors inside the isolation tubes can also have bad connections, or the cable can have some issues.

Not sure how long the cables are to the sensors, as you shouldn't use a 'star' topology.

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#5 Post by Rob73 » 29 Dec 2023, 23:45

I have it all configured on a solderless breadboard and I have had those connections cause me trouble also.
Two sensors are cabled out to about 6-8 feet maybe at the most. I used the same cable that the sensors are made with. I think I have them all wired correctly, but I will look into it.
I have some tests to do. When I get it resolved I will post my findings.


Rob

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: parasite power

#6 Post by TD-er » 29 Dec 2023, 23:54

Please use only one with such a long wire as a test.
When you're using multiple with such long wires, you essentially create a star network.

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#7 Post by Rob73 » 30 Dec 2023, 01:45

So rather than chain them together on a long wire, would putting each DS18B20 on their own GPIO be a solution to the star network issue?

Rob

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: parasite power

#8 Post by TD-er » 30 Dec 2023, 10:14

First try to see if the star layout really is the issue.
I know it is adviced against using a star topology, but it doesn't mean it really cannot work with about 2m distance from the "bus".

So please first try each separately, thus really disconnecting the other one.

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#9 Post by Rob73 » 30 Dec 2023, 14:02

I have done some reading on the 1-wire and the star topology issues. I am betting that is the root of the issue. When the weather clears up I will do some wiring changes and get back with you.

Thanks for your help!

Rob

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#10 Post by Rob73 » 31 Jan 2024, 04:06

To follow up on my DS18b20 sensors showing to be in parasite power mode....

The problem was glitchy/bad sensors. I replaced two faulty sensors and it all works fine. The d1mini & espeasy combo doesnt care about the 8' cable length or whether it is connected via the star topology method or not. If the sensors are working correctly it doesnt seem to care and everything works fine. I had two sensors that would not work on their own when used as the only sensor. They would not even show up with an address. Wire them up together or with another sensor and they would work but showed to be in parasite mode. They still would display a good temperature but occasionally show a rogue temp of 32 deg. I cut the cables all the way down to the stainless steel enclosure and they still wouldnt work..so, i pitched them out.

So, if you have some DS18B20 temp sensors that are showing to be in parasite mode, they may be bad. That was my situation...


Rob

User avatar
Ath
Normal user
Posts: 3520
Joined: 10 Jun 2018, 12:06
Location: NL

Re: parasite power

#11 Post by Ath » 31 Jan 2024, 08:55

And you have the required pull-up resistor (see docs) installed for the DS18b20 (and other types of 1-wire) sensors? 1 pull-up per GPIO is enough.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: parasite power

#12 Post by TD-er » 31 Jan 2024, 09:56

Apart from the pull-up resistor.
Sadly it is quite common to receive fake DS18b20 sensors. Or even it is really hard to get genuine ones when ordering from Chinese webshops.

I have bought lots of those to make sure even the bad ones will work with ESPEasy.
Like 100 pieces for the price of only a few genuine ones, those can't be the real deal.
It took me a while to also get those to work using a logic analyzer.

But apparently they managed to make even worse ones.

Well, I'm not planning on trying to debug those as I've already added quite a lot of checks in the code to handle ones that not really follow the protocol.

Rob73
Normal user
Posts: 31
Joined: 25 May 2022, 15:05

Re: parasite power

#13 Post by Rob73 » 01 Feb 2024, 04:33

Ath, yep, the correct pullup resistor is wired up.

I dunno how cheap the ones are I got. I got some off of eBay and some off of Amazon. I would say they were a few bucks a piece or something like that. They werent super cheap nor expensive that I can remember.

Now that I have had a lil experience with a troublesome sensor, itll be easy enough to spot the problem and pitch it.

By far most of my temp sensors have worked. Most modules i have setup I throw a temp sensor on just to get a reading and I have never had a problem till now. Now if it reports parasite powered, I will know there is a good chance its a bad sensor.



Rob

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests