I am working with Omron Pressure sensor D6F-PH . When i try to read the pressure value i am unable to get a stable value. I tried averaging but even that doesn't help. Could somebody suggest me a trick/ techniques to help in my situation.
-
Use a decent power supply to power the device and make sure you have capacitor decouplers on the power supply lines into the device. Read the DS - there are some comments about ground and frame ground that may apply to your set-up. – Andy aka Dec 12 '15 at 11:23
-
Supply is perfectly okay. I need a programming tweak. As it is a flow/pressure sensor hence it keep fluctuating its value. – yogesh singh Dec 12 '15 at 11:27
-
1Well, without knowing what the data looks like this is difficult to answer. – Andy aka Dec 12 '15 at 11:29
-
No, add a picture showing the data and also what you'd expect to see. Nobody can answer this properly without good data. – Andy aka Dec 12 '15 at 11:43
-
Showing an array of data will be fine. The largest, the better. – eventHandler Dec 12 '15 at 12:02
-
What is "ahu", "5 frequency", and "dp"? – EM Fields Dec 12 '15 at 12:09
-
Perhaps the pressure is fluctuating. – Chu Dec 12 '15 at 12:13
-
AHU- air handling unit 5hz dp- differtial pressure. at 5hz 1 to 2.1 , 10 hz 4.2 to 10.6 , at 15 hz 5.1 to 13.8 , at 20hz 10.8 to 21.3, at 25 12.7 to 25.5 – yogesh singh Dec 12 '15 at 12:13
-
@Chu but analog sensor showing constant value – yogesh singh Dec 12 '15 at 12:19
-
Do analogue gauges have mechanical damping? – Chu Dec 12 '15 at 12:21
-
Sorry i don't know about that. – yogesh singh Dec 12 '15 at 12:22
-
Try taking measurements with the AHU turned off. If it's still jumpy, you have a problem with your system. At a start, how long is your i2c wiring? – WhatRoughBeast Dec 12 '15 at 15:51
1 Answers
The first thing to do is look carefully at the electronics around the sensor, particularly its power feed. Make sure the ground is solid and well connected back to where the measurement is being done, and that the supply is clean.
I'd put maybe two ferrite chip inductors in series with the supply, and 20 µF or so to ground after each. That should smooth out ripples from switching noise and the like. If the supply voltage is not well regulated, then use a bit higher unregulated supply voltage, add the ferrite chip inductors and caps, but have that feed into a LDO which then feeds the transducer.
Once you have the electrical side clean, the rest is firmware. You said you "averaged" the values, which implies a naive box filter. Sample the signal as fast as your micro can handle, then apply maybe two poles of
FILT <-- FILT + FF(NEW - FILT)
Each of these is the digital equivalent of a R-C low pass filter. Figure out what step response you really need, and adjust the filters accordingly. This has been discussed many times here before. For example, I go into detail on such filters at https://electronics.stackexchange.com/a/30384/4512.

- 310,974
- 36
- 428
- 915