cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a zero crossing detector inside the stm32 itself?

MJavi.1
Associate III

Is there a zero crossing detector inside the stm32 itself?

I am using a stm32f334R8

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Well, the STM32F334 may only process voltages between 0...VDD, for 5V-tolerant GPIOs also 5V signals under consideration of special instructions.

A real zero crossing detection is only possible if you shift the signal to be detected by an offset and use it to feed one of the three included comparators, for example. Alternatively, you can also do the zero crossing detection externally and feed it in digitally.

Does it answer your question?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Peter BENSCH
ST Employee

Well, the STM32F334 may only process voltages between 0...VDD, for 5V-tolerant GPIOs also 5V signals under consideration of special instructions.

A real zero crossing detection is only possible if you shift the signal to be detected by an offset and use it to feed one of the three included comparators, for example. Alternatively, you can also do the zero crossing detection externally and feed it in digitally.

Does it answer your question?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Yeah very useful

Actually i want impelement a pll. By finding the phase shift between the pwm signal and the output of current transformer(ct) that i put on the output of my inverter.

Do you have any idea how can i find the phase shift just using ct signal?

Without measring voltage.

Well, it should be no problem to measure the PWM with a timer (frequency, possibly also duty cycle) and then measure the time shift of the CT signal. The phase shift can then be calculated from the time shift relative to the PWM frequency.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you so much

Is the any documentation i can use for implementing zero crossing detection?

Zero crossing detection is a basic function, but can be realised in different ways depending on requirements and electrical conditions.

Your favourite seach engine should find plenty of suggestions with "zero crossing detection".

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.