Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to design a microphone circuit for guitar tuner?

Status
Not open for further replies.

david90

Advanced Member level 1
Joined
May 5, 2004
Messages
423
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Activity points
3,610
how should I design the microphone circuit of the tuner? Is it a good idea to use a schmitt trigger inverter to convert the analog wave from the mic into pulses so that a uC can process the signal?
 

hermin

Full Member level 2
Joined
Apr 19, 2005
Messages
132
Helped
12
Reputation
24
Reaction score
3
Trophy points
1,298
Activity points
2,481
guitar tuner

that is not a bad idea, but i would prefer to use an ADC to be processed by the uC,

the only thing is when you use a schmitt trigger, all the sine waves will be converted to a pulse, and that is when you are using a sine wave, but tones may come with two sine waves or multiple, and if i imagine it right, it may render the pulse inaccurate to the frequency or tone reading that you'll get...but i stand corrected, anyone who thinks other ways?
 

david90

Advanced Member level 1
Joined
May 5, 2004
Messages
423
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Activity points
3,610
Re: guitar tuner

Will the signal from the mic swing from negative voltage to positive voltage like AC or just positive?
 

Buriedcode

Full Member level 6
Joined
May 6, 2004
Messages
357
Helped
43
Reputation
86
Reaction score
7
Trophy points
1,298
Location
London
Activity points
8,887
Re: guitar tuner

hi.

Will the signal from the mic swing from negative voltage to positive voltage like AC or just positive?

Generally, all audio to electrical signals are AC, they swing above and below 0v. Capacitors are in nearly all audio equipment, and these block any DC component.
Theres a simple solution though, add a DC bias before you sample the signal with an ADC.

Say your ADC can measure voltages from 0-5v. Get your audio signal, and amplify it (or attenuate it) so that you have 5v p-p. This means the lowest voltage will be -2.5v, and the highest +2.5v. Then simply connect this through a voltage divider, that provides 2.5v. So, the lowest voltage now becomes -2.5 + 2.5 = 0v. And the highest 2.5 + 2.5v = 5v. With the centre being your 2.5v from the bias.

A schmitt trigger wouldn't help with your design. You would lose all the information from the audio signal, as hermin said. Sure, if you were trying to measure the frequency of a single sine wave, then you probably could use a schmitt trigger, and your uC simply as a counter. But guitar signals are rich in harmonics, otherwise all guitars would sound very dull, like a dead hum.

Even plucking a single string will produce many harmonics of the fundamental (like the tones you get from frets 5,7 and 12), so the signal you'll be looking at will be messy. Even the fundemental (the note of the string you pluck) isn't always the most promenant frequency in the signal. But....when you tune, you only need to 'detect' 6 frequencies, for E, A, D, G, B, E. I'm sure others have done this before, use google.

Hope this helps,

BuriedCode.
 

david90

Advanced Member level 1
Joined
May 5, 2004
Messages
423
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Activity points
3,610
guitar tuner

How does the mic produce a negative voltage when the only power I supply is 5V?

Also, I connected a 1k resistor to 5v, then to the mic then from the mic to ground. When I measure the voltage at the resistor & and mic node, the voltage stays pretty much the same. Shouldn't the voltage oscillate when sound hit it??

I'm kinda new to condensor mic.
 

Buriedcode

Full Member level 6
Joined
May 6, 2004
Messages
357
Helped
43
Reputation
86
Reaction score
7
Trophy points
1,298
Location
London
Activity points
8,887
Re: guitar tuner

hi again,

Shouldn't the voltage oscillate when sound hit it??

Yes. But, the signal direct from a microphone is generally quite weak. Also, if you used a voltmeter, that generally measures DC, or at least a very slowly changing voltage. Mic's can pickup from 20-20Khz (if they're any good) so, could our voltmeter measure a signal changing 20 times a second by a few mV?

