User Tools

Site Tools


oak:tutorials:buzzer

This is an old revision of the document!


Oak: Making Noise with the Buzzer

This lesson will show you how to connect the 3.3v Active Buzzer to your Oak and make it beep morse code.

Components Used:

Part Quantity Identification
Oak with soldered headers 1
Breadboard 1
3.3v Active Buzzer 1
M to M 30cm Jumper Wire 2 Red, Black

Concepts:

Piezo Buzzers: In this lesson we will be using a Piezo buzzer to make sound. We will be achieving this by turning it on and off, much like an LED.

A piezo buzzer

A piezo buzzer is a sandwich of two different conductive metals. When voltage is applied to the two different metals it bends, creating waves in air - which we call sound. They are usually small and circular and can be found in anything that provides an annoying beep.

We can make a piezo buzzer beep like this in code:

 // turn pin 9 "on" by making the voltage HIGH)
  digitalWrite(1, HIGH);

Where digitalWrite(1, HIGH); means turn Pin1 fully on. Don't forget to turn it off again!

Circuit:

Buzzer

Remember that when connecting a buzzer, you must pay attention to the (+) sign on the top of the buzzer casing. The (+) sign represents the positive connector and is where the red wire from pin 1 must go. If you get this backwards your buzzer may stop working.

Code:



Explanation of code

Conclusion:

Where to go from here, potential uses, etc.

oak/tutorials/buzzer.1458972556.txt.gz · Last modified: 2016/03/25 23:09 by nog3