Air Pressure - SM5420C

I'm working on a project that uses these SM5420C absolute air-pressure sensors, and I have a question about their analog output.

In the datasheet it shows that they have a +SIG and -SIG analog pin, and my question is whether you have to utilize both of them and do some kind of comparative analysis, or if using just the +SIG to an analog pin would be sufficient for detecting a positive or negative change in pressure; the actual absolute amount isn't necessary in my application, just the ability to detect a change.

When I hook up the sensor's +SIG pin and do an analogRead(), it stays stable right at a value 523, which does go up with increased air-pressure applied, and down with a vacuum, so it does respond in this setup. I'm just confused by -SIG, and whether my readings will be meaningful without it.


It's a wheatstone (full) bridge and you should be able to get actionable information from one leg, but without an amp the change in analogRead() will be small. Not the normal way to use it, 'course.

thanks for the info.

I haven't ventured into the world of op-amps as-of-yet. If there's any additional guidance you can offer such as what sort of op-amp I'd be looking at to interface this with an arduino either through a single leg or both, that would be much appreciated.

The whole thing is explained quite well in the evaluation kit Documentation.


I hadn't seen that document yet, thanks for pointing it out. I'll study on it a bit. :slight_smile:

The easy-to-use HX711 with channel B (32x gain) would give you about 80% of the full range. If you need full range, you could use something like the ADS1115. You'd use +SIG and -SIG with both devices.

thanks again, and I have one more probably-stupid question:

do these sensors have to have a pressure differential from their inlet to the atmosphere surrounding their housing such as by connecting a tube from the sensor's inlet to the pressure chamber, or can they be completely disposed within the pressure chamber with only the wires passing through the pressure chamber wall?

If you only want to detect a (big) change in pressure, then connect the two outputs of the sensor to two analogue inputs.
Subtract the two A/D values you get from each other to find the difference (positive or negative).
Don't expect a lot from these unamplified sensors (~20 A/D values over the whole pressure range).
You should have bought sensors with buildin instrumentation amp.

I didn’t realize you could read negative analog values. Are there any particular measures to take when doing so?

and yeah, these don’t seem to be the optimal sensors to use, but they were what was already in the drawer, so I decided to give them a go. And it may be a good opportunity to learn about op-amps, so silver lining…

On that note, I tried looking around for the hx711 op-amps, and they don’t seem to be readily available. All I could find are pricey break-out boards that are on back-order at the major distributors. I’m not shy about making my own breakout boards, but that op-amp doesn’t seem to be very available even as a standalone IC. Are there any other recommendations? Or better yet, what sort of specs should I look for to judge the fitness of a given op-amp?

I didn't realize you could read negative analog values.

You don't.

If you connect Vexc (excitation voltage) and Gnd of the sensor to 5volt and ground of the Arduino,
then you have about 2.5volt on both Sig outputs of the sensor.

Pressure changes that 2.5volt slightly, but one output more positive and the other one more negative.
Both return about 512 without pressure, but if one returns 514 and the other one 510 then the difference is 4.

int pressure = analogRead(A0) - analogRead(A1); // should do something.


thanks for that! I'll keep tinkering with it tomorrow and see what results I'm able to get.

On that note, I tried looking around for the hx711 op-amps, and they don’t seem to be readily available.

There are dozens of eBay sellers of inexpensive HX711 breakout boards. You can also get them from Sparkfun, RobotShop, etc.

But if all you need is the “ability to detect a change” (your first post), then using analogRead with +SIG alone may be all you need to do (or +SIG and -SIG as per @Wawa). No one here knows what “a change” means, since you haven’t defined it.

Hooking up both outputs to two analog pins the way Wawa described worked well. It doesn't have to have a great-resolution. If I'm able to detect a pressure change of a small number of PSI, that is sufficient. And this setup achieves that: if I connect a tube to the chip's inlet port and the other to a syringe, the analog difference value rises from 21 to over 30, and approaches 0 if I pull a vacuum.

