<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Connecting a Low Power Buzzer to a GPIO on nrf51 DK (PCA10028)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45896/connecting-a-low-power-buzzer-to-a-gpio-on-nrf51-dk-pca10028</link><description>Hi, I have my nrf51 Dk (PCA10028) on which I want to connect a buzzer or speaker to one of the gpio pins which are not in use. I am confused on the following points: 
 1. Should the the buzzer be connected to a breadboard with one cable connected to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Apr 2019 16:18:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45896/connecting-a-low-power-buzzer-to-a-gpio-on-nrf51-dk-pca10028" /><item><title>RE: Connecting a Low Power Buzzer to a GPIO on nrf51 DK (PCA10028)</title><link>https://devzone.nordicsemi.com/thread/181386?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 16:18:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73a2ecd6-520e-41d7-a209-12dd486eb7fb</guid><dc:creator>Joseph Ayuk</dc:creator><description>&lt;p&gt;Thanks for the reply &lt;a href="https://devzone.nordicsemi.com/members/marjeris-romero"&gt;Marjeris Romero&lt;/a&gt;, I have understood how it works&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connecting a Low Power Buzzer to a GPIO on nrf51 DK (PCA10028)</title><link>https://devzone.nordicsemi.com/thread/180934?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 08:14:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f007348-d248-41c6-a75c-d7ffd0db6f37</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Joseph,&lt;/p&gt;
&lt;p&gt;You can use PWM to generate sounds with a piezo buzzer. You will need to change the frequency and/or duty cycle to make different pitches/tones. To make a simple melody you can play one tone for a fixed number of seconds, then change to a different tone for a fixed number of seconds, and so on, using an app timer to generate the PWM output. For a starting point, take a look at the PWM library example in our SDK &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v12-3-0/pwm_example"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The example uses 2 channels, and drives GPIO pins 17 and 18, which connects to LED1 and LED2 on the DK. For 1 channel PWM use APP_PWM_DEFAULT_CONFIG_1CH instead.&lt;/p&gt;
&lt;p&gt;The increase in power consumption will depend on how much is the current draw from the buzzer and how long do you plan to play the tunes.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>