Interfacing MPXV5100 pressure sensor to Atmega8

The MPX5100 series piezoresistive transducer is a state-of-the-art monolithic silicon pressure sensor designed for many applications. Still, particularly it is convenient to interface to a microcontroller or microprocessor with ADC inputs. This is thin-film metallization and bipolar processing to provide an accurate, high-level analogue output signal proportional to the applied pressure. More details can be found here MPXV5100

MPX5100 series piezoresistive transducer

This sensor measures differential pressure comparing to atmospheric so when there is no pressure applied it shows 0kPa;

MPX5100 series piezoresistive transducer internal structure

I was converting ADC value to pressure using this formula:

I didn’t do too much testing to tune it, and I just calibrated it to zero by adding to ADC 0.3 value.
Here I will make an example interfacing it to atmega8. Code is written in C using WINAVR toolkit and AVRLIB library. As you will see, coding with AVLIB is straightforward, just a few lines, but compiled code is not very effective and takes lots of memory.

MPX5100 series piezoresistive transducer to AVR atmega8

And here what results did I get:

MPX5100 series piezoresistive transducer breadboard
MPX5100 LCD results
MPX5100 LCD results

Testing my lungs by blowing air to the straw. You can see 10 kPa.

Here I added an archived demo WINAVR project. You can download and test it on your own.

Have fun.MPXV5100 pressure sensor to Atmega8


  1. Hey, thanks so much.
    I think I may have already commented on your great articles, but again I really appreciate that you’ve done so much.
    However I can’t see the pinout on the MPXV5100. I’m currently trying to implement a water pressure sensor and hope NOT to use op-amps.
    Thanks again for your great work (even if some people don’t comment).
    Cheers, Phil.

  2. Thanks Phil,
    Actually Pinout of MPXV5100 is simple – only three pins are used: Pin2 – VCC, Pin3 – GND and Pin4 – Vout. Other pins (1,5,6,7,8) are not connected. See datasheet.
    In my opinion If your pressure is ranging near full scale, then you don’t need op amp as its output voltage will be in range 0 to VCC. Of course if Water pressure will reach like 5% of a full range, then you might want to add op amp with gain 20 in order to extend Vout value and resolution same way.

  3. Hello,

    Thanks you for this great project.
    I like to use your source files for my sound level detection, but every time I clean and rebuild, it gives this error

    No rule to make target `slegis.elf’, needed by `elf’. Stop.

  4. HI phil and science proj….
    im also actually working on water pressure sensor and with the help of the output im tryin to control the water pump….
    can u help me with this pls??
    and i don require an lcd output..
    thnx in advance..!

  5. Hi
    Could you post the assembler files? I’d appreciate it very much. thanks!

  6. hello sir,
    can u plz tell me how do u get that formula..
    i am just confused about that///////

  7. Thank you for your wonderful work,
    I am planing to use MPXV5100A to measure the absolute pressure.
    would you please help me with the modifications?

  8. Hello:
    This is such a great project!
    I am trying to do something similar with an Arduino board. What is the piece in between the pressure sensor and the breadboard called? Also, Can freescale pressure sensors be used with an Arduino board?

    Thank you!

  9. This is simple IC socket you don’t actually need it. Sensor can be connected practically to any microcontroller. For better result you may need signal conditioning circuit.

  10. Thanks so much sir. This is a nice work. Its a job weldone. And I also salute your desire to develop students and hobbyists like my self who are interested in embedded system. My question is, why did I keep on seeing this error ‘[HD44780]Attempted to write after reading a single nibble…’ when I tried to simulate it on proteaus.

Leave a Reply