Terminal boards for WebControl

What if averaging many samples to see if the noise can be filtered out that way?  Since pH change in pool takes long time, average in PLC might help.  Like reading 100 or even 1000 times, add each reading into a VAR, then divide that by the sample times put into another VAR.  In this way, you can see if the noise is up and down around the actual value or not.
 
LarrylLix said:
Past Average = (Past Average + Current Reading) / 2

or

Past Average = (Past Average x 9 + Current Reading) / 10
 
Both these tend to skew data on recent short-term noise.
I've found far better results not doing a moving-average, but simply accumulating 1000+ samples and dividing.
After the divide, store the result in a register for later use, zero the counter and accumulator, and start again.
RAW ADC values are only 10 bits. In a 32-bit counter, you can accumulate 2^22 times before you overflow.
Accumulating 1000 (or 1024) samples is well under this.
Indeed, with a 32-bit counter, you can peel off the top 10 bits for a counter (can count to 1000 easily), and still fit the sum of a thousand 10-bit reads in the lower bits.
Use of shift or AND can peel off the components easily.
 
Both these tend to skew data on recent short-term noise.
I've found far better results not doing a moving-average, but simply accumulating 1000+ samples and dividing.
After the divide, store the result in a register for later use, zero the counter and accumulator, and start again.
RAW ADC values are only 10 bits. In a 32-bit counter, you can accumulate 2^22 times before you overflow.
Accumulating 1000 (or 1024) samples is well under this.
Indeed, with a 32-bit counter, you can peel off the top 10 bits for a counter (can count to 1000 easily), and still fit the sum of a thousand 10-bit reads in the lower bits.
Use of shift or AND can peel off the components easily.
Depends how long you have to wait also.
The second best is to find if the noise has a native frequency and get in sync with it creating a digital filter, averaging all the components of the waveform period.
The best is to eliminate it
 
by accumulating different number of samples, you may see the native frequency.  With noise level so much, it is hard to see it.  Because PLC executes really fast, it can execute 1000 lines in one seconds, you may want to accumulate 100 to start, and go up to 1000, to see any difference.  Put that in a loop, then average it to see the differences.
 
by accumulating different number of samples, you may see the native frequency.  With noise level so much, it is hard to see it.  Because PLC executes really fast, it can execute 1000 lines in one seconds, you may want to accumulate 100 to start, and go up to 1000, to see any difference.  Put that in a loop, then average it to see the differences.
The simple looping tests I ran came to about 1600 lines per second.
 
Ross, I received a terminal board v2.1 with the regulator. There are no holes for the second bypass cap and the 10uF tantalum cap on the board even though they were included in the package. How to handle with them? Should they still be soldered between the ground and regulator pins as instructed with the v.2.0 board?
 
JP12 said:
Ross, I received a terminal board v2.1 with the regulator. There are no holes for the second bypass cap and the 10uF tantalum cap on the board even though they were included in the package. How to handle with them? Should they still be soldered between the ground and regulator pins as instructed with the v.2.0 board?
 
The holes are there, they're just "easier to use" on the 2.1 board.
On the attachment below, I've marked in red for the 100nF caps, and in yellow for the tantalum.
 
The tantalum and 100nF (on right) can be swapped without any negative effects.
The 100nF beside the regulator would typically go on the component side of the board, but if the heatsink for the regulator is going to foul it, it can be installed on the underside of the board.
 
Hope this helps.
 

Attachments

  • webamp-2.1-caps.jpg
    webamp-2.1-caps.jpg
    57.1 KB · Views: 9
So....after a long time and many hours trying various options I have concluded that the only reliable way to get pH and ORP readings from a pool, with noise and ground loops, is to use an ISOLATED ph and ORP transmitter.
 
There are many options but most output 4-20mA for use in PLC controllers.  It's just a matter of adding a 500R resistor in parallel to the 4-20mA output to get 2-10V.  (Ohms law: V = mA *  500R).
 
I used these in the end: https://www.atlas-scientific.com/product_pages/industrial/orp_transmitter.html and https://www.atlas-scientific.com/product_pages/industrial/ph_transmitter.html
 
There was still a little noise on the output of the pH transmitter though, but nothing that a simple RC Input filter didn't take care of.
 
Hope this helps other trying to do the same.
 
Surely you could have that special interface to get the reading. Most ORP sensor output is between 0-900mV, so that with WC32IO gain set around 5, you could get the reading mostly in the full 0-5V scale. Or you can get an analog interface board from Ross for the WC8 board.  PH value calculation also involves in water temperature. So there will be little calculation in the PLC code.
 
CAI_Support said:
Surely you could have that special interface to get the reading. Most ORP sensor output is between 0-900mV, so that with WC32IO gain set around 5, you could get the reading mostly in the full 0-5V scale. Or you can get an analog interface board from Ross for the WC8 board.  PH value calculation also involves in water temperature. So there will be little calculation in the PLC code.
How do I contact Ross to get a interface board?
 
I am sorry, but I do not know how to contact him through the board and do not have his website address. Can you please let me know how to do either or both?
 
Back
Top