I am building a switch for a buzzer that will charge up a capacitor and sound the buzzer as they hold the button down. When they release the button the buzzer will fade away as the capacitor discharges. The Charging and discharging will only happen on the initial switch down (charge) and the switch up (discharge)
Everything works as expected and works well. But the question is why. I have used transistors to make switches and h-bridges before and understand the function and how to calculate the variety of currents and resistances, but the addition of the active buzzer has thrown me.
Part of the issue is that I know nothing about the active buzzer. It came in another kit with no information or part number. So basically I started with a high resistance for R1 and worked my way down until it worked (even a 470 Ohm resistor was to much). This is not a great way to do it, but I figured if I had a working model, I could reverse engineer why R1 had to be that resistance.
What I know from using my multimeter:
- The buzzer is a 5v buzzer
- The current on the Load when R1=220 is 13mA
So if I wanted to calculate R1 (or the current going into the base) without just using trial and error, how would I go about it? It just seems that a current of ~7mA is a lot to control a small load.
UPDATE
Sometimes you have to learn the hard way. Indeed the transistor was backwards. I was looking at the wrong spec sheet. credit to @JIm Dearden for first suggesting that and to @Olin Lathrop for crunching the numbers and reconfirming the backwards transistor debacle.