Finding The Right Hack Is Half The Battle

Sometimes you just get lucky. I had a project on my list for a long time, and it was one that I had been putting off for a few months now because I loathed one part of what it entailed — sensitive, high-accuracy analog measurement. And then, out of the blue I stumbled on exactly the right trick, and my problems vanished in thin air. Thanks, Internet of Hackers!

The project in question is a low-vacuum regulator for “bagging” fiberglass layups. What I needed was some way to read a pressure sensor and turn on and off a vacuum pump accordingly. The industry-standard vacuum gauges are neat devices, essentially a tiny little strain gauge on a membrane between the vacuum side and the atmosphere side, in a package the size of a dime. (That it’s a strain gauge is foreshadowing, but I didn’t know that at the time.) I bought one for $15 ages ago, and it sat on my desk, awaiting its analog circuitry.

See, the MPX2100 runs on 12 V and puts out a signal around 40 mV on top of a 6 V offset. That voltage level is inconvenient for modern 3.3 V microcontroller ADCs, and the resolution would get clobbered by the 6 V signal if I just put a voltage divider on it. This meant whipping together some kind of instrument amplifier circuit to null out the 6 V and amplify the 40 mV for the ADC. The circuits I found online all called for 1% resistors in values I didn’t have, and mildly special op-amps. No fun, for me at least. So there it sat.

Picture of sketchy-looking vacuum apparatus.
Cut the blue wire or the red wire? HX711 module and pressure sensor on the left.

Until I ran into this project that machetes through the analog jungle with one part, and it happened to be one I had on hand. A vacuum pressure sensor is a strain gauge, set up like a Wheatstone bridge, just like you would use for weighing something with a load cell. The solution? A load-cell ADC chip, the HX711, found in every cheap scale or online for under a buck. The only other trick was finding a low-voltage pressure sensor to work with it, but that turns out to be easy as well, and I had one delivered in two days.

In all, this project took months of foot-dragging, but only a few clicks and five minutes of soldering once I got the right idea. The industrial applications and manufacturers’ app notes all make sense if you are making hundreds or millions of these devices, where the one-time cost of prototyping up the hard bits gets amortized, but the hacker solution of using a weight-scale chip was just the ticket for a one-off. That just goes to show how useful sharing our tips and tricks can be — you won’t get this from the industry. So send us your success stories, and your useful failures too, and Read More Hackaday!

Raspberry Pi Pico ADC Characterized

[Markomo] didn’t find much useful information about the Raspberry Pi PIco’s analog to digital converter, so he decided to do some tests to characterize it. Lucky for us, he documented the findings and shared them. The results are in a series of blog posts that cover power supply noise, input-referred noise, signal to noise ratio, and distortions.

There are some surprising results. For example, the Pico’s low noise regulator mode appears to produce more noise than having it set for normal operation. There also appears to be a large spike in nonlinearity around certain measurements.

Continue reading “Raspberry Pi Pico ADC Characterized”

Guitar Effects With No (Unwanted) Delay

MIDI has been a great tool for musicians and artists since its invention in the 1980s. It allows a standard way to interface musical instruments to computers for easy recording, editing, and production of music. It does have a few weaknesses though, namely that without some specialized equipment the latency of the signals through the various connected devices can easily get too high to be useful in live performances. It’s not an impossible problem to surmount with the right equipment, as illustrated by [Philip Karlsson Gisslow].

The low-latency MIDI interface that he created is built around a Raspberry Pi Pico. It runs a custom library created by [Philip] called MiGiC which specifically built as a MIDI to Guitar interface. The entire setup consists of a preamp to boost the guitar’s signal up to 3.3V where it is then fed to the Pi. This is where the MIDI sampling is done. From there it sends the information to a PC which is able to play the sound back quickly with no noticeable delay.

[Philip] also had to do a lot of extra work to port the software to the Pi which lacks a lot of the features of its original intended hardware on a Mac or Windows machine, and the results are impressive, especially at the end of the video where he uses the interface to play a drum machine via his guitar. And, while MIDI is certainly a powerful application for a guitarist, we have also seen the Pi put to other uses in this musical realm as well.

Continue reading “Guitar Effects With No (Unwanted) Delay”

Homebrew Metrology The CERN Way

We won’t pretend to fully grok everything going on with this open-source 8.5-digit voltmeter that [Marco Reps] built. After all, the design came from the wizards at CERN, the European Organization for Nuclear Research, home to the Large Hadron Collider and other implements of Big Science. But we will admit to finding the level of this build quality absolutely gobsmacking, and totally worth watching the video for.

As [Marco] relates, an upcoming experiment at CERN will demand a large number of precision voltmeters, the expense of which led to a homebrew design that was released on the Open Hardware Repository. “Homebrew” perhaps undersells the build a bit, though. The design calls for a consistent thermal environment for the ADC, so there’s a mezzanine level on the board with an intricately designed Peltier thermal control system, including a custom-machined heat spreader blocker. There’s also a fascinatingly complex PCB dedicated solely to provide a solid ground between the analog input connector — itself a work of electromechanical art — and the chassis ground.

