PWM on the Raspberry Pi Pico with MicroPython

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

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

  • @BoonieOetGelaen
    @BoonieOetGelaen 3 ปีที่แล้ว +4

    Nicely explained. For people who don’t know what the anode or kathode of a LED is, the kathode is the shortest leg. Also the kathode is the side where the led’s base is straight while the rest is rounds as the LED itself.

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

    Very clear speaker. Well done. Thank you. You'll have more subscribers soon.

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

      I appreciate that.

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

    Nice job, new subscriber, keep doing videos like that bro

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว

      Thanks. I'm on business travel at the moment, so it may be a few weeks before I can get back at it.

  • @singhman1026
    @singhman1026 11 หลายเดือนก่อน

    Nicely done... Thanks.... What is the highest freq Pico can go... ? And how do u provide a delay in bw two PWM signals

  • @lastdraco1
    @lastdraco1 3 ปีที่แล้ว

    Very clear explanation

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

    Great video, very clear, I wanted to know how many PWM you can use at the same time, and question answered. What frequency have you tried it up to? As you need over 20,000hz for pwm to not show on camera, roughly

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว

      Thanks. I haven't tried to much with PWM on the Pico. It is still a new board to me.

  • @Helloworld-dq7hi
    @Helloworld-dq7hi 2 ปีที่แล้ว

    Hi. Very easy to follow and remember. I wanted to ask how u you used the pico without being connected to a computer. Did you save as boot file?

  • @nguyenangthang7473
    @nguyenangthang7473 3 ปีที่แล้ว

    One question: How much Frequency should we set in case of robot's motor application? Thank you

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

    Hello Brad. I have been hacking at programming the Ardunio Nano into a sine wave inverter using the PWM outputs. Have you had any experience using a 10kHz clock to create the PWM of a 60 Hz sine wave? I have this project in Ardunio IDE and I’d like to convert from Ardunio IDE to Python for the PI Pico but I new to programming Ardunio IDE. Your thoughts are welcome.

  • @contextualcoding1884
    @contextualcoding1884 3 ปีที่แล้ว

    great job!

  • @zyghom
    @zyghom 3 ปีที่แล้ว

    one BIG issue with PWM on Raspberry is: when you want to use it as a dimmer for LED, when you are close to OFF (very dimmed), it usually flickers/blinks. Irrespective of the frequency. Any idea how to solve it? Most of the tutorials only show the "school example" of dimming - not the real life applications.

    • @hensonbl
      @hensonbl  3 ปีที่แล้ว

      I'll have to look into it more. My first guess would be a limitation of the MicroPython frame work.

    • @zyghom
      @zyghom 3 ปีที่แล้ว

      @@hensonblSimilar issue with python on Raspberry Pi 4 - only when I moved to pigpio library it started being OK. But the cost is pigpiod running in the background.

  • @prakash-r1k
    @prakash-r1k 11 หลายเดือนก่อน

    I have a dso with a frequency of 100 MHz, and I use Thonny IDE and Micro Python with a Rp2040 system clock of 125 MHz. I also know the pwm frequency, which is 62.5 MHz.
    I have to make a pwm in an RP2040 at 50 MHz, thus here's my code:
    from machine import Pin, PWM
    import time
    pwm_pin = 0
    pwm = PWM(pwm_pin)
    pwm.freq(1000000) # Set PWM frequency in Hz
    # Set fixed duty cycle
    pwm.duty_u16(32768) # 50% duty cycle (32768 out of 65535)
    I want a square wave, however the PWM produced noises and ripples with this code.
    Thus, how can I lessen the noise and ripples? help me sir