Best sensor for picking up guitar's vibrations

I want to use Arduino for reading the vibrations from a guitar's body. The output shouldn't be binary - 10+ amplitude levels is good for me. Which hardware should I pick for this?

A guitar pickup!

eg,

A bit more high-end:

More: https://www.google.com/search?q=acoustic+guitar+pickup

A microphone.

2 Likes

Depending on the output level you will also probably have to add a preamplifier.

For the best take a look at a custom Zephyr Silver Humbucker, but you will not be able to do it justice with an Arduino.

2 Likes

I mainly want to get the levels for analyzing and saving them so I don't care about sound quality. Do I still need a pre amp? Is there a cheap pre-amp that will do the job, connected either to an Arduino or to a PC?

Err ... but the "sound quality" is all about getting the levels correct!

What kind of "analysis" are you planning to do? What Arduino are you planning to use?
What is the object of this exercise?

Depends on which pickup you actually end up choosing; I'm sure there's ones available with built-in preamp - hint: if it needs a battery, it (probably?) has a preamp.

But even a line-level output is only on the order of a volt - so you'll probably want some sort of amplification anyhow before feeding an Arduino...

Sorry, I was not clear.

I want to track the maximum volume in dB in the spectrum in a range like 100-200Hz. A moving average over 300ms or computing it every 300ms is also good.
If possible finding the the first 2 peaks in the spectrum and computing the frequency and amplitude in dB in each would be great.
The dB level can be rounded to -50,-45,-40 etc.

I guess that I need to do some FFT but accuracy is not important.

I found a contact mic that, when recorded in Audacity, picks dB values like -60 or -70. Is this something that I can work within an Arduino?

I have several Nanos but if there's an Arduino that is more suitable for this I will get it.

Audacity will be going via the computer's microphone preamp - it usually has a gain control.

You will probably need a preamp.

Note that some (many? most?) of these things are "electret" mics which need "phantom" power from the computer - I'm sure googling something like "headset mic Arduino" will get useful info...

What are you really trying to accomplish? What are you going to do with the data?

I have several comments -

Note that a "wave" is positive half the time and negative half the time and the actual average is zero. You can average the peaks, or the absolute values, or ignore the negative, or you can calculate RMS, etc.

Frequency analysis (FFT) might be a big problem. The Arduino is not a multitasking device and FFT is "CPU intensive". You have to read some data, then stop reading while you do the frequency analysis, then display the results, then start-over, etc. So there are gaps in the readings. Lots of people make sound activated lighting effects with FFT everyday and it's fast enough that the gaps aren't noticed but it may not be good enough for your "analysis".

You can do that but "dB" in this context is pretty-much meaningless. Decibels need a reference. i.e With dBV zero decibels is 1 Volt. So you could measure dBV from the guitar pick-up. (It would be a negative dB value.)

In the digital domain (i.e. Audacity) 0dBFS is zero-decibels full scale and it's the highest you can "count to" with a given number of bits, or a numerical value of 1.0 with floating-point audio. So digital dB values are also usually negative.

0dB SPL (loudness in the air) is approximately the quietest sound that can be heard so SPL levels are positive.

The signal is weak because guitar pickups are not compatible with microphone inputs. The input impedance of the soundcard is too low and it's "dragging-down" the voltage.

BTW - Computer mics are also not compatible with "pro" stage-studio mics.

For the computer, Behringer makes a relatively inexpensive USB guitar interface. (It requires USB and a driver, etc., so it's not usable with the Arduino.)

Or there are lots of higher-end USB audio interfaces with switchable mic/instrument inputs. (These work with stage/studio mics, not computer mics.)

With the Arduino you might be able to get-away without a preamp. If you have to buy a guitar preamp it will be expensive, so if you need one you'll probably have to build your own. If you need a preamp, you won't need much amplification, maybe you'll need a gain of 5 or 10. A guitar preamp is mostly an "impedance adapter".

So first, try this circuit with a couple of changes so it works with a guitar -

Audio Input Schematic

Change the resistors to at-least 1M. And change the capacitor to 0.1 or 0.01uF.

Then run the Analog Read Serial Example, with the delay taken-out, and with the audio input circuit in place of the potentiometer and check to see if you are getting "useful readings".

This is a bias circuit so you can read the negative half of the waveform. (You can subtract-out the bias in software depending on what kind of processing/analysis you're doing.)

Negative voltages can damage the Arduino. A guitar pickup doesn't put-out enough current to do any damage but you'll need to be careful if you use a preamp.

1 Like

Thanks for the remarks!!!

I need to track noise picked from the walls for some reason :slight_smile:

Yes, I mean averaging the max power in the 100-200Hz range.

I can live with gaps in the FFT processing. What you're describing sounds good enough for me.

I don't need to record the audio, just to tell the difference between silence (-80 dB in Audacity when the mic is plugged in the PC PL socket ) long soft noise (-70 dB), louder one (-65dB) etc. 5dB resolution is enough for me. If this difference is clear in Audacity should I be able to get it also in a JS code or in an Arduino without pre-amp?

The Arduino may work better because of it's higher input impedance.

The mic input on your computer has low impedance which knocks-down the signal but it has a preamp to boost it back up... So it's hard to say...

That's going to be a LOT weaker than when playing the guitar and you'll most likely need a preamp.

1 Like

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