43oh

# Ymir

Members

16

## Reputation Activity

1. Ymir got a reaction from Fmilburn in FFT
First, sorry for not answer before, but i was incredibly bussy and couldnt test neither circuits nor the code deep.

Anyway, I've used a function generator to test the accuracy and range of the code and it runs perfect from 30 Hz to 330Hz, i only tested my working range.

Moreover i've tested the circuits linearity, and they are incredibly linear.

So, with this results, i tested the input....when the input is direct from the guitar, the code runs, but when i use a microphone, suddenly appears a problem, the lowest string frequency, at 82Hz, it isnt detected but the code detect it second harmonic, more or less, and calculate 166Hz. So the problem is something with the microphone. Im using an electret microphone.

I tested the input from the microphone with an oscilloscope and seems not to recognize that lower frequency.

I'll do more experiments and coment the results.
2. Ymir got a reaction from Fmilburn in FFT
Yes, i modified the parameters to get a 1Hz resolution, giviing a 511Hz max frequency, it is true this values arent in the table.
#define LOG2N 10 //log base 2 of the number of points, e.g. LOG2N = 8 is 256 points #define FREQ_RESOLUTION 1 //Frequency resolution of output in Hz #define ANALOG_IN 27 //analog input pin #define ANALOG_RESOLUTION 12 //CPU specific The problem is that sometimes it works right and suddenly it works wrong, detecting the main frequency or double frec (the second harmonic). I think it is an aliasing problem.

Trying to solve this problem i implemented a little LP filter before calling FFT function, it reduces this blinking misfunction, but not solved it completely, but it appears less times and it detects the whole working range (70 - 350 Hz)
for (i = 1; i < nPts; i++) { int gain = 50; real[i] = (gain * real[i] + real[i-1])/(1+gain); //-----> gain= 10 o 50; } This is the amplifier i use to set the guitar signal before the ADC

3. Ymir got a reaction from roadrunner84 in Guitar Tuner
Hi everyone!

im trying to create a guitar tuner with my tm4c1294 but im having some problems. I also would like to use Systick .

The problem is that it not detect well the frecuency, "tiempo" variable doesnt increment as fast as it should. It should detect frequencies between 80 - 330Hz but doesnt detect anything

Could any one help me?

Thanks