Page 1 of 1

Measure delay between two signals

Posted: Wed Aug 07, 2019 4:06 pm
by PatrikB
Hi,

I need to measure the delay between two repeating signals with a +-100us accuracy. The frequency is 60Hz, 50% duty cycle and the delay between the two signals can be between 0 - 5ms. The signal amplitude is 3.3V.

Is it possible to do this using the MCPWM, RMT or any other HW function in the ESP32?

Capture.PNG
Capture.PNG (11.95 KiB) Viewed 3572 times

Re: Measure delay between two signals

Posted: Wed Aug 07, 2019 8:20 pm
by PatrikB
One idea could be to XOR the two signals to get one signal with twice the frequency where the pulse width will correspond to the delay.

If it would be simpler to measure the pulse width using some functionality in the ESP32.


Capture2.PNG
Capture2.PNG (18.16 KiB) Viewed 3546 times