I created these notes to help better understand the role of the components we are soldering on the MAKERbuino. They also contribute towards an understanding of the schematic. Please feel free to suggest changes.
The 2n2222 Transistor
The 2n2222 is a very common NPN bipolar junction transistor transistor used in low-power circuits. If you don’t know how a transistor works, I suggest searching ‘transistor’ on YouTube and watching the videos on the first page of results for an introduction.
In this case the transistor is being used to amplify the audio signal (on the ‘SOUND’ line) to a level appropriate to drive the speaker. The amplified signal is on the ‘SPKR’ line. To understand this amplification circuit properly, you will need to have a thorough understanding of how the transistor works and how it can act as an amplifier in its forward active mode. Luckily, because the MAKERbuino emits only ‘beeps and bloops’, the amplifier circuit is very simple and so the transistor’s function is easy to see: it sinks current when it is activated, causing current to flow from the V_BAT line, through the speaker, and through it (the transistor) to ground.
The signal going into the base of the transistor therefore controls how much current goes through the speaker (the current will be proportional to the signal on the ‘sound’ line). I will discuss how that current generates sound in a note on the speaker.