Posts | Comments

Planet Arduino

Archive for the ‘measurement’ Category

Necessity might be the mother of all invention, but we often find that inventions around here are just as often driven by expensive off-the-shelf parts and a lack of willingness to spend top dollar for them. More often than not, we find people building their own tools or parts as if these high prices are a challenge instead of simply shrugging and ordering them from a supplier. The latest in those accepting the challenge of building their own parts is [Advanced Tinkering] who needed a specialty pressure gauge for a vacuum chamber.

In this specific case, the sensor itself is not too highly priced but the controller for it was the deal-breaker, so with a trusty Arduino in hand a custom gauge was fashioned once the sensor was acquired. This one uses an external analog-to-digital converter to interface with the sensor with 16-bit resolution, along with some circuitry to bring the ~8 V output of the sensor down to the 5 V required by the microcontroller. [Advanced Tinkering] wanted a custom live readout as well, so a 3D printed enclosure was built that includes both an LCD readout of the pressure and a screen with a graph of the pressure over time.

For anyone else making sensitive pressure measurements in a vacuum chamber, [Advanced Tinkering] made the project code available on a GitHub page. It’s a great solution to an otherwise overpriced part provided you have the time to build something custom. If you’re looking for something a little less delicate, though, take a look at this no-battery pressure sensor meant to ride along on a bicycle wheel.

Counting frequency is one of those tasks that seems simple on the face of it, but actually has quite a bit of nuance. There are two obvious methods, of which the first is to count zero crossings for some period. If that period is one second you are done, otherwise it’s a simple enough case of doing the math. That is, if you count for half a second, multiply the result by 2, or if you count for 10 seconds, divide by 10. The other obvious method is to measure the period of a single cycle as accurately as you can. Then there’s this third method.from [WilkoL], which simultaneously counts a known reference clock alongside the frequency to be measured.  You can see the result in the video, below.

The first method is easy but the lower the frequency you want to measure, the longer you have to count to get any real resolution. Also, you need the time base to be exact. For the second method, you need to be able to make a highly precise measurement. The reason [WikolL] chose the third method is that it doesn’t require a very precise time base — a moderately accurate reference oscillator will do. The instrument gets good resolution quickly at both high and low frequencies. 

The key to making the measurement is a clever way of connecting a D flip flop in such a way that it counts the high frequency reference clock and the lower frequency of interest for a fixed period of time. The fixed period doesn’t have to be very accurate. You wind up with two counts: How many input clocks you saw over the period and how many reference clocks. Since you know the frequency of the reference clock, the rest is simple math.

The real danger to projects like this is you can quickly get obsessed with measuring frequency and time. Of course, we’ve seen plenty of gated counter designs.

 



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook