how can a buzzer be used to alert a sound?

Discussion in 'The Projects Forum' started by shiny1245, Oct 20, 2012.

  1. shiny1245

    Thread Starter New Member

    Oct 20, 2012

    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.
  2. Dodgydave

    AAC Fanatic!

    Jun 22, 2012
    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.
  3. gehan_s

    Active Member

    Sep 17, 2012
    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.

    any GPIO pin will work