Guitar Tuner with LCD frequence readout in numbers
Keith Hilton
Posts: 150
The Guitar Tuner I built last year works. I used an LM324 to feed to the Basic Stamp, then out of the Basic Stamp to a small LCD display. I had my program where the LCD display reads the frequency of the string picked.·· It does not work great, because the frequency appears and quickly drops in number as a string decays.· It does not appear to be really accurate either.· I think I need some kind of sample and hold program.· Does anyone have any suggestions. Thanks
Comments
It's pretty typical for any sort of interface to measurements. I'm interfacing to a serial scale, and it returns rapidly-varying values. If you're standing on the scale, it's only the 10ths digit that fluctuates, but the 10ths digit is never stable. And of course, before you step on the scale and after you step off, all the digits jump all over the place.
What I do is sample every 10th of a second, and do a linear regression on the last five values. If the slope is not nearly flat, I just keep measuring. If it is, I compare the average to the reported value. If the average is greater than the reported value, I set the reported value to the average. (I don't know that this is the best way to handle this, but I'm currently running the software on a laptop, and processing cycles are cheap.)
It seems to be a fundamental part of dealing with any sort of numerical measurement of a non-continuous process.
you can software filter the harmonics
this requires an external 12 bit counter, with it's own 32khz clock ( clock crystal )