Shop OBEX P1 Docs P2 Docs Learn Events
Reading audio frequency with COUNT — Parallax Forums

Reading audio frequency with COUNT

BryanBryan Posts: 2
edited 2004-12-13 05:51 in BASIC Stamp
I'm trying to read the frequency of a plucked string on my guitar. Basically, I have the 1/4 inch output hooked into pin 0 on the BS2. I'm counting frequencies like this:

other:
vari VAR Word
COUNT 0, 1000, vari
DEBUG CLS, HOME, DEC vari, CLREOL
GOTO other

What I'm getting is a different number around approximately 600 every second, irregardless of whether a string has been plucked. Even when I mute all strings it is still reading a signal. Is this because I need a Schmidtt trigger or amplifier or both? Any info would be appreciated.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-12-13 05:51
    The output of your guitar is not directly compatible with the BS2. You may need to amplify it a bit, and then square up the input so that you have a nice clean TTL signal into the BS2. Remember that the BS2 has a transition point of about 1.4 volts, so you need to make sure that your signal passes through that. I'm not sure why you're getting the numbers you're getting though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.