Это видео недоступно.
Сожалеем об этом.
PWM on the Raspberry Pi Pico with MicroPython
HTML-код
- Опубликовано: 17 авг 2024
- In this video we will define what a Pulse Width Modulation or PWM signal is, build a circuit that controls the output of an LED via a potentiometer, and we will write the code to produce a varying PWM signal mapped to the ADC’s integer output.
00:00 Intro
00:33 PWM Background Information
01:52 Pico Hardware Description
02:32 PWM Groups
02:40 Circuit Build
03:19 Programming
03:44 Choosing 1000 Hz
04:29 Recap
The parts you will need to follow along with this video are:
1x Raspberry Pi Pico
1x Micro USB Cable
1x Breadboard
1x 10k Potentiometer
6x Jumper Wires
1x LED
1x 150 Ohm Resistor
Hardware Links:
Elegoo Electronics Kit: amzn.to/3aKWJA7
Breadboard: amzn.to/2Npu9f5
www.adafruit.com
www.sparkfun.com
Helpful Links:
www.raspberryp...
www.raspberryp...
micropython.or...
thonny.org/
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.
Very clear speaker. Well done. Thank you. You'll have more subscribers soon.
I appreciate that.
Useful information and tutorial. Keep creating such amazing project with Raspberry pi pico in micropython programming. Thanks for sharing 👌👌
Thank you, I will
Nicely done... Thanks.... What is the highest freq Pico can go... ? And how do u provide a delay in bw two PWM signals
Nice job, new subscriber, keep doing videos like that bro
Thanks. I'm on business travel at the moment, so it may be a few weeks before I can get back at it.
Very clear explanation
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
Thanks. I haven't tried to much with PWM on the Pico. It is still a new board to me.
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?
great job!
One question: How much Frequency should we set in case of robot's motor application? Thank you
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
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.
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.
I'll have to look into it more. My first guess would be a limitation of the MicroPython frame work.
@@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.