I want to generate a pulse that have frequency 40khz and amplitude 20VPP to MA40s4s ultrasonic sensor operate. I use raspberry to generate pulse 40khz-5Vpp then using a IC CD4049BE to boost it into 20vpp as in the below figure. I have encountered the problems is that when i not insert sensor into circuit is waveform is very good but when i insert sensor, waveform is noised as in figure.Please give me how to resolve this problem.
Capacitance of MA40S4S (about 2.55 nF) affects output of the power stage.
Consider using an IC with higher output current.
Or you can try a burst generator (mosfet + inductor) driven by the PWN signal. Example you can find on page 9 of AN4841: 12ZVL LIN Enabled Ultrasonic Distance Measurement.