Arduino Basics Change your PWM Frequency

  Рет қаралды 89,731

learnelectronics

learnelectronics

Күн бұрын

Пікірлер: 97
@최현-v8z
@최현-v8z Жыл бұрын
In the middle of studying headache of definiition of the counter, clock, I finally found the easiest way of using pwm frequency change by its library. Thank you so much. It is really helpful!
@CholoCJS
@CholoCJS 6 ай бұрын
Sick!!! I have been needing a library that could do this for so much... Thanks
@MxWintersAFOL
@MxWintersAFOL 5 жыл бұрын
Nice, I was hoping that this was possible, I needed a PWM refresh rate of 1200MHz. I've also just bought one of those frequency counter kits too. Thanks for the video. Thumbs up from me :D
@hazim6801
@hazim6801 5 жыл бұрын
Can we change the frequency of arduino pin up to 8khz?
@pedro-neves
@pedro-neves Жыл бұрын
Thanks! Finally, I was able to change my PWM frequency.
@axelroest7470
@axelroest7470 Жыл бұрын
Thanks for substituting the metal screwdriver to point at electrical signals and scratchable screens, into a wooden stick.
@1nvertedReality
@1nvertedReality 4 жыл бұрын
Worked great for my Nano 14 inch radiator fans controller! Quiet at any pulse width. Thanks.
@S-Tach
@S-Tach 6 жыл бұрын
I gouache your video...after watching 100s of video to find this kind of right tutorial. ...nice explain. ..thank you so much. ...I've been stuck. .but now my project going to finish. ...thanks again. ..
@aaandis
@aaandis 8 ай бұрын
Thank you! This is veryquick and easy way to set the frequency. On the higher frequency range it works better with some number than others. For example setting frequency to 666,666 Hz, gives me 666,675 on the freq. meter, which is quite OK.However a setpoint of 666,667 Hz outputs 727,282 Hz. The higest I was able to get is 2 MHz.
@ismaillashari7597
@ismaillashari7597 6 жыл бұрын
thank you so much ................... because of this short value I understood about my project. even I have studied hundreds of research papers and couples of thesis ... thank you so much today I got clear concept about my project
@koomber777
@koomber777 6 ай бұрын
Perfect. Been making an led controller and had issues the whole way through, finally got it working but when hooked to the LED strip they squealed. Changed the pwm to 1khz and the noise is gone!
@spacewolfjr
@spacewolfjr 3 жыл бұрын
Very handy, thanks! Using this to fix the broken immobilizer in my Honda
@buder5116
@buder5116 4 жыл бұрын
i got real question why is pin 5 the pwm frequency cannot be set i was blocked here with the motor going full speed for no reason when signal was high enough(should be dimmable) and the i try adding a second set of code for trying and set to pin 9 it work >_> fu my life i broke 2 arduino chip set and the main ebike arduino for such a crap thing
@andreascavalieri6855
@andreascavalieri6855 2 жыл бұрын
That is amazing! Thank you! You are awesome!!
@SoniyaRaju-b8x
@SoniyaRaju-b8x Жыл бұрын
hey please rply, i am not able to add library. please can you tell me steps to add library.
@tuberworksjones
@tuberworksjones 5 жыл бұрын
ID like to know what the distinction is between setting a pulse width modulation and configuring a timer todo basically watch seems to be the same thing
@ConorFenlon
@ConorFenlon 3 жыл бұрын
The relationship between High Time and the Period is called "Duty Cycle". The duty cycle is the ratio of highTime/Period. (edited to correct my error)
@learnelectronics
@learnelectronics 3 жыл бұрын
You don't say
@drumbum7999
@drumbum7999 2 жыл бұрын
Not quite. PWM is the ratio of highTime to the period. According to your logic a 50% duty cycle would have a duty cycle of 100% because highTime and lowTime would be equal.
@ConorFenlon
@ConorFenlon 2 жыл бұрын
@@drumbum7999 You're absolutely right. Apologies for my error, and thanks for correcting me. 👍
@metehanmelih
@metehanmelih 2 жыл бұрын
İt is saving my life babe. Thx for everything
@selielectronicspvtltd6629
@selielectronicspvtltd6629 4 жыл бұрын
Hi!! I have downloaded the PWM Library but not able to add it on Arduino. It does not show up on sketch. What could be the problem?
@josip1881
@josip1881 4 жыл бұрын
Thanks! Very well explained in short time.
@evanperrygiblin
@evanperrygiblin 4 жыл бұрын
so there are no prescalars?
@ivorstanisic6541
@ivorstanisic6541 5 жыл бұрын
thank you man, yous aved my ass...I was messing with delays and that crap, but found that useless, need a 25 kHz frequency to drive the motor for my trike so thanks once again
@mariopadilla3086
@mariopadilla3086 10 ай бұрын
hello, you dont modify the frequency, only the duration of the power.
@tcratius1748
@tcratius1748 4 жыл бұрын
Awesome, keen to see where this is going especially since PWM seems to pop up a lot in 3d, CNC, and robotic. Just a quick not, as a python programmer, certain segments such as the if statement should be commented.
@cyberwasp461
@cyberwasp461 5 жыл бұрын
Sir. I'm new to scopes and the Arduino. I would like to try the example you showed above but can't find the same in the library.
@vasupodila1149
@vasupodila1149 2 жыл бұрын
Thank you for the tutorial. But actually, I am looking for the frequency of 16 to 20KHz to avoid the noise in my DC motor. can you please give me any idea without using library. Thank you in advance
@mihagradisnik979
@mihagradisnik979 9 ай бұрын
Thanks, great video.
@michaelpadovani9566
@michaelpadovani9566 7 жыл бұрын
Hey thx for sharing this seems like a super simple library
@learnelectronics
@learnelectronics 7 жыл бұрын
Michael Padovani just about as simple as they come
@CrazyHHO19
@CrazyHHO19 7 жыл бұрын
hello i was wondering if you would be able to help me.i have digital puls generator .how can i program it to run 10% duty cycle at 0.64 v input and gradually increacing voltage to 3.86v with duty cycle 90%.its for my project where voltage coming from throttle position valve potenciometer control my pulse/duty cycle generator which then directly control fuel injector.any advice most appreciated cheers jo
@eastern815
@eastern815 6 жыл бұрын
Sir what is the max frquency of arduino uno?
@emreaka3965
@emreaka3965 2 жыл бұрын
Thank you! You helped a lot.
@fredericobraga3777
@fredericobraga3777 10 ай бұрын
It worked for me with pins 9 and 10 of the Arduino Uno. But the other PWM pins didn't work. Can I change anything to make it work? Thanks for the video.
@xforney
@xforney 11 ай бұрын
How can I get the frequency counter that you are using? The link that you provided is not good anymore.
@georgechambers3197
@georgechambers3197 7 жыл бұрын
A project! I can't wait. Thanks for making the code and library available! I know this didn't need it but a simple schematic would also be very helpful for us duffers.
@alexstone691
@alexstone691 4 жыл бұрын
Note that the analogWrite can run only once in setup, cause its a hardware timer
@Silverbugle2005
@Silverbugle2005 5 жыл бұрын
Awesome tutorial. Do you have a sketch for changing the pulse width with the potentiometer? Thanks
@RNA0ROGER
@RNA0ROGER 7 жыл бұрын
Could this work with the at tiny 85?
@learnelectronics
@learnelectronics 7 жыл бұрын
("RNA0ROGER") I've never used the AT Tiny, so I don't know. Can't hurt to try though.
@carlossorondo5152
@carlossorondo5152 5 жыл бұрын
Can you do it with two to 4 pins putting different freq and PWM . Maybe one pin 20Khz at 5% and pin 2 at 90% at 20khz
@TheScambreaker
@TheScambreaker 5 жыл бұрын
Thanks for good job. But this method does not compatible with DigiSpark. Could you please, fix that for DigiSpark?
@sribalaji4289
@sribalaji4289 2 жыл бұрын
GREAT thanks man 😌
@osamaabraheem2797
@osamaabraheem2797 4 жыл бұрын
Hello Thank you for the great information you provide I wish you to live with pleasure can I ask a question the question is Can I get the 15 Hz frequency directly from the Arduino?
@KyrosNox
@KyrosNox 5 жыл бұрын
I can't install the library. "Library.properties not found."
@oscarramos9318
@oscarramos9318 7 жыл бұрын
I can't install the library. help please!
@ericthered9655
@ericthered9655 3 жыл бұрын
I can't see the code
@anupamchandra8996
@anupamchandra8996 7 жыл бұрын
Hey! I'm not able to install the library.
@electronicsenthusiast4957
@electronicsenthusiast4957 4 жыл бұрын
Can you send me a code with 2 pots 1 for changing frequency and other for changing duty cycle
@АндрейЩёголев-м8о
@АндрейЩёголев-м8о 4 жыл бұрын
Links to the library are inactive. Please update.
@MrTrollBeast
@MrTrollBeast 6 жыл бұрын
Awesome stuff man
@UpcycleElectronics
@UpcycleElectronics 7 жыл бұрын
Have you ever thought about making a DC converter out of an Arduino? I have an old portable heater I was given for parts. It used 2 PIC12F675's as switching controllers in a boost topology for the heating element and an 'ozone ionizing grid.' I thought it might be interesting to make an Arduino version of a DC Converter controller. I'm a slow handicap gimp with a bad back. I'm not sure how long a project like that would take for me to complete.
@learnelectronics
@learnelectronics 7 жыл бұрын
Upcycle Electronics any Arduinos would be more than capable, but it seems to me to be a bit of an overkill. A 555 timer will do the job nicely. did you see my "make your own boost converter" video? If not, here's a link...kzbin.info/www/bejne/f6ndoKSwl6aMnKc
@UpcycleElectronics
@UpcycleElectronics 7 жыл бұрын
learnelectronics Sure it can be done with a 555. I've seen people try to use an Arduino just for the display interface of a bench power supply. I would find it interesting to try to build the display, interface, and controller on a single platform. I don't even know if it's possible for the Arduino to handle both the interface and controller, but a PWM constant current controller with adjustable current and voltage would probably be popular for those ready to start exploring more relevant technology than ancient linear supplies.
@PG-qm5nk
@PG-qm5nk 7 жыл бұрын
Can you incorporate a 2nd pot to vary the frequency value as set by the instruction... " int32_t frequency = xxxx "... so that you can do it on the fly without a code change? just as your doing with the duty cycle.?
@learnelectronics
@learnelectronics 7 жыл бұрын
paul gray I tried that with no luck, but I may have done something wrong.
@elmirrsetiawan7557
@elmirrsetiawan7557 6 жыл бұрын
if 3 phases can or not? And how to make a 120 degree phase ?
@ameralahmad3563
@ameralahmad3563 4 жыл бұрын
thank you , it was very useful, because I want kHz pwm for my dc motor driver, thank you very much
@mackrin9366
@mackrin9366 4 жыл бұрын
Thank you for help!!
@Dennis000236
@Dennis000236 5 жыл бұрын
Great Video! Is this also can change the noise out of my dc fan?
@mohammedelqadmiry2999
@mohammedelqadmiry2999 4 жыл бұрын
this library works on the arduino nano also ?
@JuanCarlos-ff6vp
@JuanCarlos-ff6vp 3 жыл бұрын
Can you set different frequencies in different pins at the same time (in the same program)?. Greetings.
@JCchan99
@JCchan99 5 жыл бұрын
When I try to install it as a zip library it says Specified folder/zip file does not contain a valid library! v5
@JCchan99
@JCchan99 5 жыл бұрын
solved changed the name to something without dashes or spaces and took out all the unessential files
@ezgieftekin4495
@ezgieftekin4495 5 жыл бұрын
@@JCchan99 I see the same error. Which are the unnecessary files? How can i know?
@filigenzilab9613
@filigenzilab9613 5 жыл бұрын
What’s the maximum frequency an arduino can generate with this code?
@Boborski06
@Boborski06 5 жыл бұрын
In the comments of the lib, it's written 2MHz
@filigenzilab9613
@filigenzilab9613 5 жыл бұрын
Boborski06 thanks
@Nebilson
@Nebilson 4 жыл бұрын
Thank you so much.
@santoshm7354
@santoshm7354 4 жыл бұрын
a doubt ..sir, bu=y using this function can we give that pwm to a mosfet.. or it will only work for led?? please reply... thank you for video .. really helpful
@dee5556
@dee5556 4 жыл бұрын
If you want to drive a MOSFET with a gate over 5V you need to go through a optocoupler
@eddymeshack
@eddymeshack 7 жыл бұрын
is it even possible to change the frequency on the arduino using matlab gui
@learnelectronics
@learnelectronics 7 жыл бұрын
+Eddy Meshack I am not familiar with Matlab
@janneraatikainen9453
@janneraatikainen9453 3 жыл бұрын
Three pins worked ok: digital D3 (PD3), D9 (PB1) and PD10 (PB2). Other PWM - pins did not work. Those that worked ok, worked well.
@alfstewart2592
@alfstewart2592 10 ай бұрын
thanks i was using D5 couldn't figure out why it wouldn't work
@Potatogambit
@Potatogambit 6 жыл бұрын
Awesome thanks for sharing this. Question? Does this mess up the delay function?
@hilmydzulfaqar8087
@hilmydzulfaqar8087 7 жыл бұрын
can i change to 50hz?
@learnelectronics
@learnelectronics 7 жыл бұрын
Hilmy Dzul Faqar yes
@danieldominguez8135
@danieldominguez8135 5 жыл бұрын
does it work also with the arduino mega?
@paragyadav03
@paragyadav03 4 жыл бұрын
no
@davemooreracing
@davemooreracing 7 жыл бұрын
Paul did you ever test how low you could go the frequency?
@learnelectronics
@learnelectronics 7 жыл бұрын
+Dave Moore no, but I will
@wa8eem
@wa8eem 5 жыл бұрын
It simply works
@JDI4DAVID
@JDI4DAVID 7 жыл бұрын
Have you tried varying the frequency within the loop program? Can it be done? Thanks for the very interesting video. I want to make some noise with the Arduino.
@learnelectronics
@learnelectronics 7 жыл бұрын
+David Tucker I tried changing it with a pot, I didn't have any luck. But to be fair, I only tried for about 5 minutes.
@fredlllll
@fredlllll 7 жыл бұрын
hmm code.google? i thought they discontinued that. i would advise looking for a library that is on github :P
@learnelectronics
@learnelectronics 7 жыл бұрын
GitHub bleh
@fredlllll
@fredlllll 7 жыл бұрын
you dont have to use it :P just download the zip
@xgrapher
@xgrapher 4 жыл бұрын
that on to off ratio is called DUTY CYCLE sir
@learnelectronics
@learnelectronics 4 жыл бұрын
yeah. I know. sometimes I cant remember terms.
@JCchan99
@JCchan99 5 жыл бұрын
Sadly I can't have 1 second on one second off with this library because I need a frequency of 0.5 Hz and freq. is controlled by an int32 and I would need a float
@SirDella
@SirDella 5 жыл бұрын
You could code that with delays or Millis, it's a very low frequency
@rupeshpatil5568
@rupeshpatil5568 3 жыл бұрын
Now just feed that signal in a mosfet and you got a powerful speed controller!
Arduino DIY Digital Picture Frame
10:38
learnelectronics
Рет қаралды 24 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
How PWM works | Controlling a DC motor with a homemade circuit
10:01
Arduino PWM Frequency Tweaked to 1kHz
17:00
Julian Ilett
Рет қаралды 16 М.
Optimizing Arduino Code: no setup(), no loop() ⛔
9:27
Wokwi
Рет қаралды 214 М.
Arduino 1Hz 1MHz adjustable PWM signal generator
4:37
Mr.T's Design Graveyard
Рет қаралды 6 М.
Arduino Uno R3 Super Starter Kit from Miceplay
14:43
learnelectronics
Рет қаралды 1,9 М.
Arduino Multiplexor - MUX INPUTS & OUTPUTS - ANALOG and PWM
13:21
Electronoobs
Рет қаралды 116 М.
Arduino PWM Tutorial #1 - How To Change PWM Frequency
11:09
Julian Ilett
Рет қаралды 154 М.
Arduino vs PWM controller
9:59
learnelectronics
Рет қаралды 15 М.
Полыхание №2
18:58
Metal Family Xydownik
Рет қаралды 908 М.
Урыла😏 #кино #film #fypシ #minions
0:37
Faron
Рет қаралды 8 МЛН
chor chor chor 🤣 #shortsvideo
0:16
arati sahani & jyoti 2.0
Рет қаралды 20 МЛН
Oh no😱 EPIC Kissy Missy broke her teeth SITUATION by COOL TOOL
0:39
LNS - Khinh thường bạn nghèo khổ || Despise the poor friend #shorts
0:55