{"id":52307,"date":"2026-11-01T10:50:55","date_gmt":"2026-11-01T10:50:55","guid":{"rendered":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/"},"modified":"2026-11-01T10:50:55","modified_gmt":"2026-11-01T10:50:55","slug":"passive-buzzer-tones","status":"publish","type":"siratek_tutorial","link":"https:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/","title":{"rendered":"Play Tones with a Passive Buzzer"},"content":{"rendered":"<body><p><\/p>\n<h2>What it does<\/h2>\n<p>A passive buzzer is a small sounder with no electronics inside. It makes no sound on its own: whatever frequency you feed it is the pitch you hear. That is the difference between the two kinds of buzzer Siratek sells, and choosing the wrong one is the most common disappointment with this part.<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>Passive buzzer<\/th>\n<th>Active buzzer<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Inside<\/td>\n<td>Just the sounding element<\/td>\n<td>A built-in oscillator<\/td>\n<\/tr>\n<tr>\n<td>Driven with<\/td>\n<td>A changing signal, such as <code>tone()<\/code><\/td>\n<td>A steady voltage<\/td>\n<\/tr>\n<tr>\n<td>Pitch<\/td>\n<td>Whatever you ask for<\/td>\n<td>Fixed by the manufacturer<\/td>\n<\/tr>\n<tr>\n<td>Good for<\/td>\n<td>Melodies, alarms with different pitches, feedback tones<\/td>\n<td>A single beep with the least possible code<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Use a passive buzzer when the pitch matters. Use an active one when you only need a noise.<\/p>\n<h2>Before you begin<\/h2>\n<h3>Required parts and tools<\/h3>\n<ul>\n<li>An Arduino Uno or compatible board, already set up.<\/li>\n<li>One passive buzzer.<\/li>\n<li>A breadboard and two jumper wires.<\/li>\n<li>A USB data cable.<\/li>\n<\/ul>\n<h3>Identify which one you have<\/h3>\n<p>If the two are mixed together, the quickest test is to connect the buzzer briefly between <code>5V<\/code> and <code>GND<\/code>. An active buzzer sounds immediately at its own pitch. A passive one gives a faint click and nothing more.<\/p>\n<p>Many passive buzzers have an open underside with the element visible, while active ones are sealed. That is a useful hint, not a rule, so test rather than trust it.<\/p>\n<h3>Polarity<\/h3>\n<p>Most of these buzzers are marked, usually with a <code>+<\/code> on the top or a longer positive leg. A passive buzzer connected the wrong way round will still make a sound, but get into the habit now, because the active type does care and so does nearly everything else with a <code>+<\/code> on it.<\/p>\n<h3>Safety and comfort<\/h3>\n<p>The current is small and within what a pin can supply, so this is electrically safe.<\/p>\n<p>It is, however, genuinely unpleasant to work next to. Keep test tones short, and put a resistor of around 100 ohms in series with the signal wire if you are going to be listening to it for an afternoon. That reduces the volume without affecting the pitch.<\/p>\n<h2>Pin reference<\/h2>\n<table>\n<thead>\n<tr>\n<th>Pin or label<\/th>\n<th>Connect to<\/th>\n<th>Purpose<\/th>\n<th>Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-<\/code> or the shorter leg<\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td>Return path<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><code>+<\/code> or <code>S<\/code> or the longer leg<\/td>\n<td>Uno <code>D8<\/code><\/td>\n<td>The driving signal<\/td>\n<td>Any digital pin, but see the warning below<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Choose the pin with care<\/h3>\n<p><code>tone()<\/code> works by taking over one of the chip\u2019s hardware timers. On an Uno that is Timer 2, which is also what produces PWM on pins <code>3<\/code> and <code>11<\/code>.<\/p>\n<p>So while a tone is playing, <code>analogWrite()<\/code> on pins 3 and 11 will not behave. If your project dims an LED on one of those pins and also makes sounds, move the LED to pin 5, 6, 9 or 10. This catches people out badly, because nothing reports an error; the brightness simply stops responding.<\/p>\n<p>Pin <code>8<\/code> is used here because it is clear of that conflict and of the serial pins.<\/p>\n<figure class=\"siratek-tutorial-figure\"><img decoding=\"async\" src=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg\" alt=\"Passive buzzer wired to an Arduino Uno, positive leg to pin 8 through an optional 100 ohm resistor, negative leg to ground\" loading=\"lazy\"><figcaption>The resistor is optional and only reduces the volume.<\/figcaption><\/figure>\n<h2>Wiring steps<\/h2>\n<ol>\n<li>Unplug the USB cable.<\/li>\n<li>Place the buzzer on the breadboard with each leg in its own row.<\/li>\n<li>Connect the negative leg to <code>GND<\/code>.<\/li>\n<li>Connect the positive leg to digital pin <code>8<\/code>, with a 100 ohm resistor in series if you want it quieter.<\/li>\n<li>Plug the USB cable back in.<\/li>\n<\/ol>\n<h2>Software and libraries<\/h2>\n<p>No library is required. <code>tone()<\/code> and <code>noTone()<\/code> are part of the Arduino core.<\/p>\n<p>Three forms are available:<\/p>\n<ul>\n<li><code>tone(pin, frequency)<\/code> starts a tone and leaves it running.<\/li>\n<li><code>tone(pin, frequency, duration)<\/code> plays for a set number of milliseconds and stops itself. It does <strong>not<\/strong> block, so the program continues immediately.<\/li>\n<li><code>noTone(pin)<\/code> stops a tone started by the first form.<\/li>\n<\/ul>\n<p>Only one tone can play at a time. Calling <code>tone()<\/code> on a second pin stops the first.<\/p>\n<h2>Minimal working example<\/h2>\n<pre><code>\/\/ Siratek: passive buzzer, three tones in sequence.\n\nconst int buzzerPin = 8;\n\nvoid setup() {\n  Serial.begin(9600);\n  Serial.println(\"Siratek: buzzer starting.\");\n}\n\nvoid loop() {\n  Serial.println(\"A4 440 Hz\");\n  tone(buzzerPin, 440);     \/\/ Concert A.\n  delay(500);\n\n  Serial.println(\"C5 523 Hz\");\n  tone(buzzerPin, 523);\n  delay(500);\n\n  Serial.println(\"E5 659 Hz\");\n  tone(buzzerPin, 659);\n  delay(500);\n\n  noTone(buzzerPin);        \/\/ Silence.\n  delay(1000);\n}<\/code><\/pre>\n<h3>A short melody<\/h3>\n<p>Two arrays, read in step, are all a simple tune needs. The brief gap between notes is what stops two of the same pitch running into each other.<\/p>\n<pre><code>\/\/ Siratek: playing a short melody on a passive buzzer.\n\nconst int buzzerPin = 8;\n\nconst int notes[] = { 262, 294, 330, 349, 392 };   \/\/ C D E F G\nconst int durations[] = { 300, 300, 300, 300, 600 };\nconst int noteCount = 5;\n\nvoid setup() {\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  for (int i = 0; i &lt; noteCount; i++) {\n    tone(buzzerPin, notes[i], durations[i]);\n\n    \/\/ Wait for the note, plus a small gap so notes stay separate.\n    delay(durations[i] + 50);\n  }\n\n  noTone(buzzerPin);\n  delay(2000);\n}<\/code><\/pre>\n<p>Useful frequencies, if you want to extend it: middle C is 262 Hz, and each octave up doubles the number. A 880 is one octave above A 440.<\/p>\n<h2>Expected result<\/h2>\n<p>Three rising tones, half a second each, then a second of silence, repeating. The Serial Monitor at 9600 baud names each one as it plays.<\/p>\n<p>The melody sketch plays five rising notes and pauses.<\/p>\n<p>A passive buzzer is not a loudspeaker, so the sound is thin and the very low and very high frequencies will be quiet or inaudible. Somewhere in the region of a few hundred hertz to a few kilohertz is where these parts are loudest.<\/p>\n<h2>Troubleshooting<\/h2>\n<table>\n<thead>\n<tr>\n<th>Symptom<\/th>\n<th>Likely cause<\/th>\n<th>Check or fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>No sound at all<\/td>\n<td>No <code>GND<\/code>, or wrong pin<\/td>\n<td>Check both wires, then the pin number in the sketch<\/td>\n<\/tr>\n<tr>\n<td>Faint clicking only<\/td>\n<td><code>digitalWrite()<\/code> used instead of <code>tone()<\/code><\/td>\n<td>A passive buzzer needs a changing signal<\/td>\n<\/tr>\n<tr>\n<td>One fixed pitch whatever you ask<\/td>\n<td>It is an active buzzer<\/td>\n<td>Use a passive one for melodies<\/td>\n<\/tr>\n<tr>\n<td>Sound never stops<\/td>\n<td><code>tone()<\/code> without duration, and no <code>noTone()<\/code><\/td>\n<td>Add <code>noTone(buzzerPin)<\/code><\/td>\n<\/tr>\n<tr>\n<td>Notes run together<\/td>\n<td>No gap between them<\/td>\n<td>Add 50 ms to the wait after each note<\/td>\n<\/tr>\n<tr>\n<td>Very quiet at some pitches<\/td>\n<td>Outside the element\u2019s useful range<\/td>\n<td>Stay within a few hundred Hz to a few kHz<\/td>\n<\/tr>\n<tr>\n<td>PWM on pin 3 or 11 stopped working<\/td>\n<td><code>tone()<\/code> has taken Timer 2<\/td>\n<td>Move that output to pin 5, 6, 9 or 10<\/td>\n<\/tr>\n<tr>\n<td>Second buzzer silent<\/td>\n<td>Only one tone plays at a time<\/td>\n<td>Drive them in turn, not together<\/td>\n<\/tr>\n<tr>\n<td>Painfully loud<\/td>\n<td>No series resistor<\/td>\n<td>Fit about 100 ohms in the signal wire<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Next steps<\/h2>\n<ul>\n<li><strong>Easier first:<\/strong> <em>Read a Push Button<\/em>, so a press can trigger the sound.<\/li>\n<li><strong>Related product:<\/strong> the active buzzer, when a single fixed beep is all a project needs.<\/li>\n<li><strong>Next project:<\/strong> add the buzzer to the pedestrian crossing, sounding while the crossing phase runs.<\/li>\n<\/ul>\n<h2>Sources and attribution<\/h2>\n<p>All text, wiring guidance and code in this tutorial are original Siratek work.<\/p>\n<ul>\n<li>Arduino core documentation and source for <code>tone()<\/code>, <code>noTone()<\/code> and the timer they use.<\/li>\n<li>Note frequencies are from the standard equal-tempered scale at A4 = 440 Hz.<\/li>\n<\/ul>\n<p>Buzzer polarity marking and the open or sealed body differ between suppliers, so both are described as things to check on the part in hand. No third-party tutorial text, diagrams, photographs or code has been reproduced here.<\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>A passive buzzer is a small sounder with no electronics inside. It makes no sound on its own: whatever frequency you feed it is the pitch you hear. That is the difference between the two kinds of buzzer Siratek sells,&#8230;<\/p>\n","protected":false},"featured_media":0,"template":"","siratek_tutorial_level":[],"class_list":["post-52307","siratek_tutorial","type-siratek_tutorial","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Play Tones with a Passive Buzzer - siratek<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Play Tones with a Passive Buzzer - siratek\" \/>\n<meta property=\"og:description\" content=\"A passive buzzer is a small sounder with no electronics inside. It makes no sound on its own: whatever frequency you feed it is the pitch you hear. That is the difference between the two kinds of buzzer Siratek sells,...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/\" \/>\n<meta property=\"og:site_name\" content=\"siratek\" \/>\n<meta property=\"og:image\" content=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/\",\"url\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/\",\"name\":\"Play Tones with a Passive Buzzer - siratek\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/passive-buzzer-tones-wiring.svg\",\"datePublished\":\"2026-11-01T10:50:55+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/#primaryimage\",\"url\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/passive-buzzer-tones-wiring.svg\",\"contentUrl\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/passive-buzzer-tones-wiring.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/passive-buzzer-tones\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/siratek.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Play Tones with a Passive Buzzer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\",\"url\":\"https:\\\/\\\/siratek.net\\\/\",\"name\":\"siratek\",\"description\":\"Your Best Electronic Retail Shop\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/siratek.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Play Tones with a Passive Buzzer - siratek","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":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/","og_locale":"en_US","og_type":"article","og_title":"Play Tones with a Passive Buzzer - siratek","og_description":"A passive buzzer is a small sounder with no electronics inside. It makes no sound on its own: whatever frequency you feed it is the pitch you hear. That is the difference between the two kinds of buzzer Siratek sells,...","og_url":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/","og_site_name":"siratek","og_image":[{"url":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/","url":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/","name":"Play Tones with a Passive Buzzer - siratek","isPartOf":{"@id":"https:\/\/siratek.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/#primaryimage"},"image":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/#primaryimage"},"thumbnailUrl":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg","datePublished":"2026-11-01T10:50:55+00:00","breadcrumb":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/#primaryimage","url":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg","contentUrl":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/passive-buzzer-tones-wiring.svg"},{"@type":"BreadcrumbList","@id":"http:\/\/siratek.net\/index.php\/tutorials\/passive-buzzer-tones\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/siratek.net\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/siratek.net\/index.php\/tutorials\/"},{"@type":"ListItem","position":3,"name":"Play Tones with a Passive Buzzer"}]},{"@type":"WebSite","@id":"https:\/\/siratek.net\/#website","url":"https:\/\/siratek.net\/","name":"siratek","description":"Your Best Electronic Retail Shop","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/siratek.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial"}],"about":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/types\/siratek_tutorial"}],"version-history":[{"count":0,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52307\/revisions"}],"wp:attachment":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/media?parent=52307"}],"wp:term":[{"taxonomy":"siratek_tutorial_level","embeddable":true,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial_level?post=52307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}