Skip to main content

A Plethora of Pressure Sensors

It used to be there were very few ways to sense air pressure with the NXT… but over time a number of different companies have come out with third party pressure sensors for the NXT. It’s something that I’ve been interested in for a while: I’ve used pressure sensors for determining altitude during hikes, monitoring high-altitude balloon flights, technical geyser investigations, and lots of other things… so it seems natural to try to compare some of the sensors currently out there in the NXT market. Warning – this is my own personal testing and opinions. It may be wrong. And in the interest of full disclosure, most of these companies have been extremely helpful to me by providing sensors to test and responding to feedback… but still, this is as closeas I can come to an unbiased position. I have pressure sensors from four companies currently: HiTechnic, Vernier, Mindsensors,and Dexter Industries. All of them interface easily with the NXT, using NXT-G blocks, NXC code, or other drivers. Most of them (all except HiTechnic’s) can be “plugged in” to an air line like the LEGO pneumatic tubes or standard aquarium/sized tubing, which is handy for a lot of things. For this I tested all of them under NXT-G 1.0, and used whatever way seemed best to get the highest resolution readings I could from the sensors (sometimes using manufacturer-supplied blocks, sometimes reading the sensors in a “raw” format, etc.). So, without further ado… here we go.

A comparison of four sensors all on the same NXT, attached to the same manifold. I could pump air in and out using a pump based on a large syringe with two one-way valves. First the pressure was reduced (you can see the individual pump cycles in some cases) and held low, then the seal was broken to bring the pressure up as rapidly as possible, before the same pump was used to increase the pressure.

A detailed graph of the very first depressurization event, showing how the four different sensors respond to a sharp change in pressure. The Dexter Industries sensor was not involved in this test (due to software issues), but was tested and is described below. Notice how the Vernier Barometric sensor (purple line) stops dropping even as the pressure continues to be reduced, "bottoming out" at the lower end of its range.

Dexter Industries dPressure250 and dPressure500:

Cost: $28 for the 250 kPa version (up to 30 psi), $32 for the 500 kPa (70 psi) sensor.

