Ways to drive a capacitative load with discrete transistors
For the record, I still think this is too broad, as witnessed by the length of the below, but I'm bored tonight just before bed time and you made some effort, so here goes;



Because of that I'll skip all maths and over-simplify the transducer's operational behaviour.

At 40kHz, close to its operating frequency, the L1/C1 pair goes into series resonance, which means a low impedance. Since your signal is a square wave / PWM signal, you will also be applying a set of harmonics.

Assuming a 50/50 square wave you will be applying a 1/3rd amplitude 3rd harmonic, a 1/5th amplitude 5th harmonic, etc.

If you just apply the full wave with force the internal resonance will cause the harmonics to be less attenuated, capacitance C0 will help dampen the harmonics, since it conducts more at higher frequencies, but only if you let it. In fact, having a higher drive may increase the current consumption due to harmonics without an equally significant effect to the centre frequency output.

Also if you put sharp flanks into it at high current, you're actually putting a lot of power into it that it doesn't use optimally. That means unneeded heating and/or damage.



So, your aim is to make it swing more in voltage, while not making the drive too insanely strong, that means a complementary signal to the other pin.

Many MCU pins are strong enough to drive a 2.2nF load, as well as its internal parasitic impedance, but if you want to play it safe you can use transistors, or even cooler use two schmitt trigger inverters:







simulate this circuit &ndash; Schematic created using CircuitLab

There's a small chance it'll do some silly stuff as a feed-back-effect around the second inverter, but with a strong external drive below the MHz level, the risk is tiny.

The resistor is a little dampening, to prevent over-driving the resonator and such, as well as limiting the latch-up-current, although NXP lists a very high capability.

Or, the traditional severely over-dimensioned H-bridge approach with transistors (nobody does this, because... why?, but hey, if an MCU pin isn't enough...):







simulate this circuit

Here the resistor is just dampening.



Or the more normal transistor approach:







simulate this circuit

Here R2 is to "reset" the capacitive element fast enough to create an "up-flank" when the transistor switches off, and R3 is to dampen the the down-going flank through the transistor. R3 can also be on the other side of the resonator of course, but I liked the symmetry of one on each side.

Of course, this changes the voltage swing back from double V+ to single V+, where-as having two transistors, one on each side, will give you a huge energy increase, since your 47 Ohm dampening resistors on each side will be the pull-ups (>100mA at 5V of static drain), or your pull-ups will be hundreds of ohms and the whole thing gets so dampened that it's no use.