Here at Think Circuits, much of what we do involves measuring and analyzing signals using computational methods. This is why we call it Digital Signal Processing (DSP). In this blog series, we will give a taste of some DSP techniques and apply them to some real-world motivating examples. This series is primarily for those who are interested or wondering about how signal processing can be applied to new industries or applications. If you have a frontier application that could use sensing or automation and want deep expertise to take it to the next level, please reach out.
Topic of Study
Vibrations exist all around us at all times of day. We often take for granted the devices that can generate and measure these cyclical energies, as well as just how often we are under the influence of vibrations. For example, maybe you’re sitting in an office listening to your favorite song/podcast or to the droning hum of an A/C unit above you. Right now, if you are sitting at home, maybe you can feel the subtle shake in your building when a heavy gust of wind comes along or you’re listening to the high-pitch whine of your new neighbor installing their TV with an impact drill. Also, if you’re reading this while driving (hopefully not), you’re probably various vibrations from your car coming from the engine, tire-road interaction, and suspension. All of these oscillating mechanical energies are examples of vibration all around us.
In order to use DSP techniques, these mechanical vibrations must be brought into a digital representation. Usually there are two steps to this. Firstly, a transducer of some sort will translate mechanical vibrations into electrical signals. Examples of transducers are microphones, accelerometers, load cells, optical interferometers, and many more. The electrical signals coming from a transducer are analog, broadly meaning the information is represented as a voltage or current value. Secondly, will be to convert this analog value to a digital value using an analog-to-digital converter (ADC). This converts the voltage value into a number that can then be operated on in a computer program.
In this series, we will mainly be operating with signals that have already been digitized, and we will focus on the DSP techniques operating on digital signals. Of course, if you are looking for deep expertise in real-time capturing of the signal with sensor design and analog processing, please contact us.
In this blog series, we are going to be covering the most fundamental vibrational analyses and signal processing algorithms used by engineers to extract meaningful information from vibrational data. Each article in the series is going to give a short overview on the chosen algorithm, then demonstrate a real world application for it using real hardware! We invite you to duplicate the experiments yourself using the provided hardware and code snippets. To follow along, you will need:
- Nicla Sense ME Microcontroller to take and log measurements
- USB Cable Type A male to Micro Type B male to plug into your computer (this can be purchased along side the microcontroller from the previous link)
- EEMB 3.7V Lipo w/ JST connection to power the Nicla as a standalone device. You will have to solder the leads onto the board or get the appropriate connectors. Note that the board can charge the Lipo when plugged into a power source and therefore an additional charger isn’t needed.
- A computer running Python with BLE capability to capture the Nicla’s Bluetooth signal and visualize data. For this series, it will be a Windows device, but Linux/MacOS users should be able to follow along as well with a few code tweaks.
The sensor of choice for measuring vibration in this blog series will be the accelerometer (built into the Nicla), which measures change in velocity. Accelerometers are cheap, easy to set up, and they provide accurate readings for high frequency signals, which will come in handy in later posts.
What is a Vibration?
While you wait for your hardware to arrive, let’s start with a little crash course on what a vibration is and the quantities used to represent vibrations. The definition of a vibration in physics from Oxford Language is:
In this series we will be measuring vibrations on elastic solids whose equilibriums have been disturbed. In reality, most real-world vibrations are composed of many different frequency waves added together. However, it can be useful to consider an ideal vibration as a single sinusoid with a frequency, amplitude, and phase. To visualize this, let’s take a point on an ideally behaving guitar string that’s been plucked and plot its displacement from its un-plucked equilibrium position with respect to time. It would look something like this:
In this graph, the amplitude is the maximum distance the string is displaced from its equilibrium position, the period is the amount of time it takes for the string to leave and reach the same point again, which is called a cycle. The frequency, measured in Hertz or radians per second, is the number of cycles that the point on the string travels in 1 second. If the point on the string vibrates for 200 cycles in 1 second, we would say that the string vibrates at a frequency of 200 Hz. There’s also something else called phase, which relates the position of the wave with respect to other related waves or some other absolute time.
Fun vibrations fact: in the late 19th and early 20th century, before the widespread adoption of a pitch standard, North American orchestras tuned their ‘concert A’ to 440 Hz, while European orchestras tuned their concert A pitch to 435 Hz (following the French standard). This meant that if you listened to a recording for the same song recorded in these different locations during this era, they would be out of tune with each other!
In reality, mechanical vibrations around us do not perfectly follow the shape of a single sinusoid (even if they get very close), they are a combination of an infinite number of sinusoids of varying frequency and magnitude (more on this in a later lesson). Regardless, we can oftentimes focus on a small number of dominant frequencies that capture the majority of the system behavior to perform our analysis. In the next post, we will be covering the setup of the Nicla Sense ME Microcontroller, get it logging some accelerometer data, and plot that data using Python. Continue the journey here!