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.

  • \$\begingroup\$ 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. \$\endgroup\$ – Andy aka Dec 12 '15 at 11:23
  • \$\begingroup\$ Supply is perfectly okay. I need a programming tweak. As it is a flow/pressure sensor hence it keep fluctuating its value. \$\endgroup\$ – yogesh singh Dec 12 '15 at 11:27
  • 1
    \$\begingroup\$ Well, without knowing what the data looks like this is difficult to answer. \$\endgroup\$ – Andy aka Dec 12 '15 at 11:29
  • \$\begingroup\$ No, add a picture showing the data and also what you'd expect to see. Nobody can answer this properly without good data. \$\endgroup\$ – Andy aka Dec 12 '15 at 11:43
  • \$\begingroup\$ Showing an array of data will be fine. The largest, the better. \$\endgroup\$ – shortCircuit Dec 12 '15 at 12:02

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


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.