Transistor switch: How to commutate 4-6V rail with 0-3.3V signal?

I want my gate (fet) or base (BJT) to turn on at 3.3 v, I then want to have 4 - 6 volts on my collector or drain, and the same voltage as the C or D to be present on the emitter or source,how should my circuit look like? this is to turn a buzzer on or off, I am controlling it with a microcontroller

• Is this really any different then your previous question? I realize there are some minor changes and a lot more detail added, but you should have just edited your previous question. – Kellenjb Jun 6 '11 at 14:13
• possible duplicate of making a switch – Kellenjb Jun 6 '11 at 14:14
• @Kellenjb - This looks like a different question to me. The other one was about a two-way switch, while this is on/off. @Fouad - can you make this more clear? – stevenvh Jun 6 '11 at 14:22
• @Stevenvh could be homework that has minor variations like this. That would explain it. However I don't look too highly on people who ask new questions before addressing the issues that people brought up on a previous question. – Kellenjb Jun 6 '11 at 14:30
• @Kellenjb - agreed! – stevenvh Jun 6 '11 at 14:45

What you are describing is called the "emitter follower" or "source follower" configuration. That's not what you want here since you want to drive the buzzer with a higher voltage than the 3.3V the microcontroller puts out.

What you want is to use the transistor in common emitter (BJT) or common source (FET) configuration.

For a FET, connect the source to ground, the gate to the microcontroller output, the drain to the low side of the buzzer, and the 4-6V supply to the high side of the buzzer. In this case the FET needs to turn on well with only 3.3V gate drive. Those are called "logic level" FETs. I often use IRLML2502 in such applications.

For a BJT use a NPN with emitter, base, and collector the way the FET source, gate, and drain were hooked up. Except there needs to be a resistor between the base and the microcontroller output. Let's say the buzzer draws 100mA and the transistor has a minimum gain of 50 in this case. That means you need at least 2mA base drive. Figure the B-E drop is 700mV, so that leaves 2.6V accross the resistor. 2.6V / 2mA = 1.3KOhms. So 1KOhms would be reasonable to leave some margin for the example values I used.

In either case, make sure to put a reverse diode accross the buzzer. It will be at least partially inductive, so will produce a large voltage spike when turned off unless you give it a path to flow. Without the diode the transistor will get fried, and bad voltages could feed back to the microcontroller.

• thank you very much, I used a 2n3904 BJT and it works like a charm – Fouad Jun 6 '11 at 20:30

This is often done in common source mode: you connect your FET's source to ground, and the buzzer between the drain and the 4-6 V supply. The FDN359AN is a suitable MOSFET to be controlled by your microcontroller: $I_{D}$ = 2 A @ $V_{GS}$ = 2.5 V.