How to convert a PWM Signal to Real Analog using RC Filter (with actual measurements and analysis)

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 31

  • @mariolender93
    @mariolender93 2 ปีที่แล้ว +3

    Very well explained. Simple yet really informative.

  • @odissey2
    @odissey2 ปีที่แล้ว +1

    The settling time of the RC filter to 8-bit precision is approx. 6xRC= 6x 0.13sec ~ 1sec. This is a major drawback of the PWM to analog.conversion

  • @ROBOROBOROBOROBO
    @ROBOROBOROBOROBO วันที่ผ่านมา

    Great video, thank you, would be also nice to add real world breadboard example and demonstration for more views because knowledge side was great
    However this method I guess doesnt create a very clear value like in a moving potentiometer right?

  • @erdemmemisyazici3950
    @erdemmemisyazici3950 2 ปีที่แล้ว +1

    Thanks man. Clear and concise.

  • @magiclay
    @magiclay 2 ปีที่แล้ว +2

    peak magnitud is small that 0.0196 then how you get 0.13?????

    • @gemsungelectronics460
      @gemsungelectronics460  2 ปีที่แล้ว

      Parts selection is done for rc value to exceed 0.13.

    • @magiclay
      @magiclay 2 ปีที่แล้ว +1

      @@gemsungelectronics460 ok but how you get 0.13???

    • @marceltoele1063
      @marceltoele1063 ปีที่แล้ว

      @@magiclay Apply the formula: 5V * 0.00204s * 0.5**2 / (5V/256steps) = 0.13056s

  • @tezeuszklasyczny
    @tezeuszklasyczny 2 ปีที่แล้ว +2

    Quite technical but still very informative. Thanks for the video it helped me with my problem.

  • @OMNI_INFINITY
    @OMNI_INFINITY 3 หลายเดือนก่อน +2

    *Thanks! So that isn't really acting as an RC lowpass filter actually, and simply looks like an RC lowpass filter? Because it seems to only be acting as a right angle rounder.*

    • @gemsungelectronics460
      @gemsungelectronics460  3 หลายเดือนก่อน +1

      Hi, it is an RC low pass filter that filters out the high frequency component in the PWM waveform to a low frequency, almost DC component.
      You can compare the waveforms before and after the filtering.
      Thanks!!

    • @OMNI_INFINITY
      @OMNI_INFINITY 3 หลายเดือนก่อน +1

      @@gemsungelectronics460 I did. And what I said is what that shows.

    • @OMNI_INFINITY
      @OMNI_INFINITY 3 หลายเดือนก่อน

      @@gemsungelectronics460 Are trying to say that it's turning a square wave into that other wave by removing upper frequencies, rather than simply treating it like it is modulated DC? Both seem plausible, but looking at it as DC is a more logically intuitive way view a capacitor's behavior in that circuit.

  • @asmaafritah2996
    @asmaafritah2996 2 ปีที่แล้ว +1

    Hi! Thank you for the video, I am trying to apply this to the arduino nano 33 BLE, could you please indicate me where I can find the duty cycle and total step values? I read the documentation but I do not find anything...

    • @gemsungelectronics460
      @gemsungelectronics460  2 ปีที่แล้ว +1

      Hi according to the pdf file in the link below, there seems to be several pwm pins available.
      It seems that you can use analogWrite() to control the duty cycle.
      www.google.co.kr/url?sa=t&source=web&rct=j&url=cdn.sparkfun.com/assets/0/d/8/4/9/DS-15580-Arduino_Nano_33_BLE_Sense.pdf&ved=2ahUKEwjc1JmplNX4AhX5plYBHSb9BBoQFnoECDAQAQ&usg=AOvVaw0EY7bALdN4rmZKBOkPyf_3

  • @johnhawkes7681
    @johnhawkes7681 2 ปีที่แล้ว

    Super video. Many thanks.

  • @stefanb.933
    @stefanb.933 ปีที่แล้ว

    hello. how can the signal obtained after the rc filter be played on a 3-4 ohm speaker without affecting the signal and the output frequency? I'm trying to play a sinusoidal frequency of 8 Hz, the result of a pwm signal from arduino and an rc filter. I got the desired frequency and shape, but I can't play it on a speaker. do you have an idea how to do it?

    • @gemsungelectronics460
      @gemsungelectronics460  ปีที่แล้ว

      Hello, thank you for sharing your concern.
      Have you measured the waveform after connecting to the speaker?
      I wonder whether the waveform is consistent before and after connecting to the speaker.
      Also, it seems you want to play 8Hz sinusoidal waveform through the speaker, but I'm not sure if you can hear the soundwave of such low frequency.
      How about increasing the frequency to some hundreds of frequency range?
      Why would you need an RC filter for your application?

  • @GeeWillikersMan
    @GeeWillikersMan 2 ปีที่แล้ว

    I need to modify an lcd contrast circuit that uses pwm and an RC filter. However, there is also a resistor across the capacitor. What is its purpose? To discharge the cap faster? I do have schematic, any help appreciated. Essentially I'm asking if the components can be changed to modify the analog voltage output range without adjusting the pwm signal.

    • @gemsungelectronics460
      @gemsungelectronics460  2 ปีที่แล้ว

      Hi,
      I can't say much about the resistor in the circuit unless I have a look on the full schematic. But anyway, you cannot increase the range of the voltage, but decreasing the voltage can be achieved by pulling down the voltage with a resistor.
      Why not limit the range of the pwm signal rather than modifying the circuit?

    • @GeeWillikersMan
      @GeeWillikersMan 2 ปีที่แล้ว

      @@gemsungelectronics460 Thank you for the reply! I can't limit the pwm because it is microprocessor controlled and I don't have access to the code.
      The device is an 1990s era guitar effects processer. I changed the lcd display due to a bad backlight, but now the contrast is very low even at its max setting. I will have to open it and see if lowering the voltage increases the contrast, adding a resistor would be an easy fix.
      Option B is to repair the leds on the original lcd and put it back in. This option is looking more attractive at the moment.

    • @gemsungelectronics460
      @gemsungelectronics460  2 ปีที่แล้ว +1

      Right. I understand your situation. It is very frustrating when you need to fix something you don't have full access.
      Good luck to you anyway, and let me know for any help.
      Thank you for asking!

  • @magiclay
    @magiclay 2 ปีที่แล้ว

    why you dont show how you get rc values???? wee need that info men

    • @gemsungelectronics460
      @gemsungelectronics460  2 ปีที่แล้ว +1

      Hello,
      I believe all the information is shown in the video.
      What information specifically you think is missing?

    • @magiclay
      @magiclay 2 ปีที่แล้ว

      @@gemsungelectronics460 the math for peak magnitude includes at the end rc... but at that moment you dont know rc values...so?

    • @marceltoele1063
      @marceltoele1063 ปีที่แล้ว

      @@magiclay Once you know the time constant 0.133s select R and C so that R * C = 0.133s 13300 Ohm * 0.000010F = 0.133 (It is assumed that you know how to scale values to Si base units)

  • @OMNI_INFINITY
    @OMNI_INFINITY 3 หลายเดือนก่อน +1

    In English it's "amplitude", by the way. Are korean?