The real gem of this whole build, though, is the vapor-phase reflow soldering technique [Marco] used. Rather than a more-typical infrared process, vapor-phase reflow uses a perfluropolyether (PFPE) solution with a well-defined boiling point. PCBs suspended above a bath of heated PFPE get bathed in inert vapors at a specific temperature. [Marco]’s somewhat janky setup worked almost perfectly — just a few tombstones and bridges to fix. It’s a great technique to keep in mind for that special build.

The last [Marco Reps] video we featured was a teardown of a powerful fiber laser. It’s good to see a metrology build like this one, though, and we have a feeling we’ll be going over the details for a long time.

Continue reading “Homebrew Metrology The CERN Way”

RTFM: ADCs And DACs

It’s tough to find a project these days that doesn’t use an analog-to-digital converter (ADC) or digital-to-analog converter (DAC) for something. Whether these converters come as built-in peripherals on a microcontroller, or as separate devices connected over SPI, I2C, or parallel buses, all these converters share some common attributes, and knowing how to read the specs on them can save you a lot of headaches when it comes to getting things working properly.

There are some key things to know about these devices, and the first time you try to navigate a datasheet on one, you may find yourself a bit confused. Let’s take a deep dive into the static (DC) properties of these converters — the AC performance is complex enough to warrant its own follow-up article.

Continue reading “RTFM: ADCs And DACs”

The Cutest Oscilloscope Ever Made

If you thought your handheld digital oscilloscope was the most transportable of your signal analyzing tools, then you’re in for a surprise. This oscilloscope made by [Mark Omo] measures only one square inch, with the majority of the space taken up by the OLED screen.

It folds out into an easier instrument to hold, and admittedly does require external inputs, so it’s not exactly a standalone tool. The oscilloscope runs on a PIC32MZ EF processor, achieving 20Msps and 1MHz of bandwidth. The former interleaves the processor’s internal ADCs in order to achieve its speed.

For the analog front-end the signals first enter a 1M ohm terminator that divide the signals by 10x in order to measure them outside the rails. They then get passed through a pair of diodes connected to the rails, clamping the voltage to prevent damage. The divider centers the incoming AC signal around 1.65V, halfway between AGND and +3.3V. As a further safety feature, a larger 909k Ohm resistor sits between the signals and the diodes in order to prevent a large current from passing through the diode in the event of a large voltage entering the system.

The next component is a variable gain stage, providing either 10x, 5x, or 1x gain corresponding to 1x, 0.5x, and 0.1x system gains. For the subsystem, a TLV3541 op-amp and ADG633 tripe SPDT analog switch are used to provide a power bandwidth around the system response due to driving concerns. Notably, the resistance of the switch is non-negligible, potentially varying with voltage. Luckily, the screen used in the oscilloscope needs 12V, so supplying 12V to the mux results in a lower voltage and thus a flatter response.

The ADC module, PIC32MZ1024EFH064, is a 12-bit successive approximation ADC. One advantage of his particular ADC is that extra bits of resolution only take constant time, so speed and accuracy can be traded off. The conversion starts with a sample and hold sequence, using stored voltage on the capacitor to calculate the voltage.

Several ADCs are used in parallel to sample at the same time, resulting in the interleaving improving the sample rate. Since there are 120 Megabits per second of data coming from the ADC module, the Direct Memory Access (DMA) peripheral on the PIC32MZ allows for the writing of the data directly onto the memory of the microcontroller without involving the processor.

The firmware is currently available on GitHub and the schematics are published on the project page.

Continue reading “The Cutest Oscilloscope Ever Made”

A Hard Rocking Arduino Visualization Shield

Over the summer [ElectroSmash] put the finishing touches on the Arduino Audio Meter, a shield for the Arduino Uno that visualizes various aspects of an incoming audio signal on a set of four 8×8 LED dot matrices. Obsentisibly it’s for use on a guitar pedalboard, but thanks to the incredible documentation and collection of example code provided by the team, the project promises to be an excellent platform for all sorts of audio experimentation.

Incoming audio is amplified with an MCP6002 and fed into the Uno’s Analog to Digital Converter, where it’s processed via whatever Sketch the user has uploaded. User input is provided by a digital encoder with push-button. A set of four MAX7219 chips control the entire 256-pixel matrix with just three pins on the Arduino. The resolution of the display allows the Arduino Audio Meter to show more than just a simple VU meter, it can even do text and basic graphics.

[ElectroSmash] provides various Sketches for use with the Arduino Audio Meter that provide the expected repertoire of audio visualizations, but they also provide a number of interesting Sketches to expand the capabilities of the device in unexpected ways. Some of them could be useful for a stage musician, such a tool to tune your guitar, whereas others are fun uses of the hardware such as a game of “Snake”.

With the entire project released as open source, users are free to run wild with the Arduino Audio Meter. Writing your own custom software is an obvious first step to making the project your own, but adding additional hardware features and functions certainly aren’t out of the question either.

Our very own [Lewin Day] once walked us through the effort involved in building boutique guitar pedals, and while the Audio Audio Meter’s capabilities are somewhat limited as it doesn’t have the ability to change the audio going through it, we’re still interested in seeing what the community will come up with once they have an easy way to bring their ideas to life.

Continue reading “A Hard Rocking Arduino Visualization Shield”