Hi! I'm using the Esp32 MCU to generate a 40khz PWM signal and it works fine (image 1) but I have a noise in the other outputs that looks that in image 2.
Can someone give me an idea to eliminate that noise? Thanks
I'm using this PWM signal to exit the fourth transducers, to do that I'm using the CD4052 multiplexer/demultiplexer, the PWM signal go to the X input and I change the output channel using the GPIO ping 6 and 7, also I'm getting the response of the transducers and conduce them to an amplifier using the Y output of the CD4052.
For example, I send the PWM signal to the X input and is sent to the transducer 1, at the same time I'm getting the response of the transducer 2 that is in front of the transducer 1, the response of the transducer 2 its send to an amplifier, I'm doing an ultrasonic anemometer.
My first guess it the scope common mode rejection. If I'm correct the trace with the probe at the ground will result in the scope displaying nearly the same "noise"
As you havent provided a schematic we are working in the dark.
However - a stab in the dark - is the PWM output connected to something? If so - and if its taking current - then you need to look at how your supplies are connected and decoupled.
You haven't given any indication of the timebase or volts/div in those graphs - typically digital noise like this is not a problem, its due to stray inductance mainly (ground bounce). Good layout and decoupling will minimize it.
The PWM seems to be driving a transducer - can you post a link so we can see what you are using? It would be useful to know how much current is being drawn from the port.
Also your diagram is wrong - I hope. Look at A1, A3, A4, A5.
A photo of your layout would be useful too, and a note of WHICH ESP32 board you are using - your diagram suggests its this one
@elizabethospr
I've worked with oscilloscopes for many years. The traces they show are not "perfect" images of the voltages you think you are measuring. Especially with fast changing signals.
Without more measurement I'm of the opinion there is a good chance the red "noise" trace you showed in post 5 does not exist on the ESP32. But it is a limitation of the oscilloscope and how it is connected to the circuit.
To test this theory please move the probe to the same location and the scope ground and see what the red trace shows (and add the X and Y scale factors).