Skip to main content
Arduino

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

PWM and Analog Signal Quality

I'm converting a 0-5v PWM signal to an analog signal using an LM358D. I've connected the output to an oscilloscope to look at the signal but I'm not really sure what I'm looking at. The PWM looks ok but I'm unsure of the analog signal.

Here's some images, please let me know what you think.

Both pics are at 50% signal strength. The oscilloscope is set to defaults, simply connected the probe.

Thanks

Text

Text

EDIT:

Here's the schematic for the PWM to analog converter. The cap is a tantalum. The dip switch changes the analog from 5v to 10v, the signal looks the same on both and is correct voltage so seems to be ok?

Text

Answer*

Draft saved
Draft discarded
Cancel
5
  • Thank-you for the detailed reply, I appreciate it! I updated the original post with schematic. What's an "acceptable" peak-to-peak? If a resistor or cap would improve that would be good. You can see I have PWM freq at 1000 Khz, is there a "magic" number? I use pca9685. I couldn't see any difference on scope, only PWM. My scope does have a "default" button and "autoset", latter was useless as it zoomed out so I manually set to view, I did use same settings for both signals just had to change voltage scale so I could view better. Thanks! Commented Mar 18, 2021 at 12:34
  • @tryingHard: 1. It is up to you to decide what you would consider "acceptable". It's your application! 2. If you want less residual oscillations, increase the value of R78. 3. The PWM frequency is 1 kHz, not 1000 kHz. 4. There is no magic. Commented Mar 18, 2021 at 13:42
  • Thanks, impossible for me to know what is acceptable when I don't know what the number means, not something you can understand after an hour of reading. Maybe 500mV isn't bad or maybe it's horrible. I will see what happens with R78 and thanks for clarifying frequency. Commented Mar 19, 2021 at 0:15
  • @tryingHard: Re "acceptable": it depends on your application, on what you want to do with that signal. "Acceptable" means "acceptable by whoever will be the consumer of the signal". Commented Mar 19, 2021 at 8:07
  • I hear you, it's for LED drivers and aquarium power heads. Commented Mar 19, 2021 at 8:58

AltStyle によって変換されたページ (->オリジナル) /