Continue to Site

# Guitar Tuning Circuit

Status
Not open for further replies.

#### willcurvis

##### New Member
Hi, i was just wondering if anyone on here could help me.
I'm looking to do a basic guitar tuning circuit for my a-level coursework in electronics, and have got the basic idea on how it would be done, i'm just a bit stuck with a few details. I want to basically plug the guitar in, and the circuit to get the frequency and compare it with what the frequency should be (possibly using the resonant frequency of a tuned circuit?) and then to implement a comparator to determine whether to light the flat or sharp LED. What i'm not sure about is how I'd convert the frequency input to a voltage to use in the comparator ciruict. After hours of google searches, I've found nothing, and am getting desperate!! I've seen a few previous posts trying to do the samething, but the links he was given are a little complicated for what i'm looking for.

Any help would be greatly appreciated, thanks :roll:

by the way, a frequency to voltage converter is defined as 'Frequency-to-voltage converters accept a signal and convert its frequency to a corresponding analog voltage level'. Is this what i'll need?

I'm a micro-controller kind of guy, and this is what I'd look into trying first. Don't know how well it would work though....

I'd get an AVR from Atmel with an ADC on it.
Take a few samples from the ADC and run a DFT on it.
Determine the frequency its at and compare it to what it should be.
Use PWM to light up 3 led's -> top led is too high, middle is just right, bottom is too low

Someone is probably gonna come in here and say something like, "Here's how to do it with a resistor, 555, and a bubble gum wrapper" though.

So what does "A-level" mean? I've seen that term here in the last couple days several times, but never before in my life. If I had to guess I'd say it means "associates degree" but like I said I'm unsure.

I am more of a duct tape/baling wire kind of guy. One thought - use sound card, microphone and some fairly "common software" to indicate the freuquency.

I'm sorry I can't do better than "common software" at the moment but I've downloaded some amateur radio software that contains audio analysis displays - really cool stuff. It think it's safe to presume that you can obtain other similar stuff at no or low cost.

I realize that this is hardly something you'd build from scratch. I am not sure what you are limited to so I thought I'd mention it.

The guitar tuner that I have ( Sabine ZIP-700) uses a LM358P (low power dual op-amp) for the input signal, and a motorola SC413349DW 28 pin IC, and a few transistors. Maybe that would give you some sort of start.

I'm currently tracing the board to figure the diagram to find the operation of the circuit, just to see how it works.

The UK magazine EPE did one based on a PIC a few years ago, it looked very straightforward.

BTW, for our western members, an 'A level' (Advanced Level) is an optional exam level taken in the UK between 16 and 18 years of age. You used to take 'O Levels' (Ordinary Levels) at 16 years of age, and then optionally stay at school an extra two years and take your A Levels. The O Levels have now been renamed GCSE's or something similar.

If you've watched (or read) Harry Potter, they are taking OWL's (Ordinary Wizarding Levels) - I wonder where that idea came from?. There's somethign similar with A Levels as well, but I can't remember what they were called.

One problem in looking for the frequency difference is that it will take a long time to determine that the difference is zero. You will be better off to actually measure the frequency and know when it is correct.

Wow, thanks Nigel, it's nice to finally know what the heck an A-level is.

So do they have B levels and I levels (Beginner, intermediate)? It's pretty interesting to learn about other cultures.

Guitar tuner schematics

here is a kit that does what you are looking for. It requires a microcontroller, but the schematic should show you how to capture the value of the frequency. If you hard coded the values for say E,A,D,G,F,B,e you could then simply compare the digitial value from the PIC with the stored value in a table.
E=329.63
A = 440
D = 587.33
G = 783.99
B= 987.77
e = 1318.51
(all values in Hz)

You could also check to see which value the note is closest too and automatically select the string that is being tuned, and then light up an LED if is high, lower, or right on.

Here is another site that also contains the code that you would need to run in a PIC16F84. These are widely available and cost less then \$5. The download and figure include a full schematic as well as the code necessary to run the application. It also only uses LED's to display the readings. I think this is more of what you are looking for.

Good Luck!!!

Johnson777717 said:
So do they have B levels and I levels (Beginner, intermediate)? It's pretty interesting to learn about other cultures.

There are various different qualifications these days, they seem to add extra ones every few months. But back in my day you took the 11+ (at 11 years old), the result of which decided which school you went to (either a Grammer School, if you passed - or a Secondary Modern, if you failed). At Grammer school you took your O Levels at 16, and could optionally stay on and take your A Levels at 18 - these than led you on to a University Degree. At Secondary Modern schools you left at 16, you couldn't stay on till 18, and you took CSE exams (Certificate of Secondary Education) - a top mark pass at CSE was considered an equivalent of just managing an O Level pass.

I passed my 11+ and went to 'Lady Manners Grammer School' in Bakewell, this was a great culture shock! - it was a great deal larger than my previous schools (about 600 kids at the time) and some of the teachers wore gowns and mortor boards - it was like going back to an old B/W film :lol:

Hi

actaully, Nigel, it hasn't changed much since 'your day'

to clarify slightly:

all people stay at school until the age of 16, when they take their GCSEs

then they can go into work, go to college to do a modern apprentaship, or go to a sixth form college (usually attached to a secondary school), and do these A-levels.

A-levels can be academic, or vocational (pratical based)

if you do academic A-levels, u can have the option of going to a university, and do a degree, or a gnvq (a watered-down version of a degree)

its much the same, but a few things added along the way just to confuse you!! - and they have dropped the CSEs...

You can build this around a 567 tone decoder **broken link removed** and a few resistors and caps . Use 3 and indicate under-riteon- and above tuning

