Electronic – Switching between circuits, transistor-based SPDT

switchestransistors

I want to use a piezo buzzer alternatively as a sound detector and as a sound emitter, on the same circuit (be gentle, this is my first attempt to electronics since the university long years ago).

I want the piezo to monitor the ambiant sound level, then emit sound for a while when the sound level is above a given threshold (typically, play music when baby cries during the night). I'll use an Arduino for the processing part.

For the sound detector part, I plan to reproduce NerdKits' tutorial. I hear the sound emitter part is much more simple as far as electronics is concerned (just plug the buzzer between input and ground, is that it ?), and I don't fear the programming part.

Now what bothers me is how to switch between the receiver/emitter setups. I understand I'm looking for a kind of transistor-based SPDT. Is a push-pull setup the way to go, or am I on the wrong track ?

NB : Yes, I could just use a second piezo buzzer or whatever, but I find it somehow more satisfying to use the same device both for input and output, provided it's doable.

Best Answer

The circuit you are (will be) building is this one which is a pretty standard one transistor amplifier and they go through its design step by step. enter image description here

The makers of the ceramic buzzer give a number of driver circuits, the simplest is this one which can be driven by an external oscillator (e.g 555 astable, cmos multivibrator etc.) or a pin from a microcontroller.

enter image description here

To combine the two circuits just use a simple SPDT switch. Sometimes using transistors as switches over complicates the design.

You only need a transistor switch if you are going to change over the function by some remote device.

enter image description here

Related Topic