7

I have a PS1240P02BT piezzo-electric buzzer. I want to drive it with a software generated 3.3V 4KHz square wave from one of the GPIOS.

What kind of resistor do I need between the buzzer and the GND pin?

I know practically nothing about electronics, so could you please explain like I'm five?

  • How are you generating the 4kHz in software? I think you'll need to use the pwm, otherwise every few cycles the tone will be interrupted when the process is preempted. – John La Rooy Mar 8 '13 at 2:24
  • I don't think a couple millisecond interruption will be noticeable. – n00 Mar 8 '13 at 5:47
  • It will be noticeable for sure. Whether it's important for your application or not is a different question – John La Rooy Mar 8 '13 at 7:03
4

There is a recommended circuit on page 7 of the data sheet

The transistor isn't critical, any small NPN should work fine.

1000 ohm should be ok for both resistors

NPN is one of the two types of bipolar transistors, consisting of a layer of P-doped semiconductor (the "base") between two N-doped layers. A small current entering the base is amplified to produce a large collector and emitter current. That is, when there is a positive potential difference measured from the emitter of an NPN transistor to its base (i.e., when the base is high relative to the emitter) as well as positive potential difference measured from the base to the collector, the transistor becomes active. In this "on" state, current flows between the collector and emitter of the transistor. Most of the current is carried by electrons moving from emitter to collector as minority carriers in the P-type base region. To allow for greater current and faster operation, most bipolar transistors used today are NPN because electron mobility is higher than hole mobility.

| improve this answer | |
  • For clarification could you please spell out the acronym for NPN? – tkeE2036 Mar 8 '13 at 0:07
  • 1
    @tkeE2036, It's not an acronym, it's a type of transistor. Roughly speaking "A layer of P-doped semiconductor between two N-doped layers." But that's not helpful if you don't know what "N-doped" and "P-doped" mean. It's usually much more useful to know what and NPN transistor is, without worrying about what NPN stands for. – John La Rooy Mar 8 '13 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.