Skip to main content
MSpir.2
Associate II
April 11, 2022
Question

I generate a PWM signal on a pin going from duty cycle 0 to 100 and back to 0% to generate a sine wave using an LC Filter. When I connect the LC filter, the output is still an PWM with some spikes. C = 147µF L = 47µH f = 1,91 kHz

  • April 11, 2022
  • 3 replies
  • 3328 views

0693W00000LxazgQAB.jpg

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
April 11, 2022

> When I connect the LC filter

How exactly?

JW

MSpir.2
MSpir.2Author
Associate II
April 11, 2022

0693W00000LxbYbQAJ.jpg

TDK
April 11, 2022
"If you feel a post has answered your question, please click ""Accept as Solution""."
MSpir.2
MSpir.2Author
Associate II
April 11, 2022

problem of that topic is solved

facing other now

TDK
April 11, 2022

It's the same underlying issue as the other one. The STM32 isn't outputting the spikes, it's an artifact of how you're measuring.

Probably wise to reduce GPIO speed to mask some of the effect.

"If you feel a post has answered your question, please click ""Accept as Solution""."
MM..1
Chief III
April 11, 2022

You disconnect something ... Too maybe you need learn I=U/R (pin can drive only limited current)

Normal PWM use RC not LC .