กลับไปหน้ารวมไฟล์
goertzel-algorithm-arduino-en.md

Digital Signal Processing: The Goertzel Algorithm

Standard sensors give you a single number (e.g., "It's 25 degrees"). But what if your input is a chaotic, noisy stream of audio? The Goertzel Algorithm project introduces you to Digital Signal Processing (DSP) by mathematically searching a microphone's input for a very specific frequency, like a dog whistle.

invisible_mess_glasses_relay_schema_1772681179521.png

Beating the FFT (Fast Fourier Transform)

Running a full FFT to analyze every frequency in a room destroys an Arduino's RAM and takes too much time. The Goertzel Algorithm is highly optimized. Instead of checking all frequencies, you tell the math equation, "I only care about 1,200 Hertz." The algorithm runs rapidly and outputs a definitive "Yes" or "No" if that exact tone is present in the noise.

The DTMF Tone Decoder Application

This algorithm is the exact math used by old telephone companies.

  1. When you press '1' on a keypad, it plays a "Dual-Tone Multi-Frequency" (e.g., a mix of 697Hz and 1209Hz).
  2. You place an Electret Microphone near an analog phone.
  3. The Arduino rapidly analogRead()s the audio.
  4. Two Goertzel algorithms run simultaneously. If they detect both 697Hz and 1209Hz simultaneously, the Arduino prints out: "Button '1' detected!"

Core System Usage

  • Arduino Uno/Nano: This math pushes the 8-bit chip to its absolute limits!
  • Microphone Amplifier (MAX4466): Essential for a clean analog wave input.
  • C++ DSP Knowledge: The math involves sines, cosines, and heavy floating-point arrays. It requires stripping away delay() and relying entirely on precise sample rates (e.g., sampling audio at exactly 8000Hz using hardware timers).

ข้อมูล Frontmatter ดั้งเดิม

title: "Goertzel Algorithm Frequency Detection"
description: "Detect the unseen! Use advanced mathematics to isolate and identify specific audio or electrical frequencies hidden within a noisy signal."
category: "Audio & Sound"
difficulty: "Advanced"