How should I connect the ultrasonic equipment to the STM32? Do I need interfacing resistors/capacitors for best results or protection? Are there ressources online explaining interfacing considerations?
My bachelor work was an ultrasonic anemometer.
I used an ultrasonic transducer (400ST160), 4 receivers (400SR160) and a microprocessor (STM32F100RBT6B). The aim was to calculate the time of flight (TOF) of ultrasonic signals transmitted from the transducer to the receivers.
The STM32 timers make things easy with the complementary output and dead time feature. I generated a chirp signal (i.e. a signal with increasing frequency) to cover the transducer's and receivers' frequency band. The complementary outputs go to MOSFETs (IRF7103PBF) which drive a transformer (ER11-3E5-S) with a central tap to generate a dual polarity signal.
The transformer generated a high voltage (+/- 90V), because ultrasonic signals decay like R^2 in the air. The RX circuit is also simple. The received signal goes through protective diodes and filters to the amplifier (AD8544ARUZ 4 in one) to amplify small signals which go to ADC channels of the STM32. The STM32 has a 12-bit 1MSPS ADC. I calculated the correlation between the RX and TX signals to estimate the TOF, but use whatever algorithm suits you best.
I recommend using dual polarity signals. If it is too hard to generate chirp signals, simply generate burst signals, and search for peeks in the received signal. Those mentioned methods have benefits only if you need accuracy. The main problem with these transducers that they are narrowband like yours.
It's not clear what you are really asking. Ultrasound receivers are usually piezo microphones, so electrically you process their signal like any other piezo microphone. The signal you are looking for can be a few 100 µV to a few mV. Usually you need a voltage gain of 1000-5000 to drive a microcontroller A/D input.
Ultrasound transmitters are usually piezo speakers, so you drive them as such. Look at the datasheet carefully to see what the maximum voltage is you are allowed to drive the transmitter with. This can be a few 10s of volts. Beware that these piezo elements can appear inductive to the driving circuit due to the mechanical intertia driving the piezo element backwards when you stop driving it. This means they can exhibit what looks like inductive kickback to the driving circuit, even though the actual mechanism is not inductance. To get the 10s of volts to maximally drive a piezo transmitter could require a boost converter for that purpose, and/or possibly a H bridge to halve the drive circuit voltage requirements.