Using a Square Wave Output

Hello,

I am constructing a clock, using the Maxim DS32B35 RTC; this has a Square Wave Output (configured to 4kHz). I want to use it to drive a piezo buzzer, and to be able to turn the buzzer on / off using an Aruino pin. Here is how I have it set up currently:

(see the next post)

The problem is that I don't think the Square Wave Output is saturating the transistor? It is much quieter than when driving the buzzer directly from Arduino pins (through a transistor).

What is the best way to improve the circuit? I suppose I could change the 5k pull-up resistor to a lower value, but this would needlessly increase the current usage (plus require the RTC to sink more current).

I don't think the Square Wave Output is saturating the transistor?

If that is the case use a darlington of a FET for T2.

I don't think the Square Wave Output is saturating the transistor

On the contrary :slight_smile: Through the 5k the transistor is always open. It might have difficulties to close, however... But it looks like an OC output.. I'll check in the datasheet. Yes, it is.

You generally do not implement a (N)AND gate at the driver end, but at the control end, i.e at the base of the (driving) transistor.
In your scheme you will loose 2x0.4Volts at the two emitter collector diodes!

In this special case (assumed OC SQW), you can connect the buzzer-out directly to the gate of the first transistor T1. Also change the base transistor to the Arduino pin then to 4.7k (rather than 1k). T2 is no longer needed.

As you use the transistor for current gain only, you can also consider to put the buzzer between emmitter and ground (voltage follower circuit). Note that the circuit then is no longer in an inverted mode...

Here are the improved circuits I came up with based your help. I have implemented the one on the right, and it works well; the downside is the extra voltage drop associated with the darlington transistor is presumably limiting the loudness somewhat. I think the circuit on the left would avoid this, but with the downside that it is wasting at least 5ma regardless of the inputs.

In order for the 2N2222 transistor to pass enough current, my testing has indicated I need at least 2ma of base current (hence the 1k resistor, which provides some leeway).

extra voltage drop associated with the darlington transistor is presumably limiting the loudness somewhat.

No it is not. The extra volts drop only applies to the base emitter, not the collector base. You will have the same voltage swing across your buzzer with either circuit.

I think the circuit on the left would avoid this

No.

There are a lot of different piezo buzzers in the world, the most common go from 2V 5mA to 12V 30mA.

The2N2222 is not the most fit transistor for this

  • it has an unneeded high output current (800mA)
  • it has a very low (but typical) current gain (of around 30)

Any 5 cents transistor would have helped you better....
However there is no need for a darlington or 2-transistor solution.

IF you have a "high" voltage buzzer an increase of the voltage swing might help considerably . You generally use a "bridge" circuit for this. Any 74HCxxx inverting chip can be used for this. Have a look at this example

Edit:
You might even get good results connecting it to 2 Arduino pins, changing their polarity as you can do it with 2-color LEDs. For safty reasons put a 47 or 100 ohms resistor in seriesparallel. (which however will reduce the volume)

For safty reasons put a 47 or 100 ohms resistor in parallel.

Parallel?

Don't you mean series?

Yes. Of course. Thank you. Luckily it is generally obvious what i mean, or isn't it?