Response time around 1 ms, analog, stated resolution of 250 Pa, although this varies across the range slightly (sensor reads all the way down to at or very near 0 kPa). The only true differential pressure sensor, with two ports (one for “negative pressure”, one for “positive pressure, clearly labeled”), this is the only sensor that can do an on-the-fly comparison of the pressure in two separate systems of tubes (if you want to build a Pitot air-speed sensor, this is the sort of thing you want. Non-linear response really makes it easiest to read this with the stock NXT-G blocks (but I couldn’t do this under NXT-G 1.0, this was not tested equally to the other sensors here). The 1/8th inch ports are easy to use (if small for some uses). This sensor reads fastest of all in this review, as it is can be read as a simple analog sensor (with a light sensor block, for example) once every 7 ms, although the sensor seems to have a longer physical lag time than that so it is not “really” as fast… but it’s still faster than any other sensor it seems. The biggest drawback may be the low pressure resolution… while fast, this isn’t as detailed as the other sensors here. The dual ports however are a unique feature that may be exactly what you need in some cases. Some care needs to be taken with the bare circuit board design style, but the sensor element itself is well mounted and I had no worries about it breaking off.

Vernier Gas Pressure sensor:

Cost: $83, (but you need to use $39 Vernier adaptor as well, potentially making this a $122 sensor)

Very fast response (purported to be 0.1 ms, but there’s no way to verify this on the much slower NXT). Reads from about twice atmospheric pressure all the way to zero (range of 210 kPa to 0 kPa), with a measured resolution of 240 Pa (note that Vernier lists a much higher resolution almost 5000 times better… but this isn’t available using the NXT’s internal analog-to-digital ability). Damaged above 4 Atm (60 psi or 405 kPa), this is a sensor that can handle high pressure and give you reasonable accuracy, considering the range. As an analog sensor, can be read as fast as any other (about 7 ms in my testing set up), but using the Vernier stock blocks it takes slightly longer at around 9.5 ms. The provided tube rapidly twist-locks to the sensor, and has a good valve and a universal adaptor at the end common to chemistry and physics departments (almost certainly the best supplied tubing set-up of the bunch, a feature shared with the sister Barometer sensor below). While the sensor housing is bulky, the long cables (this is an analog sensor) allow it to be used in a variety of situations… although for exactly the same reasons, using Vernier sensors with small mobile robots tends to be a problem. The very linear response, and high speed of this sensor are fantastic… but you certainly have to pay more for that. It should also be noted that there’s a reason for the higher cost… the Vernier sensors have very high resolution compared to the others here, but Vernier has never come out with a stand-alone AtoD converter that would allow the NXT to access this. I keep wishing; a basic 16-bit AtoD reader would make these (and a host of other analog sensors) potentially much higher resolution, really justifying (for NXT users) the higher cost. Does anyone at Vernier read these J ?

Vernier Barometric sensor:

Cost: $71, (but you still need that $39 adaptor, making the effective cost perhaps $110)

Again, very fast (on the order of 1 ms) response time. Almost identical to the Vernier gas sensor in look and function, but with a higher resolution (and more range-limited) sensor inside (everything I said for the cables, form, and tubing supplied with the Vernier gas pressure sensor holds for this as well). Instead of reading from zero to a high pressure, the sensor is limited from a lowest reported pressure around 84 kPa, to a highest reporting pressure of about 121 kPa… but that means over that range (about 80% of normal pressure up to 120%) the resolution is much better, around 25 Pa (again, it could be better… Vernier claims this sensor has resolution at the level of 1 Pa or so, but you can’t get this with the NXT’s lower resolution AtoD conversion). This comes with a caution – the sensor can be broken if subjected to more than around 2 Atm (203 kPa) pressure, so this is not a sensor for high-pressure environments… but for detecting small rapid changes at or near normal pressures, it’s hard to get better than this, period. Again the tubing kit, valve and adaptor are superior, and very handy. This is probably my most frequently used pressure sensor… but I must admit it comes with a large pricetag (note: this is one of the sensors I had to spring for myself… and even at the over $100, I’ve never regretted it. Your mileage may vary).

Both these Vernier sensors require an adaptor to interface with the NXT:

Cost $39

Bulky with a long cable. Not for compact mobile robots, but used with all Vernier sensors, so you can at least swap it in and out of different experiments (i.e. – no need to get one with every Vernier sensor you own… you just need one for each port that’s going to be hooked up to a Vernier sensor. And Vernier has… a lot of nice, unique, sensors).

HiTechnic Barometer NBR-1036

Cost: $55

Very slow response… while the sensor can be polled rapidly (once every 16 ms or so), the response to changes in pressure (as can be seen on the graph) is much much slower... not in 10’s of milliseconds, but in tens of seconds! Actually, for a barometric sensor, designed to respond to slow changes in pressure, this is the sort of response you want – the sensor is averaging out all sorts of short-term changes & noise to give you the best estimate to the true, ambient, weather-related pressure. On top of this the sensor also returns the ambient temperature (the only one in this review to do this), so in a real sense this is a “two for one” sensor, still taking only one sensor port. It is also fairly high-resolution, returning the pressure at a 10 Pa level (as HiTechnic claims, and is demonstrated by testing), better than any of the above. It can do both these things because it is not an analog sensor, but a true digital sensor, retuning information to the NXT via the I2C interface. On top of this the NXT-G block has been designed to make it very easy to interpret the pressure changes as elevation changes, making this the most transparent “digital altimeter” available as well. The next time I go hiking and want to log my elevation changes… this is likely the sensor I’d turn to. The casework is the standard high-quality HiTechnic model, LEGO-certified and indistinguishable (except for a small label) from any other LEGO sensor. For fast responses, this isn’t the sensor to get, and it can’t be easily connected to a tube or pipe to measure those sorts of pressures (the only one without a port of some type, probably related to being LEGO-0certified in LEGO-certified casework). But a really nice sensor for weather & altitude related measurements.

Mindsensors PPS58-Nx

Cost: $40

Rapid response, about 16 readings a second… but testing reveals that it will actually read the sensor much faster than this, returning a cached value off the sensor until a new updated pressure reading is available internally. So, what’s the “real” response time? If you are worried about how long reading the sensor “stalls” your program, it takes only about 16 ms… if you are worried about how fast this sensor can report a change in pressure, the answer is closer to 60 ms (about 16 times a second). If you are worried about how fast mechanically the sensor system responds… it’s even a little bit slower than this. If you look at the response comparison, you can see that this sensor takes some time (about a second) to reach the new pressure during a sharp change. So the “real” response time here really depends on what you are curious about… a common problem when discussing things like sensors. The sensor measures from 0 up to about 58 psi (0 to 400 kPa) very nicely, but as an I2C sensor this one, like the HiTechnic version, can have a high resolution: by reading the raw sensor output, it can actually measure the pressure to about the nearest 2 Pa (not exactly like the 1 Pa resolution mentioned in the website… but still amazingly high resolution, and it may have been due to how I was reading the sensor). In more common terms, it can detect a change in atmospheric pressure of just 0.002%, (equivalent to determining a change in depth beneath the ocean of a tiny 1/5th of a millimeter!). This is a ported sensor, and is packaged using the Mindsensors now-standard “doubled circuit board” approach that protects the components inside while making a very strong “sandwich” structure that’s perhaps more robust for damage (note: I’ve always worried about static damaging these exposed sensors… but I’ve yet to have it happen. Perhaps I worry too much). For the highest-resolution measurements on the NXT, this seems to be the best sensor available, and while not the fastest response, it’s a close fourth behind the three-way tie for first in this review.

The Conclusion

If you’ve bothered reading this far, you probably want to simply know “which should I buy”. So, here’s your answer:

I don’t know.

I’ve tested these sensors and used them in a lot of different ways. In robots, altimeters, weather stations, and physics experiments. Weighing objects, determining water depth, and analyzing how a balloon inflates. Each of these sensors has strengths and weaknesses, and which you want really does depend on what you need it to do. Do you need the least expensive (Dexter Industries is the lowest cost option on the market right now)? The fastest (Dexter Industries or Vernier sensors)? High-resolution that’s got a response of a few milliseconds (Vernier)? Ultra-high precision (Mindsensors)? Pressure & temperature at the same time, in one compact sensor (HiTechnic)? Something else? If you want the right sensor for your application… you first have to understand what your application is.

Popular posts from this blog


2023 is the 25th Anniversary of the MINDSTORMS brand. For 25 years, MINDSTORMS has educated and inspired a generation of robot builders, both children and adults. Unfortunately, the LEGO Group decided to end the line on December 2022. Many ROBOTMAK3RS have been passionately involved with the development of MINDSTORMS through the MUP and MCP programs. Even with the newest Robot Inventor line, several ROBOTMAK3RS were invited to submit additional bonus models that were included in the official app. Regardless of the retirement of a major LEGO robotics product line, ROBOTMAK3RS continue to MAKE-SHARE-INSPIRE using all LEGO robotics platforms available to us. Here is the official statement from LEGO. Since its launch in September 1998, LEGO MINDSTORMS has been one of the core ‘Build & Code’ experiences in the company’s portfolio, carrying with it significant brand equity and becoming a stand-out experience for the early days of consumer robotics and leading to current Build & Code

Celebrating 25 Years of MINDSTORMS

In celebration of the 25th Anniversary of MINDSTORMS, we take a trip through history. Please also visit ROBOTMAK3RS Community every week as we highlight different projects all through 2023 in celebration of the anniversary. Some of the early history is based on the content shared by  Coder Shah  in our  MINDSTORMS EV3 Community Group . Some of the text and links may have been edited from his original posts for consistency and clarity.  1984 - Kjeld Kirk Kristiansen watched a TV program called "Talking Turtle," where MIT professor Seymour Papert demonstrated how children could control robot "turtles" using LOGO, a programming language he developed. 1988 - The collaboration between MIT and LEGO resulted in LEGO TC Logo in 1988, which allowed students to control LEGO models using computer commands. The video shows Papert demonstrating TC Logo. 1990 - LEGO TC Logo was hampered since the robots you built had to be tethered to a personal computer. LEGO and MIT

Celebrating MINDSTORMS with a Remix Part 1

In honor of the 25th Anniversary of MINDSTORMS, we asked ROBOTMAK3RS to combine a LEGO set of their choice with a MINDSTORMS set. Here is what these five ROBOTMAK3RS came up with.  MINDSTORMS Chess Assistant by Arvind Seshan Overview: When you are new to chess, it can be a challenge to remember which pieces go where. Now, you can use machine learning and LEGO MINDSTORMS Robot Inventor to build a tool to help you learn where all the chess pieces go on the chess board. Sets used: LEGO® Iconic Chess Set (40174) and MINDSTORMS Robot Inventor (51515) Review: I really like how the chess set base can store all the pieces underneath and that the board neatly splits in half for handy storage. The chess pieces themselves are very sturdy and well built. My only criticism is the building of the box itself. It was quite difficult to see what pieces to use and since the entire box is made mostly of thin plates, it took a lot of time and patience. I would have liked the storage area to be sliding dra