For this lab, I was tasked with making multiple electrical circuits to produce sound with a piezo buzzer, buttons, various resistors and/or sensors, jumper wires, LEDs, USB power, and SparkFun breadboard and RedBoard Qwiic. The circuits got progressively more difficult to put together as newer electrical components were needed. The final circuit involved using the knowledge I learned from assembling the first two circuits to create a game of "Simon Says" in which LEDs flash a pattern of different colors and a player must repeat the pattern by pressing similarly colored buttons while a timer runs. Sounds of different tones are produced by a piezo buzzer after pressing the buttons and upon losing or winning the game.
From this lab, I was able to learn about what electronic components can be used in circuits made between a USB-powered microcontroller board and a breadboard to create sound, including buzzers and push buttons. Although the lab assignment regarding producing lights with a circuit taught me a lot about different electronic components, I didn’t learn how buzzers and buttons work or what their purposes are. Thus, I found out that buzzers work to produce different sound frequencies, and they do so when an electric current is applied to the inside piezo ceramic element that is surrounded by a metal vibration disc. As an electric current is applied to the buzzer via a magnetic coil, the ceramic disc contracts/expands, which then vibrates the metal plate and emits sound. Changing the sound fequencies emitted by the buzzer simply involves altering the pulse rate of the electrical current through the coil. Similarly, I found out that buttons can also be referred to as momentary switches, and they act as a user-input since they only remain in their ON state when they are being pressed. Buttons consist of two rows of legs consisting of four pins that are connected when the buttons are pressed.
Sound Circuit #1
Sound Circuit #2
Sound Circuit #3 - Lose
Sound Circuit #3 - Win