Last edited by a moderator:
wow...thanks everyone!!
sorry for such a late reply, iv been havin trouble with my computer
i think i will end up doing something similar to the link aevans17 gave me, but does anyone know anything about frequency to voltage converters? my teacher thinks this is the best way to do it, to turn the audio frequency into a voltage and then use a comparator. a frequency to voltage converter is just essentially a fm demodulator (possibly using a monostable) anyone have any comments?

you'll probably hear from me again if i hit any problems and will let you all know how i get on.

edit: just a question, Noggin, could you please explain what you mean by

'I'd get an AVR from Atmel with an ADC on it.
Take a few samples from the ADC and run a DFT on it.
Determine the frequency its at and compare it to what it should be.
Use PWM to light up 3 led's -> top led is too high, middle is just right, bottom is too low'

an AVR, a DFT and a PWM please? i'm not familiar with the abbreviations, thanks

That isn't really a good idea. If you convert the frequency to voltage, then measure the voltage you will not have a very precise tuner. ADC's are not 100% precise, especially if you are using an 8 bit ADC because then the value can only be between 0-255. ALos, depending on temperature, other electric noise your measurements will differ. Counting the period of the wave, and will give you an exact measure of frequency of the incomming sound. This eliminates any of the error that may arise durring conversion and ensures that you are measuring the wave form exactly. The second link that I posted does exactly this.

There are various different qualifications these days, they seem to add extra ones every few months. But back in my day you took the 11+ (at 11 years old), the result of which decided which school you went to (either a Grammer School, if you passed - or a Secondary Modern, if you failed). At Grammer school you took your O Levels at 16, and could optionally stay on and take your A Levels at 18 - these than led you on to a University Degree. At Secondary Modern schools you left at 16, you couldn't stay on till 18, and you took CSE exams (Certificate of Secondary Education) - a top mark pass at CSE was considered an equivalent of just managing an O Level pass.

I passed my 11+ and went to 'Lady Manners Grammer School' in Bakewell, this was a great culture shock! - it was a great deal larger than my previous schools (about 600 kids at the time) and some of the teachers wore gowns and mortor boards - it was like going back to an old B/W film

Wow! That must have been something. With all due respect, I get a kick out of the "Lady Manners Grammar School". I suppose I'm not used to that type of name. Schools out here are usually named after a famous political person, or historical reference, or the city name (Such as Abraham Lincoln High School, Sandra Day O'Connor elementary school, Boulder High School etc.)

Johnson777717 said:
Wow! That must have been something. With all due respect, I get a kick out of the "Lady Manners Grammar School".

Just as your schools were named after famous people, so was mine, "Lady Manners" was the name of the wife of a local landowner, presumably "Lord Manners"?. When I was there, we still had the fish ponds at the front of the school (great fun throwing other kids into them!), but the Peacocks (which give the school it's emblem) were no longer there.

If you visit the school website at from 1962, you can clearly see the fishpond in the middle. I went there from 1966 to 1971, as I left they were about to go comprehensive, which required a large extension - the 1972 picture shows the changes (but still with the fishpond evident).

I was a day pupil, but it was also a boarding school, we had a number of students who's parents worked in the diplomatic service.

Now that is a site to see. What a beautiful place to attend school. The schools that I attended were pretty boring. No architectural materpieces. Basically, just regular square buildings. Don't get me wrong, the buildings were nice, and they did the job (I think they doubled as bomb shelters, as they were built during the cuban missle crisis, or shortly thereafter).

My elementary school was the only thing that could come close to what you've experienced as a child. The building was red brick, and very similar to the old schoolhouses that you may see on old american films. The building resembled a large church, with a bell tower and things of the sort. To my knowledge, it is the oldest operational elementary school in the United States. The name was Whittier Elementary and is located in Boulder Colorado, USA. I still go to visit, when I'm in Colorado.

I can't picture Mr. Nigel Goodwin throwing kids into the pond Although, most of us have our michievious side.

In your last sentence, you stated that most of the pupils had parents who worked in the Diplomatic service. What is the Diplomatic service?

Johnson777717 said:
In your last sentence, you stated that most of the pupils had parents who worked in the Diplomatic service. What is the Diplomatic service?

The staff who work in foreign embassies, one friend in my form used to go to Hong Kong every holiday - his parents worked in the British Embassy there.

It wasn't most of the general pupils, but a good few of the boarding pupils came from those backgrounds.

As I mentioned originally, when I first started at the school, I thought I'd gone back to the schools shown in the old British black and white films :lol:

Things have changed a lot there now, obviously - but in my day you had to have seperate indoor, and outdoor, shoes - if you were found wearing your outdoor shoes indoors, you were in deep trouble, bearing in mind they still used the cane back then!.

Just as a suggestion...
An LM2907 or LM2917 will make a simple F to V converter.
The attached circuit will give you an idea of how it is configured, the range and zero points can be altered by changing resistors.
Note in this circuit a reed switch is used for measuring the speed of a wheel (?), this will need altering for a microphone or electric pickup input.

I am not suggesting this is the best answer, the PIC circuit will probably be best, but as you asked ...

Each input pulse is used to trigger a monostable which gives a fixed length pulse out.
These fixed pulses are used as 'packets of power' to charge a capacitor which has a constant discharge path.
The more pulses-per-second of power you put into the cap the greater will be its charge and therefore the voltage accross it.
This voltage will increase during each pulse and fall again between pulses so a rough triangle wave will be seen as its output (at the frequency of the measured input).
Simple filtering will remove most of this 'ripple voltage' leaving a DC voltage proportional to the applied frequency.

All the above in a singe IC !
There are other ways of doing it but this is common and cheap.

Ah! yes, the cane; I remember it well, like a trusted friend. Mixed High school, myself, CSEs AND 'O' levels for my sins.

#### Attachments

• JoyBike_112.gif
5.7 KB · Views: 877
Status
Not open for further replies.