Combating Conductivity sensor electrolytic corrosion

Status
Not open for further replies.

Mosaic

Well-Known Member
Hi all:

I am using a PIC with weak pull up on a galvanized iron wire probe into a mild salt solution act as a level sensor. The other probe is at circuit ground.

When the PIC WPU pin is pulled down by conduction to ground the level is detected.

After 3 weeks the WPU probe corrodes.

I am considering the following steps and I'd like any input from the forum members:

1) Upgrade to 316 s/s probes.

2) Dynamically enable the WPU and sample for level once per second or so at a tiny duty cycle...running at instruction speeds: perhaps a millisecond sample. Then either float the probe pin or output a digital zero until the next sample.


What do u think, thanks.
 
Those both sound like good answers, the 316 stainless ought to corrode less, and the corrosion will be proportional to the current - so a reduction in that will reduce the galvanic corrosion.

You can still get galvanic corrosion with dissimilar metals, might be good to make the other part of this thing stainless, too (if you can). Stainless can still corrode, and this salt water + electric current combination is tough on the surface. Your best bet may be to plate the probe with palladium.
 
BTW from a PIC16f886, what is the actual voltage on a pin outputing a digital LOW? 5 VDC supply.

Also, there appears to be no "ADC style" delay required for the WPU. Does this mean I can enable the WPU and then sample the input pin right after and obtain a correct reading?
 
Last edited:
I'm not clear on how you are reading the pin, are you using the ADC? If so then, although the WPUs act instantly, the ADC capacitor needs time to charge. As the WPUs are typically 20k this would require quite a long acquisition time.

One other thing to consider is using two pins alternatively so you even the corrosion on the electrodes. Output ground on one and read the other. Note that the WPUs are automatically turned off for any pin set to output.

Edit, digital low is a maximum of 0.6V - no load - see table 17.5 of data sheet.

Mike.
 
Last edited:
Most conductive sensors use AC for that reason. You could put a capacitor in series with the probe to prevent the DC that leads to corrosion. You will need a more complicated detector to work with the capacitor but it should not be too difficult.
 

No ADC ...simply depends on conductivity to pull a digital low on the input pin.

I am using a direct ground connection so oscillating the current requires a board rebuild.

B4 I do a board rebuild I am going with the 1/1000 duty cycle and upgrade to 308 s/s probes from pieces of TIG welding rod. Basically activate the WPU to sample and then deactivate until the next sample @ a 1sec sample period
 
I am interested in optimizing the sensitivity of the sensor bu using adc. I note the pdf data sheet on the 16f882/6 shows a huge adc sampling time of 4.67mS, I feel they mean 4.67uS. Section 9.3 ,pg 107. Can anyone advise?
 
Sorry it is 4.67mS

To calculate the minimum acquisition
time, Equation 9-1 may be used. This equation
assumes that 1/2 LSb error is used (1024 steps for the
ADC). The 1/2 LSb error is the maximum error allowed
for the ADC to meet its specified resolution
 
Last edited:
Mosaic - you are correct, it is really 4.67μS. Page 13 on the Errata sheet here, with the corrected units in the equation -
https://www.electro-tech-online.com/custompdfs/2012/04/80302F.pdf


Sorry it is 4.67mS

Parroting back the error on the spec sheet isn't helping. If you had actually looked at the equation, you would have noticed that first they had Tc in μS, and then put it in mS in the final equation - an obvious mistake that requires no math to discover. Also, 4.67ms would be an ABSURDLY long acquisition time.
 
Last edited:
TYVM.

I also discovered, that the WPU is disabled by enabling ANSEL analog inputs. I have to use the ADC as I also discovered that the 308 s/s rods appear to have a poor interface with the salt solution, prob. because of the protective CrO2 layer. The resistance of the conductive cell has quadrupled. This defeats the pulldown of the WPU to a logic low state when the probe is immersed in the solution.

I will place physical WPU driven by a digital pin to limit current flow to when sampling the cell. As a final measure I will place a rectifier inline with the probe so that any small stray voltage of <0.7V is blocked.

Oddity: during simulations it appears that leaving analog inputs active when using WPU digital inputs on other pins in the same port leads to erroneous digital lows being sampled on WPU pins. By switching back to digital pins after doing the ADC sample, WPU pin sampling returns to normal.

It might be interesting to see if that effect occurs in the real circuit.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…