how can a buzzer be used to alert a sound?

Thread Starter

shiny1245

Joined Oct 20, 2012
1
hello,

i am working on a project which uses a keypad, LCD with PIC16F877A, so can i please know how a buzzer can be used to alert a sound when a wrong password is entered through the keypad?

thank you.
 

Dodgydave

Joined Jun 22, 2012
11,277
You will have to alter the software, so when the incorrect password/code is input, then output a bit on a port for say 1 second.
 

gehan_s

Joined Sep 17, 2012
38
hi shiny,
as the early reply suggested you have to alter the software and you might want to use a transistor switch without driving it straight from the O/P pin so the pic won't be supplying the current directly to the buzzer. the supply voltage (9V shown here) will change according to your buzzer specifications but it will work ok with 5V. as for the transistor you can use any general purpose NPN transistor.

http://www.jbprojects.net/projects/wifirobot/buzzer_circuit.jpg

any GPIO pin will work
 
Top