One thing I'm wondering, though, is this is an absolute pressure sensor with a range of up to 15 PSI. But atmospheric pressure itself is ~14.69 PSI. So does that mean the sensors is basically maxed-out in atmospheric conditions?

okay, please excuse one more stupid question....

I'm still not comfortable with my understanding or use of op-amps, but I did find a package of LM358N (datasheet) and MC1458 (datasheet) op-amps in my toolkit. Will these be at all useful with this sensor? I'm looking at the datasheet, but like I said, I'm still not sure what it is I'm looking at exactly (I learn far better through example), so any tidbits anyone can share would be much appreciated to help it all come-together for me.

From what I've read so far of the various ways op-amps can be set up, it sounds like I need to use it as a differential amplifier of the two outputs of the SM5420 to get a single analog value that reflects the difference between the two inputs. Is that correct?

{edit - tried some stuff out}

Okay, I made some progress. Right now I have things connected as shown in the schematic below. I originally started out with R1 and R2 both equal to 51K, then switched one resistor to 100K (tried it in both places) and tried it again, and seem to have improved resolution.

With each resistor placed as shown in the schematic, analogRead() returns a consistent value of 307-308 with a range of approximately +/- 210. If I swap resistor positions, then it analogRead() returns a value of 650-651, but with a range of only about half the other configuration.


So, functionally it seems okay, but I'm sure there are ways to optimize, and I'm still not real clear on how I would go about intentionally dialing-in the gain/range other than "let's see what happens if I...", and then after enough trials I'll pick up on the pattern.

Also, are there places I should place any caps to smooth the output?


Wrong diagram for a Wheatstone bridge sensor.
You need an instrumentation amp (three opamps).

okay. could you help me get a little more insight on what is happening in that schematic? clearly something is happening, and the output behaves as I would expect.

Uneven or single-ended amplification of the sensor results in readings depending on pressure as well as supply voltage variations. You really need an instrumentation amplifier that amplifies both outputs of the sensor with two opamps, and sums them with a third one.

alright, I read up a bit on in-amps, and came up with the following configuration. Is this looking more appropriate?:


This gives me 294-295 at atmospheric pressure on the analog pin, with a span of a >200 +/- in each direction for increases or decreases in air-pressure, respectively.

I noticed that this configuration does not use a Gain Resistor between the two buffer op-amp outputs. Does that detrimentally affect performance in any meaningful way?

Are there additional ways to improve this circuit?

And FYI, I did go ahead and order a couple hx711 boards, and they will arrive next week. But this seemed like a good opportunity to learn about op-amps, so I wanted to dive in full-bore instead of copping out and buying something off-the-shelf just because its easier.


I think it's more common to use the input amplifiers for gain (with a common gain set resistor), and the third opamp only as adder.
Your circuit is using the input opamps as buffers (with a gain of 1) and the third opamp for gain.
Not sure what''s best.
Restrictions are the limited output swing of an LM358 (~3.5volt on a 5volt supply) and Arduino's 10-bit A/D.
Let us know how you get on with the HX711.

alright, HX711 arrived today, and I gave it a quick shot after looking at some examples of how load-cells are connected and read using the HX711 library.

aaaaaannnd, I’m getting some pretty screwy looking outputs.

I have it connected thusly:

HX711 Arduino
DT —> 11
SCK —> 10
VCC —> 5V

HX711 SM5420C
E+ —> Vexc
E- —> GND
B+ —> SIG+
B- —> SIG-

This is the code I’m using to read the values:

#include "HX711.h" 
#define DOUT  11
#define CLK  10
HX711 scale(DOUT, CLK);
void setup() {
void loop() {

And here is the serial output:


I tried altering the pressure going into the sensor to look for any sort of response, and there didn’t seem to be any at all.

Clearly I’m doing something wrong here…