Electronics notes/Pressure sensing

From Helpful
Jump to: navigation, search
This is for beginners and very much by a beginner. It's meant to try to cover hobbyist needs, and as a starting point to find out which may be the relevant details for you, not for definitive information.

Some basics and reference: Volts, amps, energy, power · Ground · batteries · resistors · changing voltage · transistors · fuses · diodes · varistors · capacitors · inductors · transformers · baluns · amplifier notes · frequency generation · skin effect


And some more applied stuff:

IO: IO and wired communication · localish communication · wireless (ISM RF, GSM, RFID, more) · 802.11 (WiFi) · 802.15 (including zigbee)


Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · Bluetooth serial · JY-MCU · DMX · ESC/POS notes

Audio notes: basic audio hacks · microphones · amps and speakers · device voltage and impedance, audio and otherwise ·

Less sorted: Common terms, useful basics, soldering · Microcontroller and computer platforms · Arduino and AVR notes · ESP series notes · Electronics notes/Phase Locked Loop notes · mounts, chip carriers, packages, connectors · signal reflection · pulse modulation · electricity and humans · Unsorted stuff


See also Category:Electronics.

Pressure transducers

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Pressure transducers measure force, usually based on a piezoresistor in a Wheatstone bridge construction.

The design around the basic sensor (physically and electronically) makes a specific sensor useful for, say, measuring barometric air pressure, water pressure, kitchen scales, bathroom scales, or whatnot.

Lower-pressure fluid sensors often have the sensor in silicon (or a similar substance) that the fluid presses against. High-pressure sensors (or those that use reasonable torque for accuracy, e.g. kitchen scales) may be a metal construction (ceramic?(verify)).


