Hi, I am trying to connect a simple buzzer to arduino with an 2n3904 npn transistor. so i did connect it in the breadboard like in the picture attached
theres a pulldown resistor, the transistor base resistor, then it goes to a potentiometer to somehow adjust the volume of the buzzer.
I did this a couple of weeks ago and (as far as I remember) it worked. So when I pulled the arduino output pin high, the buzzer sounded, and stopped when the pin is low.
Now im trying to do the same but in a perfboard instead of a breadboard. I have soldered everything but… it works backwards! i.e I have to make the pin LOW in order for the buzzer to sound.
(this perfboard contains also other components, but it all is working ok except for the buzzer)
so… what am i doing wrong?
as a side note… when i was testing it still in the breadboard, i though i was using a 10k base resistor and a 1K pulldown resistor. when i went to solder the perfboard, i measured the resistors of the breadboard and they were both 1k… so i soldered in the perfboard 1k resistors too. Could this be the problem? (even tho, as I said, i think it worked ok…)