Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

New module: Piezo Buzzer


  • Please log in to reply
14 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 July 2012 - 08:28 PM

I'm happy to announce the new Piezo Buzzer module for Netduino Go.

Piezo Buzzer (go!bus module) (Amazon)

For international community members, they should also be available at Proto-Advantage and UAM within a few days.

To use the new Piezo Buzzer module, add the attached DLL to your project as a reference. Create an instance of the NetduinoGo.PiezoBuzzer class, and then set the frequency.

Here's an example which syncs the piezo buzzer's frequency with a potentiometer's position.

NetduinoGo.Potentiometer pot = new NetduinoGo.Potentiometer();
NetduinoGo.PiezoBuzzer buzzer = new NetduinoGo.PiezoBuzzer();

while (true)
{
    buzzer.SetFrequency(pot.GetValue() * 2000);
}
The Piezo Buzzer driver is included in the Netduino 4.2.0.1 SDK (on the Downloads page).

Chris

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 09 July 2012 - 10:03 PM

For those who want to play some tunes and are familiar with the old BASIC PLAY syntax, I made a small wrapper for the Netduino Go! Piezo Buzzer Module so it can use the Speaker-class I published earlier.

You'll find the sample code attached. It'll be updated later in the .NETMF Toolbox, but for now it's all in this zip file.

Also, Christoc made a very nice sample, available at http://forums.netdui...odule-tutorial/

Attached Files


"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 July 2012 - 10:11 PM

For those who want to play some tunes and are familiar with the old BASIC PLAY syntax, I made a small wrapper for the Netduino Go! Piezo Buzzer Module so it can use the Speaker-class I published earlier.

Whoa. That's a pretty epic sample for a piezo buzzer!

Now who can guess the tune?

Great work, Stefan. [Also, thanks for your tutorial christoc!]

Chris

#4 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 11 July 2012 - 10:42 PM

Mine's on it's way. Added another Pot Module and a new tip for my soldering iron to bump me into Super-Saver Shipping (free). This would be easier with a Secret Labs Module-of-the-Month-Club. ;)

#5 TinkeringTurtle

TinkeringTurtle

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 10 August 2012 - 08:51 PM

Any technical specifications for the actual buzzer hardware available?

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 August 2012 - 09:02 AM

Any technical specifications for the actual buzzer hardware available?

The piezo buzzer is muRata PN PKM13EPYH4000-A0.
http://www.digikey.c...KM13EPYH4000-A0

4KHz, 70dB @ 3V, 10cm

Chris

#7 TinkeringTurtle

TinkeringTurtle

    Advanced Member

  • Members
  • PipPipPip
  • 55 posts

Posted 15 August 2012 - 12:32 AM

Thanks a lot Chris.

#8 Pete Brown

Pete Brown

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationAnne Arundel County, MD

Posted 06 September 2012 - 01:33 AM

What's the recommended approach for silencing the piezo? Set the frequency to 0? Pete
Pete Brown - http://10rem.net (NETMF, C++, Windows, C64, and general geekery) Twitter: @pete_brown
I work for Microsoft. Opinions expressed here are my own and do not necessarily reflect those of my employer,our partners or customers.

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 September 2012 - 01:44 AM

Hi Pete,

What's the recommended approach for silencing the piezo? Set the frequency to 0?

Yes. For LEDs, changing the color to "0,0,0" will turn off the LED. Piezos follow a similar concept.

Should we think about adding a .Mute() function in the future? ;)

Chris

#10 Pete Brown

Pete Brown

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationAnne Arundel County, MD

Posted 06 September 2012 - 11:26 PM

Thanks Chris. No. I'm not a big fan of APIs with two functions doing identical work unless the context really requires it. Just add to driver intellisense docs for RGB LED and Piezo. Pete
Pete Brown - http://10rem.net (NETMF, C++, Windows, C64, and general geekery) Twitter: @pete_brown
I work for Microsoft. Opinions expressed here are my own and do not necessarily reflect those of my employer,our partners or customers.

#11 Christopher Clark

Christopher Clark

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationNorth Carolina, USA

Posted 11 September 2012 - 12:55 AM

I received my piezo buzzer module today, and when I went to use it, I found something interesting. If I try to use it in Socket 6, I get System Exception. If I try to use it in Socket 2, it works. My setup: Socket 1: Button Socket 3: Pot Socket 4: rgbLed Any reason I needed to use it in the first set of sockets?

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 September 2012 - 12:58 AM

Hi Christopher, That's very odd. It should work equally well in any of the GoPorts (sockets) on your mainboard. If you use the Piezo Buzzer by itself on the second set of ports, does it still throw the exception? Thanks for letting us know about this! Chris

#13 Patrick van Es

Patrick van Es

    Member

  • Members
  • PipPip
  • 14 posts

Posted 15 September 2012 - 02:41 PM

Hi Guys, I'm searching for a buzzer module for a gadgeteer project, can anyone tell me if this Piezo buzzer can work with gadgeteer (Fez Spider) as well? Thx!

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 September 2012 - 08:30 PM

Hi Patrick,

Hi Guys, I'm searching for a buzzer module for a gadgeteer project, can anyone tell me if this Piezo buzzer can work with gadgeteer (Fez Spider) as well?

The Piezo Buzzer module for Netduino Go is a plug-and-play module using GoBus, so it's really designed to specifically work with Netduino Go.

That said...if you buy one today it will be running GoBus 1.0. And in this particular case, you could grab the Netduino Go source (from the Downloads page) and use the Piezo Buzzer on a non-derated "S" socket on your Gadgeteer mainboard. Be sure to put pins 3-5 of the Gadgeteer module in "input, no pullup" or "open-drain high-z" mode.

You'll need to hack up the code a bit, but it's technically possible.

One critical requirement, if hacking these to work on a Gadgeteer mainboard, is to use these on an "S" socket which does not share pins with another socket. Otherwise the module can get unintended operations or, at worst, 5V signals which are too high for the 3.3V MCU inputs.

Just FYI, the Piezo Buzzer modules will receive an update to GoBus 1.5 later this year... You could still downgrade them to the GoBus 1.0 firmware if you need to hack more this way, but for best experience you'll want to use them with a GoBus-compliant mainboard.

Chris

#15 Patrick van Es

Patrick van Es

    Member

  • Members
  • PipPip
  • 14 posts

Posted 16 September 2012 - 09:48 AM

Chris, thanks for your answer. For now, I look further for a gadgeteer Piezo module, but I keep in mind that it technically should / could work. Patrick




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.