Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]

Just two ICs can create an accurate guitar tuner



Contributing Author  |   ED Online ID #6264  |   September 14, 1998

Article Rating: Not Rated

Accurately measuring the frequency of a low-frequency signal takes many cycles, and is difficult on signals of relatively short duration. Measuring the period of such signals can be done rapidly and with great accuracy with the circuit presented here. It measures the period of a vibrating guitar string, checks it against the desired period, and displays the result on an LED display. All that’s required is to input the frequency from the guitar. The display will indicate which note is being played, and whether it’s Sharp, OK, or Flat.

U1 is used for input conditioning of the signal from the guitar, which is far from sinusoidal. U2 displays the note and the condition of the note. U1 can be any rail-to-rail low-power op amp, such as the LM6484. U1A provides frontend gain. Most guitars have a relatively low output (−20 to −30 dB). U1B is a low-pass filter that attenuates the higher order harmonics, and U1C is a peak detector. U1D takes 90% of the peak and compares it to the low-passed signal, producing a narrow pulse at the top of the signal. This signal drives the IRQ input of the 68HC705 processor.

The cleaned-up and squared-up output of U1 usually has some edge jitter due to the presence of upper harmonics present on the guitar string. Therefore, the processor averages three periods to reduce the effective edge jitter by a factor of 3. The software counts the internal clock pulses for three periods of the waveform. At the beginning of the fourth pulse, it resets the internal counter, calculates the period, and logically decides which note is being played and whether it’s Sharp, OK, or Flat. It then updates the display accordingly. At the next input pulse, the process starts again. If the counter ever overflows (from no input provided), the LEDs are turned off, indicating no valid input.

The basic timing accuracy is determined by the crystal used in the HC705 oscillator circuit. Using the 4.00-MHz crystal shown, the microprocessor can resolve to the nearest 2 µs of period, much more accuracy than required for guitar tuning. The LED display uses very little power. When in use, one of processor outputs A0 through A4 is driven high, and one of A5 through A7 is pulled low. This allows about 3 mA to illuminate both selected LEDs. Highoutput LEDs will give a clear indication at 3 mA. The B0 port of the chip produces the waveform shown in Figure 2, as an aid in making the circuit work with very complex waveforms.

Note: This circuit was developed to tune a five-string bass guitar. The lowest note is a low B with a frequency of 30.8677 Hz and a period of 32.3963 ms. The highest note is a G with a frequency of 97.9989 Hz and a period of 102.0420 ms. The range for OK was set arbitrarily at ±0.5% of exact pitch. Also, the decision threshold for determining whether the note was a G or a D was placed midway between the notes.

This method can be used to determine other low-frequency periods by adapting the number of periods counted and setting the acceptance threshold accordingly. For simple digital signals, the front-end analog processor can be eliminated. More complex front-end signal processing may be needed for instruments other than a bass guitar. This particular software has a maximum period measurement of 130 ms, corresponding to approximately 23 Hz.

(To see the complete software listing for this guitar tuner, go to Electronic Design’s web site at “www.elecdesign.com” and click on “Ideas For Design” icon on the home page.)

See associated figure




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (177 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (169 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (72 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (71 views today)
    5) Bidirectional H-Bridge DC-Motor Motion Controller
    (55 views today)
    ALL TOP 20







    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
    (Acceptable Use Policy)
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources