Buzz, Buzz, Buzz!

What does it do?

As you might remember or previously read on the Electronic Production assigment, I was creating a PCB that uses an ATtiny45 MCU to make a buzzer go beeep! You can see the process that led to having the actual board on my hands, this post is going to have the programming and testing process.

Inspiration Image

So, the first step is to program the board using an Arduino Uno board. It's one of the many ways to code an ATtiny45, but this one is one of the most straighforward ones. We need to connect the PWR and GND inputs (leg 8 and 4 to the GND and PWR inputs of the Arduino board), as well as the MISO, MOSI, and SCK inputs (legs 5,6, and 7 to the 10,11,12,and 13 inputs of the Arduino board).

Inspiration Image

Then it was a matter of loading the program in so it can be configured in the Arduino fashion, and then the basic buzzer code.

Arduino code setup

This is the first code, which is the Arduino ISP, used to configure the ATtiny45 for Arduino coding language use, now, I'm going to put this code in the file list at the bottom of the page, but you can also get it in the .INO app on your computer by clicking Files>Examples>Arduino ISP>ArduinoISP. This will open up the example in the app for you to use.

ISP1 ISP2

Now we use the other code, which is used for configuring the buzzer, now in this way as soon as the buzzer is connected and the PCB is powered, the buzzer is going to go off and make a curious sound.

Buzzer code

Sadly, I couldn't record the board with video, only audio, as the board kinda broke, but let me tell you, the buzzer is LOUD!



Files