Go Down

Topic: Creating a tuner..... Begginer! (Read 3137 times) previous topic - next topic


Good idea! I'll start with FFT test data now! Im not sure if I have bookmarked a page of someone who did the tuner with the FFT, if I find it , I¡ll post it


I did some things this morning in the university laboratory with an oscilloscope, I tried using a offset of 2v, and now I see that im getting 300mv on the input (just noise, unplugged cable)  and in the output 3,50V.. so now its centered at 2V nut its losing a little bit. I used a 100k resistor between the ground and the hot leg of arduino as you said. Today I havent had time to try som stuffs and measure from guitar and so..but I will have the whole morning tomorrow to test inputs and outputs...

thanks so!


Just want to add my +1 to the topic.
I'm also a new to hardware but with software development background. I need an input circuit for audio. Then I will do som FFT and beat detection and blink led and lasers until seizure.
Here are link a found so far. You've probably also had.

http://www.instructables.com/id/Arduino-Audio-Input/ - an comprehansive tutorial on how to make a audio input board. It should convert signal to be 5v amplitude with a 2.5V center. But that did not work for me due to probably my curved hands. What I got were only 0 , 1023 and 510-515 values on arduino inputs.

http://macetech.com/store/index.php?main_page=product_info&products_id=11 Arduino input shield. Have not tried yet. Shipment to Germany is more expensive than board itself. But I might buy it in the end.

http://www.andregoncalves.info/ag_blog/?page_id=61 Seems to be the same as previous. I wrote to the man but he just does not reply.

There are few other audio boards out there but they do not provide raw audio data to the board or it is not clear from the description.
Can one suggest a ready to use solution if there is one?


I did some things ...

I don't see a description of what you did.  A schematic would help.

Can one suggest a ready to use solution if there is one?
Here's what I use: a cheap homemade circuit to connect the audio output of the PC to the Arduino.  A schematic is attached.  The Thevenin equivalent of the voltage divider is a 10K resistor and a 2.5V DC supply.  10K is suitable for an analog input, as described in the datasheet.  Note that there's nothing in series with the analog input.  I've verified that my PC won't output a 5V peak-to-peak signal, so I don't worry about overdriving the analog input.  You may prefer to use two 10K resistors, and a 5K in series, for an equivalent impedance of 10K, with the 5K providing a measure of protection for the analog input.  This scheme isn't really suitable unless the input is stiff enough to drive the equivalent impedance of the voltage divider; otherwise, the signal level will drop.

I added a 100K resistor to ground from the signal input.  That's because I suspect that the audio output is capacitively coupled, just like my input.   Without the resistor, the DC voltage between the two capacitors is essentially undefined.  Because I'm using an electrolytic capacitor, and I presume that the audio output does, too, I add the resistor to keep the DC level between them at ground, and make sure that the capacitor polarities are proper.  I can't say that it's necessary; I just like having it in the circuit.

Advantages are that it's cheap, easy to build, and I can define the analog input quite precisely by generating my own audio content.  The primary disadvantage is that it doesn't lend itself to real-world inputs:  The input impedance is so low it would pull down most guitar inputs, and it has no protection from analog overvoltage, as you might get from an amplifier output intended for a speaker. 

Criticism is welcome.


BTW, what is amplitude of a signal from an average cell-phone player? Dow we need to amplify it?


... what is amplitude of a signal from an average cell-phone player? ...
I don't know of any standards.  Here's a guy testing the audio output of an iPhone 5:  http://www.kenrockwell.com/apple/iphone-5/audio-quality.htm.  According to him, full output is about 1.4V peak-to-ground, with an output impedance of 4.5 ohms.  With a 2.5V offset, that'll give ADC read ranging between roughly 225 and 800, at full output.


Now , with my teacher I did a circuit after the previous preamp and I have in the input of arduino a signal between 1v and 4v more or less because with the picking up of the guitar sometimes if I play hard the string I can have 5v so from 1v to 4v would be enough. Now the second problem is to use a librarie that says me what frecuency is  on arduino input. I tried with ArduinoFFT and saw one FIx_FFT..

any help!? thanks!


I tried with ArduinoFFT ...
What did you try?  What did you expect it to do, and what did it do? 

If you answer those questions, and post code and a schematic, it can only help.


I think I understand the way fft works.. I need to  read frecuencys from my guitar that are going to be between 1hz and 1kHz so I should use 2khz sample rate. Then I will get 2 arrays one from real number and another with the imaginary , I should do the module from both and get another array, and in this final array I need to look for the maximux(that is the amplitude)) and that maximun I have to divid by the sample number and multiply sample rate, and I have the frecuency of the sine that im looking for..

Am i Right? Or Am I completely lost ? haha


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131