Shop OBEX P1 Docs P2 Docs Learn Events
Guitar Tuner with LCD frequence readout in numbers — Parallax Forums

Guitar Tuner with LCD frequence readout in numbers

Keith HiltonKeith Hilton Posts: 150
edited 2011-01-24 00:53 in BASIC Stamp
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. Thankscry.gif

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-03-26 01:49
    Sorry, but you can only "sample & hold" a voltage.
  • Jeff DegeJeff Dege Posts: 85
    edited 2006-03-26 03:15
    You need the software to filter through the values detected and choose which one to display.

    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.
  • BeeboDaMooseBeeboDaMoose Posts: 10
    edited 2011-01-24 00:53
    by not using the pulsin command and freeing up the processor
    you can software filter the harmonics

    this requires an external 12 bit counter, with it's own 32khz clock ( clock crystal )
Sign In or Register to comment.