2021-07-07 06:46 PM
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).
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).
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.
2021-07-07 06:53 PM
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.
2021-07-07 06:54 PM
I want an interrupt on the rising edge.
2021-07-07 06:59 PM
Set up the relevant GPIO pin as EXTI interrupt.
2021-07-07 07:03 PM
I'm using also the same configuration.
The problem is that i can't see the expected ZVS on the oscilloscope.
2021-07-07 07:07 PM
> 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.
2021-07-07 07:13 PM
Expected is the red curve.
Obtained is the blue line as shown in the figure above.
Here is the figure again:
2021-07-07 07:19 PM
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.
2021-07-07 07:54 PM
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).
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?
2021-07-07 08:12 PM
If you set PA0 as a GPIO output, can you toggle it between 0 and 3.3V and see it on the scope?