First revision of our Ultrasonic Hardware:
For the transmitter we followed what we found of similar items on the market, like Sparkfun's Qwiic Ultrasonic Distance Sensor - HC-SR04 which uses an RS232 charge pump chip to turn the 3V3 input signal to a 20Vpk-pk excitation signal for the ultrasonic element.. Our circuit takes in 3V3 for power and a single trigger signal which it then inverts to drive the second transmit channel so when one is positive the other is negative which gives this larger full wave signal (double what just using a single TX line would allow). There is some attenuation as the excitation signal goes on for multiple cycles, but when testing our transmitter with an off the shelf HC-SR04 receiver we didn't notice a range difference.
For the receiver I started by finding a schematic of a standard HC-SR04 transceiver online and simulated it, finding the center frequency was around 20kHz. I also wanted to add a buffer amp to the reference voltage as I've done in other projects but still keep only 4 amplifiers so I tweaked the gain and center point of the amplifiers to allow losing a stage. I also changed the comparator stage to have an envelope detector as that worked well on my Ultrasonic UART project, and added an optional damp transistor on the ultrasonic element.
Here's the sim of the standard HC-SR04 design:
And the schematic of our receiver:
And SIM of the receive portion:
In theory we should have been better, in practice we were not. Our 30 foot range went down to 10 feet. We even tried the ultrasonic elements from HC-SR04 boards in case it was the Amazon element I bought, but it did not change things. Some of the mods I did helped a bit, like removing the damp resistor across the PZT, removing the capacitor after the envelope detector, and adding a one shot mode by feeding the output to the compare input, and those changes helped but didn't get our 30 feet back.
So transmit boards were okay, but for receive boards we went back to a known working design and took a portion of the Sparkfun's Qwiic Ultrasonic Distance Sensor - HC-SR04 to create our next revision. Boards are coming in prepopulated from JLCPCB.