Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Digital phase lead in MCU

Status
Not open for further replies.

curious_mind

Full Member level 4
Joined
Apr 14, 2019
Messages
208
Helped
0
Reputation
0
Reaction score
2
Trophy points
18
Activity points
1,573
Hi

I have two input signals A and B , which are sinusoidal in nature. All that I have to do is to ensure that both signals are exactly in phase. I have observed that A lags B by 1 degree. How do I compensate this in MCU?
 

Hi,

sinusoidal signals are analog signals, but your MCU is a digital device. Thus I assume there is an ADConverter involved.

--> for a detailed answer you need to provide the information about your complete signal chain.

For now I can give only a general answer: lag signal B by 1 degree.

Klaus
 

Hi

I use a Simultaneous sample ADC in between the signal and MCU. How do I lag signal B by 1 degree. Any sample c code ?
 

Hi,

No values, how can you expect a good advice?

--> delay it by a sufficient count of ADC samples.

Honestly. We don´t know nothing. We don´t know whether 1 degree means 1000 samples or 1/1000 of a sample.


Klaus
 

Hi
Input signals are 50Hz, sampling frequency is 2500 Hz. How to delay the samples?
 

Hi,

May I ask why you don't show a little effort of your own to motivate members to spend time for you?

At least two values.
Did you calculate the delay time?
Td = phase_angle / ( frequency × 360°)

Or sampling period time?
Ts = 1 / f_sample

..to get to know whether it is more or less of a sample period

A bit of additional information could help also: why not using an analog filter. What's the application. How did you measure the 1°?...

Klaus
 

Hi

I measured 1 degree through the oscilloscope (phase1-phase2). Can we digitally phase shift?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top