Fully automated Drum kit tuner

Hello Community,

i am studying for a master's degree in mechanical engineering. We have a project that contains a lot of mechatronics, so i need some advices.

We have to build a fully automated drum kit tuner (at first for a base drum).
A drum is mostly tuned with eight screws which increase or decrease the tension of the fur (surface which will be hit by the drumstick).

The plan is to get the frequency of the tune via microphone. The Arduino calculates a torque (Nm) for the tuning screws of the drumset. A brushless dc motor with a torque control will thighten the screw until the wanted torque is reached.

For more clarity i will divide this topic in INPUT and OUTPUT.

INPUT:
I use a Adafruit Max4466 (for first research). So i get a analoge input at my Arduino Max (0-5V divided in 1024 steps). If the noise is loud the voltage is rising (so does the value of steps) and the opposite. I plotted the value of steps in a graph which is time-dependent. The curve looks like a frequency, but it´s just the value of steps over time. I just want one value which is the main frequency. I have a lot of values which can be used for calculation. My Prof. told me, that it´s likely to use a fast fourier transformation. Do some of you know how i can get the frequency out of the measuring points from the microphone?

OUTPUT:
I decided for the dc motor because a stepper does not have a torque that´s stable enough. it will be very complicated because (in my oppinion) the drive cannot be controlled in path-dependent manner. I found a torque controller https://www.solomotorcontrollers.com/specifications-solo-mini/. In the description they say it can be used for torque, speed and position control. Does anyone of you have experience with the solo board, or have some experience in controling a dc motor (torque, path) and can tell about her / his project?

Thankyou for your replies. For an mechanical enigneer, electronics is like magic. :smiley:
Please use the input /output structure in your replies.

MFG Benni

A couple of things make this "tough".`

There are FFT and FHT libraries and there is something called autocorrelation. I haven't used any of these but from what I've read most people trying to make guitar tuners with the Arduino fail (1) but autocorrelation seems to give the best results. Technically, you'd be using DFT (Digital Fourier Transform) which works on sampled data, whereas FFT works on continuous (analog) waveforms.

If you know what an audio spectrum analyzer is, that's similar to how FFT works... A spectrum analyzer is like a bunch of VU meters, each showing the loudness of a different frequency band (with bass on the left and the highs on the right). FFT does give results in frequency-bands (which are called "bins" in FFT terminology) so you can't get an exact frequency and you'll need lots of bins for the precision you need. The bins are "linear" so they might be 10Hz wide, etc. That means "musically" (or perceptually) you get more resolution than you need at high frequencies and less resolution lower frequencies. A spectrum analyzer display is normally logarithmic on the frequency scale so you get octave or fractional-octave displays. (The loudness scale is logarithmic too... i.e. dB.)

Audacity is a FREE audio editor that shows the regular audio waveform or it can display the frequency spectrum (for a short selection). Of course, it uses FFT behind the scenes. That's probably a good place to start. All real world sounds contain many simultaneous frequencies and that's the 1st major obstacle. If you can see the dominate/fundamental tuning frequency your Arduino project has a better chance of working. The Audacity website also as a little Introduction To Digital Audio which will be helpful if you don't know anything about it. (It doesn't cover FFT... That's "advanced stuff".)

Torque could be another issue... Although you can control torque (and/or speed) by controlling voltage & current, motors will vary. They may match "close enough" but that's probably something you'll have to experiment with. Of course you don't really care about torque, you care about tuning-frequency (as long as the motors are not powerful enough to over-torque and that's something you should avoid in any case).

You might have to add something to measure the torque. It's the same when you control the speed of the motor... You can control the speed but without feedback you can't know the actual speed.

You'd actually be using PWM which switches on & off rapidly to control the average voltage from your motor driver circuits.

(1) However, people successfully may spectrum analyzer lighting effects "every day".

I think your question will get much better coverage in the Audio section so I have moved it here. You might like to search the forum as there are examples of this for guitar tuning.

Thankyou for your answer. I know that it will be very difficult, but I don´t have a choice. I will read something about the autocorrelation (heard of it, but don´t know anything about it). As I understand you right, you mean that autocorrelation replaces the FFT or FHT?

Even your answer gives not the perfect solution (i did not expect that), it will bring me forward. Thankyou very much.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.