Is this an electret microphone? The little 7-10mm mic insterts with 2 solder pads?
They have a small FET built inside, which is why they require power. This acts as a small preamp, since the voltage produced from a raw condesor mic element is extremely weak. That fet is just to get it up to a level where standard preamplifers can amplify it even further (so it can be plugged into a power amplifier for the speakers).

How does the mic produce a negative voltage when the only power I supply is 5V?

Believe it or not, this is actually a tough question :)

Sound, by deffinition is a wave of pressure, oscillating between 20Hz and 20Khz (actually beyond this range, but this is the range of frequencies we can hear/detect). When the microphone receives sound, it converts this rapid changing air pressure to an electrical signal. This signal oscillates according to the sound. So, say, for example, you're providing a 20Hz hum to the mic, and the mic is powered by 5v. Assuming the output of the mic is 1v p-p (these are just made-up values) then the output of the microphone would vary between 4 and 5 v. Now, that signal is really made up of two 'components'. A DC component (power) and a 'transient' component (audio signal). When this is passed though a capcitor, the DC ocmponent is blocked, and the AC/transient signal is allowed to pass. How much the AC signal is attenuated depends on the value of the capcitor. So, our DC component was 4.5V, and our AC component was 1v p-p (-0.5v to +0.5v).

Without the DC component we are simply left with the -0.5v to +0.5v audio signal.

When you measured the voltage of the microphone, did you connect a capacitor between the mic and the voltmeter?? I still doubt you'll see any change in voltage, but it should read '0v' and might jump around when you smack the mic element......which by the way, is inadvisable, as the little electret/condensor mics are quite fragile.

Heres some links to get you started........although....google is quite easy to use.

https://www.myplace.nu/avr/gtuner/ - exactly what you want.

https://www.ektopia.co.uk/ektopia/archives/2005/01/03/strobopick-guitar-tuner - wicked idea!!

https://www.acoustics.salford.ac.uk/acoustics_world/id/Microphones/Microphones.htm
https://audacity.fuchsi.de/forum.php?req=download&path=./edgar/electric/

https://members.optusnet.com.au/~eseychell/mic_preamplifier/mic_preamplifier.html

https://www.sa-eastcape.co.za/brc/Tech/Electret_Mic_Circuits.gif

https://www.members.cox.net/xsamo/common/theory2.gif
https://www.kingstate.com.tw/9-5.htm

hope some of these links help. The internet is a wonderful place.

BuriedCode.

ps: if the links come up '404 not found', copy and paste them into your browser.
 

_

Junior Member level 1
Joined
Jan 18, 2006
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,449
Re: guitar tuner

Just an idea, instead of using a mic why not amplify the guitar signal with op amps follow by a hi Q adjustable frequency cutoff point bandpass filter eg. a state variable filter which selects the note that you are looking to tune.

After that, rectify the signal to DC and use LEDs to indicate the level of the signal. That way you can monitor the LEDs to see if the guitar is in tune to the frequency you have selected.
 

the_risk_master

Advanced Member level 2
Joined
Aug 12, 2005
Messages
662
Helped
79
Reputation
158
Reaction score
19
Trophy points
1,298
Location
UE+MIT, Philippines, (14°N , 120°E )
Activity points
5,527
Re: guitar tuner

Hi I'll just butt-in here (is it okay?),

Do anyone of you know the discrete circuit for ADC0820? because this chip is already phased out in my country and have to build a discrete circuit (op-amp circuit may be) to replace this ADC chip. Any help?
 

nikifena

Advanced Member level 4
Joined
Dec 11, 2003
Messages
115
Helped
11
Reputation
22
Reaction score
2
Trophy points
1,298
Location
Bulgaria
Activity points
1,006
Re: guitar tuner

I don't like to make any advertisement but I have small korg (ca-30) tunner. I think that this tuner is the best. Verry fast reading and no problem if your guitar or bass have some effect. Verry good.
Before 2 years I like to make guitar tunner but I take korg.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top