pH Sensor Measurements Application help

mike64b

Member
Join Date
Oct 2011
Location
richland
Posts
77
Hi all,

I'm dealing with something here that is probably not that best way to do this but I'm going to give it the best shot I can. If it fails, it fails..

Moving on, I've got a pH sensor (and conductivity sensor, but we'll stick to pH for now) and the application will be measuring run-off water that may have various contaminants. It's possible for the contaminants to come in gobs or be a stream, but it should be detectable.

I'm looking at the best way to implement a type of verification that shows we are in an acceptance range for clean water. Note the runoff water will happen for about 20seconds give or take and my AB analog card updates at 103mS. What I've got so far is:

1. Store first sample in the accumulator, acc1 = input.

2. Future samples (all the way to 20seconds) (lowpass): acc1 = (9*acc1 + input)/10

3. After 5 seconds we begin testing input values to be in a pass range so first we set acc2 = acc1 initially, and if inputs are out of range throw them away: IF (input > (acc2 + epsilon)) OR (input < (acc2 - epsilon)) [Throw away input ] ELSE acc2 = (9*acc2 + input)/10

4. We count up all the thrown away samples, and assuming we have a good acceptance range (less than 20% of samples thrown away), we will use our acc2 filter value to check if it is within the acceptance range for clean water at the end of the test.

5. If more than 20% of samples are thrown away, we use the acc1 filter to test the clean water acceptance range. (If more than 20% of samples are thrown away, it's likely that gobs of contamination were passed through).


Does this sound like a good way to do this? I'm not familiar with this area so I'd love some advice. Thanks!
 
No this is no good practice!

You will lose the qauntity*contamination factor.
For every ten units of flow you will have to measure the pH.
the result should be flow*pH.
then you can average it by taking all samples in database and do a math on it.
 
Shooter thanks for the reply,

I'm not quite sure I understand what you mean by losing the quantity*contamination factor, also what do you mean by units?

Like I said in my post my analog input updates every 100milliseconds or so..
 
suppose:
you have 1 waterbucket/minute dirty(100%) and 8 halfwaterbuckets/minute clean (total 5 units
your real contamination is 20%, so your contamination if you do this measurement every second (fast enough) you will have only 11% contamination
you are only correct if the flow is staedy.
 
Hmm I think I sort of understand what you're saying, but unfortunately I don't have a good enough understanding of this stuff yet to be sure..

I would say however that my flow during the main middle period of the 20 seconds (say from 3sec -> 20 sec) should be steady
 
Bit of an off-side question, but do you know if your pH meter's response is even quick enough for you to see this "fast moving" contamination? If you're waste stream contains half a bag of sodium hydroxide going by in 20s you'll probably see at least some change, but the meter may not reach a steady state for at least 10-15 seconds. The rate of change will also change as the electrode ages.

I would personally test the response of the pH meter with a known contaminant stream before spending ages on the programming... it might not work quite how you expect.

I'd think the conductivity meter would have a faster response, but again without knowing what gloop you're testing...
 

Similar Topics

Hi everyone, I am working with micro850, a proximity sensor (FOTEK, PL-05P) and a 3DOF serial arm robot. I use MC_MoveRelative to control the...
Replies
1
Views
94
Maybe a stretch to call this a PLC question, but it does connect to a PLC input. I have two German switches: Sick WL9LG-3P2232 And a...
Replies
0
Views
121
Hi, Need help with coding for a faulty component sensor which we are using a push button as we are using a test rig. the plc is a allen bradley...
Replies
4
Views
226
Hi all, I am implementing an incremental encoder sensor (ABZ) to replace the existing "manual" encoder wheel I have in my device. This is a 360...
Replies
0
Views
181
I am looking for temperature/humidity sensor recommendations. Would like the sensor to display temp and humidity. Need to connect to a Contrologix...
Replies
4
Views
238
Back
Top Bottom