PCB signal degradation

Thread Starter

MCH170

Joined May 13, 2021
29
Hello, I am trying to make a simple inverter pcb but my output is a square wave instead of the expected spwm. I suspect that some capacitance or inductance is built up due to the pcb layers that alters the gate signal. My traces going to the mosfet gates are quite wide (1.5mm) and their length is approximately 25mm.

Picture 1 is the output of an earlier version of the board. This is close(r) to the expected result.
sample 1.png

Picture 2 is my newest version of the board.
sample 2.png

Note that I went from a 2 layer pcb to a 4 layer pcb and the traces from the microcontroller to the mosfets are in the inner layers. Also, the earlier board had thinner traces to the mosfets' gates.

Any advice is appreciated. Thanks.
 

Thread Starter

MCH170

Joined May 13, 2021
29
Schematic?
Sorry about that. The full schematic is pretty messy (I am still bad at them) so here is the part you are probably interested in. Both inputs are from a 5V microcontroller. There is also another copy of it for the reverse polarity. N and L are the outputs.
schem.png
 

Ian0

Joined Aug 7, 2020
13,097
If nothing is overheating, I suspect that the gain set in the control circuit is wrong, or that the transformer ratio is wrong.
The entire schematic would be needed, not just the power stage.
 

Ian0

Joined Aug 7, 2020
13,097
What PWM frequency are you using?
A 4mA output From a microcontroller is going to take 16us to charge the 66nC gate charge of a IRLZ44.
 

Thread Starter

MCH170

Joined May 13, 2021
29
What PWM frequency are you using?
I am using (a custom version of) this code. Connecting the microcontroller (not connected to the rest of the board) to the oscilloscope and manually counting the rising edges of the spwm signal I get a period of 100μs so 10kHz.

A 4mA output
How did you get to that value? I was under the impression that the ATmega328P can do up to 40mA per IO pin (under abs. max. ratings on the datasheet).
 

Thread Starter

MCH170

Joined May 13, 2021
29
Wider traces and increased length can introduce more capacitance and inductance. It can distort high-frequency signals.
I can't really change the length but I can make them significantly thinner. Will moving them to an outside layer help?
 

Ian0

Joined Aug 7, 2020
13,097
I am using (a custom version of) this code. Connecting the microcontroller (not connected to the rest of the board) to the oscilloscope and manually counting the rising edges of the spwm signal I get a period of 100μs so 10kHz.


How did you get to that value? I was under the impression that the ATmega328P can do up to 40mA per IO pin (under abs. max. ratings on the datasheet).
4mA is a typical value for microcontrollers, even at 40mA it is still far too weedy for directly driving a MOSFET gate. They need at least half an amp to get switching times in the tens of nanoseconds.
 

Thread Starter

MCH170

Joined May 13, 2021
29
4mA is a typical value for microcontrollers, even at 40mA it is still far too weedy for directly driving a MOSFET gate. They need at least half an amp to get switching times in the tens of nanoseconds.
Interesting, so I will need a mosfet driver?

Also, how does that explain the different oscilloscope reading?
 
Top