P
Peter
Guest
I have a keyboard attached to a PICAXE micro on a lonnnnng cable
(50m). I want to add a piezo to the keyboard so I can buzz it to
indicate invalid keystrokes etc. The Pic has the ability to control
the 3 LEDs on the keyboard so I figured it should be a simple matter
to connect a transistor and piezo to one of the LEDs then flash the
LED rapidly to produce the buzz in the piezo. I tried it last night,
both with a transistor and a mosfet without any luck. Any ideas? (PS.
I know that I could run a separate wire for the piezo but I do NOT
want to do that.)
Here is the LED circuit. The keyboard IC is between the LED and
ground:
+5V -----/\/\/\----->|---- KBD IC --- GND
680
So I figured I could just add a PNP transistor/P channel Mosfet before
the IC like this, and flash the LED at around 500Hz:
+5V -----/\/\/\----->|--.-- KBD IC --- GND
680 |
| +5V
| |
| /
| |/
'-/\/\--|
470 |\
\------- PIEZO ------ GND
I tried it with a PN200 transistor. Also with a MTP2955 MOSFET without
the gate resistor. Absolutely nothing. I know with an N channel Mosfet
you often need a resistor from gate to ground to bleed off the gate
charge. With the P channel I wasn't sure what was required. I tried a
10k between gate and Source and also Gate and Drain but still nothing.
What am I doing wrong? (I didn't have the long cable attached when
testing, just the standard one.) I did notice strangely that when I
put a DMM across the Piezo to check the voltage across it it did give
a very faint hum.
(50m). I want to add a piezo to the keyboard so I can buzz it to
indicate invalid keystrokes etc. The Pic has the ability to control
the 3 LEDs on the keyboard so I figured it should be a simple matter
to connect a transistor and piezo to one of the LEDs then flash the
LED rapidly to produce the buzz in the piezo. I tried it last night,
both with a transistor and a mosfet without any luck. Any ideas? (PS.
I know that I could run a separate wire for the piezo but I do NOT
want to do that.)
Here is the LED circuit. The keyboard IC is between the LED and
ground:
+5V -----/\/\/\----->|---- KBD IC --- GND
680
So I figured I could just add a PNP transistor/P channel Mosfet before
the IC like this, and flash the LED at around 500Hz:
+5V -----/\/\/\----->|--.-- KBD IC --- GND
680 |
| +5V
| |
| /
| |/
'-/\/\--|
470 |\
\------- PIEZO ------ GND
I tried it with a PN200 transistor. Also with a MTP2955 MOSFET without
the gate resistor. Absolutely nothing. I know with an N channel Mosfet
you often need a resistor from gate to ground to bleed off the gate
charge. With the P channel I wasn't sure what was required. I tried a
10k between gate and Source and also Gate and Drain but still nothing.
What am I doing wrong? (I didn't have the long cable attached when
testing, just the standard one.) I did notice strangely that when I
put a DMM across the Piezo to check the voltage across it it did give
a very faint hum.