Hardware Hookup
In this section, we'll go over how to connect the Qwiic Buzzer to an Arduino microcontroller.
Connecting to the Qwiic I2C Port
Insert a Qwiic cable between the Qwiic Buzzer and your Arduino microcontroller. Then connect a USB cable between the Arduino microcontroller and your computer's COM port. In this case, we used the RedBoard Plus with ATmega328P.
With the Qwiic Buzzer, you can daisy chain more than one buzzer! Typically on an Arduino, you could only use the tone()
function with one buzzer at a time and the function could also interfere with other PWM output pins as well. Controlling the Qwiic Buzzer through I2C allows you to play multiple buzzers simultaneously. Just make sure to configure the address of the buzzer and make another instance of any additional buzzer in the code should you decide to control each buzzer separately.
Note
When daisy chaining both boards, you can control both simultaneously when using the same address.
Connecting via PTH
For temporary connections to the PTHs on the edge of the board, you could use IC hooks to test out the pins. However, you'll need to solder headers or wires of your choice to the board for a secure connection. You can choose between a combination of header pins and jumper wires, or stripping wire and soldering the wire directly to the board.
For the custom resistor, you will need to bend the resistor's terminals and insert it into the PTHs where it says USER. You can solder the terminals from the bottom or top. Depending on the size of the resistor, the resistor may not sit flush against the board. You may need to bend the terminals in and push the resistor to the side. The image shown below on the left shows a 1/4 watt resistor with thick leads not sitting flush against the footprint. For those inserting the resistor from the bottom, make sure to have enough room to cut the jumper labeled as JP1 before soldering the resistor's terminals. Of course, make sure to cut off the excess terminals after soldering the resistor and carefully clean the board.
Warning
When cleaning the board, make sure that the buzzer is not submerged under water.
You can also carefully pull the two inner pins out of a 1x4 standard male header pin using pliers, solder the remaining two into the board, and insert the Qwiic Buzzerinto a breadboard. This is useful for those interested in using a 10kΩ potentiometer to control the volume.
Note
By sacrificing two inner male pins from the 1x4 header, the remaining plastic spacers will help keep the single square pins in place as you solder them to the board.
Stand-Alone Mode
For users that simply need to trigger a beeping noise, all you need to do is power the Qwiic Buzzer and ground the trigger pin! If you have a 3.3V voltage regulator, simply connect 3.3V and ground to the Qwiic Buzzer. Then connect the TRIG pin to GND using either a momentary button or jumper wire.
SparkFun Buck Regulator Breakout 3.3V (AP63203) Pins |
Button | Qwiic Buzzer Pins |
---|---|---|
3V3 | 3V3 | |
GND | Common | GND |
Normally Open (NO) | TRIG |
SparkFun Buck Regulator Breakout 3.3V (AP63203) Pins |
Button | 10kΩ Trim Pot | Qwiic Buzzer Pins |
---|---|---|---|
3V3 | 3V3 | ||
GND | Common | GND | |
Normally Open (NO) | TRIG | ||
Pin 2 (i.e. Center Pin) |
USER PTH 1 (The PTH closest to the Buzzer) |
||
Pin 1 or 3 | USER PTH 2 (The PTH closest to the Qwiic Connector) |