Limitations/considerations:

  • The basic sensors are sensitive to temperature (being resistor-based). Cheaper variants are not temperature-corrected, but in some situations you really can't do without such correction, and it may cost only a few bucks more. (Adding a temperature sensor yourself is possible but bothersome, as at best you're measuring something near the pressure sensor but not quite temperature of the sensor circuit itself - environment but not medium.)


  • The basic sensors are also sensitive to vibration simply because they respond quickly to force changes
    • in practice, force physically coupled to the sensor's exterior may do it, though this is often relatively negligible unless the environment vibrates. Some fancy sensors correct against this using separate acceleration measurements.
    • via the medium. Liquids are incompressible, so direct contact to them will mean even small forces can be delivered efficiently to the sensor
      • You could have some air to act as a physical lowpass. A circuit lowpass or digital lowpass may behave more predictably than that.
      • It may also matter that air/gas volume varies much more easily with temperature than liquids do, which can matter when measuring relatively low pressures. (gases may easily vary half a dozen percent over ~20 degrees, liquids usually well below 1%


  • If measuring water
    • a stillwell construction can sometimes come in handy
    • see note above on water/air in a small hose
    • consider what freezing temperatures (if relevant) do to your setup - things not breaking is good, but also consider that ice in a thin hose will both block pressure and may cause false signal in itself.


  • See also 'sources of error' below


Fluid pressure

These may be targeted at different media - e.g. only gases, liquids as long as they don't attack the plastics in the sensor (the force often goes via a thin film of silicon or something like it).


For measuring water heights, roughly: (with some of the common specs bolded)

10 meters of water 100 kPa 1 atm 1000 mbar (1 bar) 15 psi 400 inches of water
3.5 meters of water 35 kPa .35 atm 350 mbar 5 psi 140 inches of water
1 meter of water 10 kPa 0.1 atm 100 mbar 1.4 psi 40 inches of water
0.7 meters of water 6.8 kPa 0.07 atm 70mbar 1 psi 27 inches of water

...and you may like online conversion apps like http://www.unit-conversion.info/pressure.html - and something like wolfram alpha may be convenient)


Types

For liquid/gas constructions, the sensor construction can be:

  • Differential - compares pressure on two pressure ports (that you can connect things to). (In theory the sensor is differential, but by fixing what's on one side, you can create:)
  • Gauge - pressure readings are referenced to the atmosphere around the sensor (through a hole in the sensor).
    • Sometimes called vented gauge, where sealed gauge then refers to comparison against a fixed pressure (of approx. 1 atm); see 'barometric' below
    • Example use: measure water level, corrected against local air pressure.
    • Note: Differential with one port unconnected or a hole is effectively gauge.
  • 'Relative' can refer to differential and gauge (verify)
  • Barometric (a.k.a. sealed gauge)- comparison to a fixed barometric pressure (e.g. ~101kPa). Pressure range is often either narrow around usual barometric pressure, or from a small fraction of atmostpheric pressure to a little above the usual atmospheric pressure so that you can use these for applications height sensors in planes, like weather statistics, and such.
  • Absolute - Will output zero at full vacuum (Has (near-)vacuum on one side)
    • useful when you need a vacuum reference, as creating one yourself is finicky. Maximum pressure varies by design.
    • no polarity change (anything effectively differential does change polarity)
  • Vacuum - ranges from atmospheric (zero output) to vacuum (higher output)



Wiring:

From an electronic perspective, come in a few variations:

  • 2-wire
    • simple resistive sensor, loop-powered
    • often 4-20 mA for the range (non-ratiometric)
  • 3-wire or 4-wire (or sometimes 6-wire(verify))
    • usually ratiometric (direct bridge output, or amplified version of it) (verify)
    • may be the unamplified sensors (millivolt-scale output), and you'll probably want an op amp
    • or the amplified version of that (magnitude usually related to supply voltage)
    • may be biased (have a voltage offset) (particularly if differential(verify))
  • serial interface (I2C/TWI, SPI, or even RS232)
    • implies amplification, and probably calibration and reference too, as that's part of the design of or board you're communicating with
  • a combination - I've seen some with both I2C and 5V-scale ouput


For non-amplified sensors, doing the amplification from millivolts span to few-volt span (and biasing) yourself will require a few-opamp construction, a few resistors, and a little soldering .

One of the upsides of a sensor with serial communication is that a bunch of sources of error are handled for you, including any effects (voltage drop, interference) on the wire going to the sensor.

On error

This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)
Price versus accuracy: (verify)

To adjust your basic expectations within an order of mangitude:

  • In cheaper sensors (less than 20 USD/EUR) you can expect output error to be on the order of 2 to 5%. More when not temperature corrected at all.
  • Better, moderately-priced (say, 50 to 100 USD/EUR) sensors regularly have output error within 0.25 .. 1.0%FS (verify).
    • High-accuracy / high-stability variants may have an output error of something like 0.05%FS to 0.1%FS
    • May well come in a metal casing
    • These are regularly actually one of the sensors mentioned before plus a signal conditioning IC that corrects as much as it can (verify), particularly known non-linearities.


Error sources

There are a number of sources of error affecting overall accuracy. Their magnitude is often given in how much they affect the signal over the full span - percent per full span (%FS).

Error sources include:

  • (non-)linearity - the degree to which the output-voltage-as-a-function-of-pressure graph deviates from a straight line
  • temperature errors - particularly before but also after possible correction (e.g. 0.5%FS per 10°C)
  • pressure hysteresis - the difference the sensor shows at the same pressure in a pressure cycle
  • temperature hysteresis - same idea, for temperature
  • short term repeatability - difference in output before and after a series of shortish pressure cycles. (apparently particularly relevant at lower pressures(verify)). Not regularly reported separately
  • long-term (in)stability - output will often drift in the long term.
  • zero & span offsets - the actual signal at zero pressure at full pressure. Is error only if you don't calibrate at time of installation.
  • orientation sensitivity - (can often be calibrated away for fixed positions)

Some errors are very repeatable and can be calibrated away fairly easily, in particular the zero offset and span offset. Some can be lessened with some extra bother, for example long-term drift if you can do occasional recalibration. Some things are largely just physical/design limitations and are usually considered unavoidable, such as hysteresis and linearity.


Different reported error values may

  • be too pessimistic (include offsets that you can easily calibrate away)
  • be too optimistic (e.g. only linearity and hysteresis, not repeatability)
  • often combine multiple figures. There is often a precision figure that adds the errors from non-linearity, hysteresis, and regularly also repeatability - and may well separate the temperature error that may still be small but still present after correction

While not very settled terms, 'Residual error' tends to refer to a decently corrected signal still with the stuff you can't easily remove (but isn't a strictly defined term), while things like 'maximum error' tend to refer to a near-pathological case of every error combined.


Further notes:

  • If you need temperature correction, get a sensor with that done on-chip. It will always be more accurate than doing it yourself, and that method separates it from other errors better(verify).
  • if you use an unamplified sensor, your own amplification circuit may have its own temperature dependence that will effectively be error.
  • the less of the full span your application uses, the larger the effective error on your measurement. This means it interesting to choose closest pressure range (also noting resistance to peak pressures).


See also:

Notes on amplifying from millivolts to volts

Say you have an unamplified pressure transducer, four pins from the wheatstone bridge.

You'll have to amplify (and possibly bias) that voltage yourself. (You can connect such a thing without amplification, but a even a better-than-average resolution ADC referenced to something like 1V will still give you fairly miserable resolution.)


To amplify a low-voltage signal you need an op amp construction (you'll probably want a rail to rail op amp, with a small temperature coefficient on its output voltage).

Since I don't know enough about op amps yet I followed this example (you'll probably want to change the gain for your case), bought a quad op amp IC , some resistors and a capacitor for a total cost of around EUR 3 or 4 (given a decent op amp instead of the cheapest).

There are other interesting constructions, for example using potmeters or jumpered resistors for adjustable gain and bias, and for other kinds of sensors (the above seems specifically for differential-gauge sensors(verify)).


Interesting things I read on the way:

  • Practical Arduino: Cool Projects for Open Source Hardware (page preview from google books)



See also

See also: