Above you can see the transmitter part of my acoustic modem. From left to right, the components are: the power supply, the acoustic transducer, the amplifier, and the microcontroller.
The problem: I need to send a 40 kHz, 20 V peak-to-peak square wave to the transducer. The circuit has two outputs, + and -, that are connected to the two transducer pins. In other words, each output needs to switch from +10 V to -10 V and back once every 25 microseconds.
As always, there are a few decent solutions, and as always I didn’t implement the best one.