Hello. I have some experience on electronics and worked with raw components for a while, but i'm completly new to arduino boards. I'm building a electromyographer and i'm aiming at two things: to make a computer read it's signals AND transform such signals into various commands, depending on the frequency input. My band is 5 to 500hz. Which product would you recommend? Thank you very much.
Can you elaborate on what you mean by
transform such signals
i.e What sort of analysis did you intend performing on the signals e.f Fast Fourier Transform (FFT) or some other algorithm or signal processing ?
The Arduino is capable of doing FFT on signals in the audio frequency range, so the range you proposed i.e 5 to 500Hz should be OK, however it would depend on the amount of computation that needs to be done in order to analyze the signals to determine the commands the Arduino needs to output.
If the signal contains only one frequency at a time, you can feed it into a counter, sample that via a timer interrupt or timed loop, and have a good info what frequency is being fed in. I think if you look in the forum for frequency counter projects you'll find something useful.
If the input is composed of multiple frequencies at once -- like DTMF tones or something -- then an FFT or maybe, cheaper computationally, a Goertzel algorithm approach, might be needed. I'm a fan of the Goertzel approach, if you know what frequencies you're looking for beforehand and just want to test if they're present or not.
From wikipedia Electromyography - Wikipedia
Looks like these signals are very complex. Hence I suspect FFT and beyond would be required to analyze them
e.g. From wikipedia
EMG signal processing
Rectification is the translation of the raw EMG signal to a single polarity frequency (usually positive). The purpose of rectifying a signal is to ensure the raw signal does not average zero, due to the raw EMG signal having positive and negative components. It facilitates the signals and process and calculates the mean, integration and the fast fourier transform (FFT). The two types of rectification of signals refer to what happens to the EMG wave when it is processed. These types include full length frequency and half length. Full length frequency adds the EMG signal below the baseline (usually negative polarity) to the signal above the baseline making a conditioned signal that is all positive. This is the preferred method of rectification because it conserves all signal energy for analysis, usually in the positive polarity. Half length rectification deletes the EMG signal below the baseline. In doing so, the average of the data is no longer zero therefore it can be used in statistical analyses. The only difference between the two types of rectification is that full-wave rectification takes the absolute value of the signal array of data points.[17][18]
Also
From.The National Center for Biotechnology Information Wavelet analysis of surface electromyography signals - PubMed
A number of digital signal processing (DSP) techniques are being applied to surface electromyography (SEMG) signals to extract detailed features of the signal. Fast Fourier transform (FFT) is one of the most common methods for analyzing the signal whether it is filtered or not. Another DSP technique is referred to as wavelet analysis, a method that is gaining more use in analyzing SEMG signals. This research focuses on using the discrete wavelet transform (DWT) and the wavelet package transform (WPT). Both DWT and WPT use analytical wavelets called "mother wavelet" which comes in different sets or "families". Wavelet analysis has the advantage over FFT as it provides the frequency contents of the signal over the time period that is being analyzed. SEMG signals were collected from a muscle under sustained contractions for 4 seconds with different loads. The raw signals were analyzed using FFT, DWT and WPT in LabVIEW(R) using its signal processing toolset. Using wavelet analysis the SEMG signal was decomposed into its frequency content form and then was reconstructed. In this paper the results are presented to show that certain families of mother wavelets of wavelet analysis are more suitable than others for analyzing SEMG signals.
K. So a Raspberry Pie or maybe a real computer. Not something an Arduino would excel at, it seems to me.
Kind'a depends.
The problem with the RPI is that its very limited in its built in hardware I/O, i.e to the point where it normally requires and Arduino daughter board to be attached to perform the hardware interfacing.
There are the new Arduino's e.g. DUE http://arduino.cc/en/Main/arduinoBoardDue which use an ARM based microcontroller, which runs at 84Mhz and has much more ram etc e.g. 96k RAM
So doing complex FFTs and DCT's and other of these types of algorithms should be possible.
But it really all depends on the sort of computation that the OP requires, and as they havent provided any feedback, we're just enjoying speculating at the moment ![]()
Thank you all for your replies!
Actually i'm a bit indecisive.
Roger, I primarily want to transform muscle contraction into a command depending on how hard the muscle is contracted. I'm expecting to have a higher frequency in strong muscle contraction and lower frequency in weak muscle contraction and that's why i want to transform frequency inputs into different commands: i want to send at least two different commands depending on how hard i contract my mussels.
That means It doesn't matter if the frequency is rectfied (although it seems the amplitude also varies, so i'm not sure what to choose). If i'm able to visualise that data in my computer (frequency OR amplitude variation) AND transform it in commands, i will be a happy man.
Secondarily i want to be able to analyse the frequencies in high detail, to get rid at least a bit of the noise and to be able to see the spikes. But of course, as you and gadner mentioned, those frequencies would be much harder do analyse. In that case, i'd probably be better of giving all the information to my computer and solve everything else through programming.
that video might give you an idea of the data i'm expecting
edit: keep in mind the data shown in the video have already been through a sophisticated filter
