Super Clean Goertzel Operation With Ultrasonic Transducers
Today, I finally got around to trying some ultrasonic transducers with the Goertzel mode in the streamer.
I found a bunch of water-proof 40 kHz ultrasonic transducers in the first box I checked. These are piezo devices, so they don't need any coupling caps for driving or sensing. I connected one as a generator between P0 and P1, which output a differential reference sine at 40 kHz. I connected the other between GND and P8, which was configured as a 100x ADC.
Check out how stable the response is:
All you need is two ultrasonic transducers. No passives needed. Code is attached.
EDIT: Code was updated with improved comments for clarity.