How to input frequency measurements! PLEASE HELP
I need to find a way to measure the frequency of notes played on a violin, just like an electric tuner would. Is there any way to measure frequency using using BASIC Stamp???? I've heard that a schmitt trigger can be used to square the sine wave of something, but what exactly does that mean??? Finally, if the schmitt trigger can be used, where can I find one???
- Thank you for your help!!!
- Thank you for your help!!!

Comments
You can build your own Schmitt trigger using a comparator and a handful of passive components. Here's a schematic (untested) to get you started:
The Schmitt triggering results from the hysteresis provided by the 2.2M feedback resistor. Combined with the 47K input resistors, you'll get about a 1% hysteresis. To increase this, thus reducing the number of logic transistions, reduce the value of the feedback resistor.
The waveform shown below, demonstrates how the Schmitt triggering works:
Because of the positive feedback, there are two thresholds: the lower one when the output is high; the higher one, when the output is low. This creates a dead band, inside which transistions will not cause the output to change. The width of this deadband increases as the hysteresis is increased.
You will need to experiment with component values to ensure that only the fundamental frequency of the violin gets through, leaving the harmonic content in the dead band. An oscilloscope will come in very handy for this. You may still experience problems due to changing volume levels, since this circuit doesn't include an automatic gain control (AGC).
Assuming you are able to "clean up" your input waveform adequately, you can then use the PBASIC COUNT command to measure the frequency.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 2/25/2007 6:59:40 PM GMT