cancel
Showing results for 
Search instead for 
Did you mean: 

How is it possible to read the zero voltage switching signal (ZVS), using a nucleo board 144?

HLabi.1
Associate II

I am trying to use the Nucleo-F429ZI board to read the ZVS signal.

This is possible using an STM32F100 on PC15 GPIO pin, according to UM1631 (page 19).

https://www.st.com/resource/en/user_manual/dm00082165-stevaliht005v2--33-v-control-of-acstriac-with-stm32-stmicroelectronics.pdf

I simulated the circuit with "LTspice" and added the two cutting diodes inside the MCU's I/O port, as described in AN4899 (page 9).

https://www.st.com/resource/en/application_note/dm00315319-stm32-gpio-configuration-for-hardware-settings-and-lowpower-consumption-stmicroelectronics.pdf

The figure shown below is the simulation result:

The green curve is the mains voltage (230Vrms, 50Hz) divided by 100.

The red curve is the expected ZVS signal.

Then I added the blue 3.3VDC line which is the ZVS curve as obtained from the oscilloscope using EXTI0 on PA0 GPIO pin.

0693W00000Bd6tsQAB.png

12 REPLIES 12
TDK
Guru

What do you mean by "read" here? Do you want an interrupt on the rising or falling edge? Then set up the EXTI on any GPIO pin. If you just want to poll the pin, HAL_GPIO_ReadPin will do so.

If you feel a post has answered your question, please click "Accept as Solution".
HLabi.1
Associate II

I want an interrupt on the rising edge.

TDK
Guru

Set up the relevant GPIO pin as EXTI interrupt.

0693W00000Bd6ulQAB.png

If you feel a post has answered your question, please click "Accept as Solution".
HLabi.1
Associate II

I'm using also the same configuration.

0693W00000Bd6v0QAB.png 

The problem is that i can't see the expected ZVS on the oscilloscope.

TDK
Guru

> The problem is that i can't see the expected ZVS on the oscilloscope.

What do you see on the oscilloscope and how does it differ from your expectations? Be specific.

I assume you realize that if no signal is on the pin, you're not going to be able to trigger off of events that don't exist.

If you feel a post has answered your question, please click "Accept as Solution".
HLabi.1
Associate II

Expected is the red curve.

Obtained is the blue line as shown in the figure above.

Here is the figure again:

0693W00000Bd6tsQAB.png 

TDK
Guru

Oh, I missed the blue line and explanation, apologies.

I assume your signal is not what you expect. Maybe the ground is different, or it's otherwise not hooked up correctly. If the input signal is an AC wave centered at 0V, the output won't be a DC signal at 3.3V.

It's also possible the pin is in use by something on the board, but by default it is not.

If you feel a post has answered your question, please click "Accept as Solution".
HLabi.1
Associate II

I am using a 5V external positive power supply to power the nucleo board. The power supply, the board and the ZVS circuit are sharing the same GND=0V.

If I disconnect the GPIO pin, I obtain the expected red curve on the oscilloscope. (figure below).

0693W00000Bd70AQAR.png 

The two cutting diodes inside the MCU's I/O port seem to be important for the operation of the circuit.

Do you know if the diodes must be activated or something like that?

TDK
Guru

If you set PA0 as a GPIO output, can you toggle it between 0 and 3.3V and see it on the scope?

If you feel a post has answered your question, please click "Accept as Solution".