ericmar
Full Member level 5
how to connect piezo to operate 12v switch
Hi guys,
I plan to use a transistor as a switch to control the a +12V buzzer by my microcontroller (PIC16F877). I tried using a 2N3904 but the volume is too soft. So I tried another transistor, BC639, but it's not working correctly. It seems that when I used the BC639, the transistor is ON all the time so my microcontroller cant control the buzzer at all.
Basically, the way I connect the transistor to the buzzer and power is as the following. I connect +12V to the positive if the buzzer then connect the negative of the buzzer to the collector of transistor. I used a 220Kohm resistor in between of the microcontroller and the base of the transitor. Lastly, I connect the emitter of the transistor to ground!
I have a look on both datasheets, it seems that both can be used as an amplifier and switch. But the BC639's datasheet doesnt tell anything about the ON and OFF characteristics!?
Thanks for any help!
Regards,
Eric
Hi guys,
I plan to use a transistor as a switch to control the a +12V buzzer by my microcontroller (PIC16F877). I tried using a 2N3904 but the volume is too soft. So I tried another transistor, BC639, but it's not working correctly. It seems that when I used the BC639, the transistor is ON all the time so my microcontroller cant control the buzzer at all.
Basically, the way I connect the transistor to the buzzer and power is as the following. I connect +12V to the positive if the buzzer then connect the negative of the buzzer to the collector of transistor. I used a 220Kohm resistor in between of the microcontroller and the base of the transitor. Lastly, I connect the emitter of the transistor to ground!
I have a look on both datasheets, it seems that both can be used as an amplifier and switch. But the BC639's datasheet doesnt tell anything about the ON and OFF characteristics!?
Thanks for any help!
Regards,
Eric