{"id":6794,"date":"2025-09-10T12:42:06","date_gmt":"2025-09-10T10:42:06","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=6794"},"modified":"2025-09-10T21:04:44","modified_gmt":"2025-09-10T19:04:44","slug":"arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/","title":{"rendered":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel"},"content":{"rendered":"<p>The <strong>Goertzel Algorithm<\/strong> is an optimized Discrete Fourier Transform (DFT) that can detect defined frequencies. It can be used e.g. to identify <strong>DTMF keys<\/strong>.<\/p>\n<p>DTMF keys conist of 2 tones that can be described by the following diagram:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png\" alt=\"\" width=\"261\" height=\"193\" class=\"alignnone size-full wp-image-6795\" \/><\/p>\n<p>In the Arduino Audio Tools library we can use the <a href=\"https:\/\/pschatzmann.github.io\/arduino-audio-tools\/classaudio__tools_1_1_goertzel_stream.html\">GoertzelStream<\/a> to build a simple DTMF detector.<\/p>\n<h3>Arduino Sketch<\/h3>\n<p>The <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/blob\/main\/examples\/examples-audiokit\/streams-audiokit-goertzel\/streams-audiokit-goertzel.ino\">example<\/a> can be found in the examples and I was using an <strong>AI Thinker AudioKit<\/strong> for testing.<\/p>\n<p><em>The sketch is basically just copying the audio from an configured AudioBoardStream to a configured Goertzerstream!<\/em><\/p>\n<p>When defining a frequency, we can optionally pass an object. In my case I just use an instance to a DTMF class, which can be used to identify the row and colum id.<\/p>\n<p>After identifying a row and a column, we just print out the corresponding character.<\/p>\n<p>This is just a simple,\u00a0 minimal example, which can be easily extended to make it more reliable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Goertzel Algorithm is an optimized Discrete Fourier Transform (DFT) that can detect defined frequencies. It can be used e.g. to identify DTMF keys. DTMF keys conist of 2 tones that can be described by the following diagram: In the Arduino Audio Tools library we can use the GoertzelStream to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6795,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,22],"tags":[],"class_list":["post-6794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-machine-sound"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"The Goertzel Algorithm is an optimized Discrete Fourier Transform (DFT) that can detect defined frequencies. It can be used e.g. to identify DTMF keys. DTMF keys conist of 2 tones that can be described by the following diagram: In the Arduino Audio Tools library we can use the GoertzelStream to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-10T10:42:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-10T19:04:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png\" \/>\n\t<meta property=\"og:image:width\" content=\"261\" \/>\n\t<meta property=\"og:image:height\" content=\"193\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel\",\"datePublished\":\"2025-09-10T10:42:06+00:00\",\"dateModified\":\"2025-09-10T19:04:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/\"},\"wordCount\":165,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/dtmf.png\",\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/\",\"name\":\"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/dtmf.png\",\"datePublished\":\"2025-09-10T10:42:06+00:00\",\"dateModified\":\"2025-09-10T19:04:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/dtmf.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/dtmf.png\",\"width\":261,\"height\":193},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/09\\\/10\\\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann","og_description":"The Goertzel Algorithm is an optimized Discrete Fourier Transform (DFT) that can detect defined frequencies. It can be used e.g. to identify DTMF keys. DTMF keys conist of 2 tones that can be described by the following diagram: In the Arduino Audio Tools library we can use the GoertzelStream to [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/","og_site_name":"Phil Schatzmann","article_published_time":"2025-09-10T10:42:06+00:00","article_modified_time":"2025-09-10T19:04:44+00:00","og_image":[{"width":261,"height":193,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png","type":"image\/png"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel","datePublished":"2025-09-10T10:42:06+00:00","dateModified":"2025-09-10T19:04:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/"},"wordCount":165,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png","articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/","url":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/","name":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png","datePublished":"2025-09-10T10:42:06+00:00","dateModified":"2025-09-10T19:04:44+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2025\/09\/dtmf.png","width":261,"height":193},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/09\/10\/arduino-audio-tools-builing-a-simple-dtmf-detector-using-goertzel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=6794"}],"version-history":[{"count":12,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6794\/revisions"}],"predecessor-version":[{"id":6807,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6794\/revisions\/6807"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/6795"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=6794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=6794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=6794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}