ryangriggs
Lifetime Supporting Member
Hello, I'm working with a PLC reading a basic 4-20mA 0-100 PSI water pressure sensor which is used to measure an elevated water tower tank level. The working range is between 45-52 PSI for our application, which yields a tank level of between ~20 and ~34 feet. My conversion formula is ((PSI * 27.71) / 12) - 89.9.
I'm noticing that the 4-20mA module's reading is quite jittery. It can change by more than +/-0.5 to 1 PSI per sample. This could be either the transducer output or inaccuracies in the ADC.
The PLC normally reads the analog input at approximately 40Hz. However, for this application, I am only sampling the input every 500 mS.
Obviously even a 0.1 PSI change causes approx 0.2 FT level change. However, the actual tank level usually changes very slowly and smoothly based on usage (i.e. 10-15 minutes per foot).
I want to output a very smooth value, accurate to 0.1 FT, which smoothly transitions from one tenth to the next, accurately representing the actual level changes.
I'm using a very basic CLICK PLC, which doesn't have fancy filtering instructions. I have implemented a sample rate of 500mS, and have applied a moving average low-pass filter three times (is that equivalent to "third order"?) and this seems to help a lot. However, I still see a small amount of jitter on the final filtered output, meaning the value can jump from 25.7 to 25.5 then 25.8, 25.6 etc... over a few samples.
Should I just increase the filtering by another order? or is there something else I should also implement?
Thanks for any advice!
I'm noticing that the 4-20mA module's reading is quite jittery. It can change by more than +/-0.5 to 1 PSI per sample. This could be either the transducer output or inaccuracies in the ADC.
The PLC normally reads the analog input at approximately 40Hz. However, for this application, I am only sampling the input every 500 mS.
Obviously even a 0.1 PSI change causes approx 0.2 FT level change. However, the actual tank level usually changes very slowly and smoothly based on usage (i.e. 10-15 minutes per foot).
I want to output a very smooth value, accurate to 0.1 FT, which smoothly transitions from one tenth to the next, accurately representing the actual level changes.
I'm using a very basic CLICK PLC, which doesn't have fancy filtering instructions. I have implemented a sample rate of 500mS, and have applied a moving average low-pass filter three times (is that equivalent to "third order"?) and this seems to help a lot. However, I still see a small amount of jitter on the final filtered output, meaning the value can jump from 25.7 to 25.5 then 25.8, 25.6 etc... over a few samples.
Should I just increase the filtering by another order? or is there something else I should also implement?
Thanks for any advice!