I need to compare two sinusoidal signals and once compared, if they are not in phase, modify the phase of one of them so that the two coincide.
What frequencies are involved? And how do you propose to modify the source of one of the frequencies?
Your post was MOVED to its current location as it is more suitable.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
In addition, what is the magnitude and impedance of these signals?
I found this which might be relevant:
https://hackaday.com/2020/05/23/an-arduino-as-a-pll/
I have done this using a Texas DSP board with two A to D converters to find the phase difference between two 1MHz to 5MHz signals - results sent over Ethernet to a PC running MATLAB for analysis
you require a couple of A to D converters which can be synchronised - No idea if there are any Arduino type boards which can do this.
Also once you have the phase difference how can you shift one of them so that they are synchronised ?
I assume you have control of the original signals?
If you're only looking for "in phase" and a 180 degree phase inversion you can use a summing amplifier and a differential amplifier. If the differential amplifier gives a lower output, they are in-phase.
Those can be built with op-amps if the frequency is "reasonable". And if both signals are equal in amplitude and perfectly in-phase, the differential amplifier will put-out (almost) nothing and you don't need the summing amp.
That's simply a delay but the regular Arduino doesn't have a DAC so by-itself it can't put-out analog. And, it's a little slow so it depends on what frequency you're working with.
Or if the signals are constant you can delay one (starting with no delay) and sum them. The maximum-sum is in-phase.
2kh
modifying the phase of one of them, but I don't know how to compare them
2kh
20mv pp
Amplifying the signals and looking at the zero crossing differences will give you phase, but how do you plan to do the "delay" part?
Explain what that means. What does 2kh mean? Do you want to modify the phase of a single cycle, or modify the source of one signal so all cycles are in phase with the master signal?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.