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!
@CholoCJS6 ай бұрын
Sick!!! I have been needing a library that could do this for so much... Thanks
@MxWintersAFOL5 жыл бұрын
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
@hazim68015 жыл бұрын
Can we change the frequency of arduino pin up to 8khz?
@pedro-neves Жыл бұрын
Thanks! Finally, I was able to change my PWM frequency.
@axelroest7470 Жыл бұрын
Thanks for substituting the metal screwdriver to point at electrical signals and scratchable screens, into a wooden stick.
@1nvertedReality4 жыл бұрын
Worked great for my Nano 14 inch radiator fans controller! Quiet at any pulse width. Thanks.
@S-Tach6 жыл бұрын
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. ..
@aaandis8 ай бұрын
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.
@ismaillashari75976 жыл бұрын
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
@koomber7776 ай бұрын
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!
@spacewolfjr3 жыл бұрын
Very handy, thanks! Using this to fix the broken immobilizer in my Honda
@buder51164 жыл бұрын
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
@andreascavalieri68552 жыл бұрын
That is amazing! Thank you! You are awesome!!
@SoniyaRaju-b8x Жыл бұрын
hey please rply, i am not able to add library. please can you tell me steps to add library.
@tuberworksjones5 жыл бұрын
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
@ConorFenlon3 жыл бұрын
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)
@learnelectronics3 жыл бұрын
You don't say
@drumbum79992 жыл бұрын
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.
@ConorFenlon2 жыл бұрын
@@drumbum7999 You're absolutely right. Apologies for my error, and thanks for correcting me. 👍
@metehanmelih2 жыл бұрын
İt is saving my life babe. Thx for everything
@selielectronicspvtltd66294 жыл бұрын
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?
@josip18814 жыл бұрын
Thanks! Very well explained in short time.
@evanperrygiblin4 жыл бұрын
so there are no prescalars?
@ivorstanisic65415 жыл бұрын
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
@mariopadilla308610 ай бұрын
hello, you dont modify the frequency, only the duration of the power.
@tcratius17484 жыл бұрын
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.
@cyberwasp4615 жыл бұрын
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.
@vasupodila11492 жыл бұрын
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
@mihagradisnik9799 ай бұрын
Thanks, great video.
@michaelpadovani95667 жыл бұрын
Hey thx for sharing this seems like a super simple library
@learnelectronics7 жыл бұрын
Michael Padovani just about as simple as they come
@CrazyHHO197 жыл бұрын
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
@eastern8156 жыл бұрын
Sir what is the max frquency of arduino uno?
@emreaka39652 жыл бұрын
Thank you! You helped a lot.
@fredericobraga377710 ай бұрын
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.
@xforney11 ай бұрын
How can I get the frequency counter that you are using? The link that you provided is not good anymore.
@georgechambers31977 жыл бұрын
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.
@alexstone6914 жыл бұрын
Note that the analogWrite can run only once in setup, cause its a hardware timer
@Silverbugle20055 жыл бұрын
Awesome tutorial. Do you have a sketch for changing the pulse width with the potentiometer? Thanks
@RNA0ROGER7 жыл бұрын
Could this work with the at tiny 85?
@learnelectronics7 жыл бұрын
("RNA0ROGER") I've never used the AT Tiny, so I don't know. Can't hurt to try though.
@carlossorondo51525 жыл бұрын
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
@TheScambreaker5 жыл бұрын
Thanks for good job. But this method does not compatible with DigiSpark. Could you please, fix that for DigiSpark?
@sribalaji42892 жыл бұрын
GREAT thanks man 😌
@osamaabraheem27974 жыл бұрын
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?
@KyrosNox5 жыл бұрын
I can't install the library. "Library.properties not found."
@oscarramos93187 жыл бұрын
I can't install the library. help please!
@ericthered96553 жыл бұрын
I can't see the code
@anupamchandra89967 жыл бұрын
Hey! I'm not able to install the library.
@electronicsenthusiast49574 жыл бұрын
Can you send me a code with 2 pots 1 for changing frequency and other for changing duty cycle
@АндрейЩёголев-м8о4 жыл бұрын
Links to the library are inactive. Please update.
@MrTrollBeast6 жыл бұрын
Awesome stuff man
@UpcycleElectronics7 жыл бұрын
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.
@learnelectronics7 жыл бұрын
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
@UpcycleElectronics7 жыл бұрын
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-qm5nk7 жыл бұрын
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.?
@learnelectronics7 жыл бұрын
paul gray I tried that with no luck, but I may have done something wrong.
@elmirrsetiawan75576 жыл бұрын
if 3 phases can or not? And how to make a 120 degree phase ?
@ameralahmad35634 жыл бұрын
thank you , it was very useful, because I want kHz pwm for my dc motor driver, thank you very much
@mackrin93664 жыл бұрын
Thank you for help!!
@Dennis0002365 жыл бұрын
Great Video! Is this also can change the noise out of my dc fan?
@mohammedelqadmiry29994 жыл бұрын
this library works on the arduino nano also ?
@JuanCarlos-ff6vp3 жыл бұрын
Can you set different frequencies in different pins at the same time (in the same program)?. Greetings.
@JCchan995 жыл бұрын
When I try to install it as a zip library it says Specified folder/zip file does not contain a valid library! v5
@JCchan995 жыл бұрын
solved changed the name to something without dashes or spaces and took out all the unessential files
@ezgieftekin44955 жыл бұрын
@@JCchan99 I see the same error. Which are the unnecessary files? How can i know?
@filigenzilab96135 жыл бұрын
What’s the maximum frequency an arduino can generate with this code?
@Boborski065 жыл бұрын
In the comments of the lib, it's written 2MHz
@filigenzilab96135 жыл бұрын
Boborski06 thanks
@Nebilson4 жыл бұрын
Thank you so much.
@santoshm73544 жыл бұрын
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
@dee55564 жыл бұрын
If you want to drive a MOSFET with a gate over 5V you need to go through a optocoupler
@eddymeshack7 жыл бұрын
is it even possible to change the frequency on the arduino using matlab gui
@learnelectronics7 жыл бұрын
+Eddy Meshack I am not familiar with Matlab
@janneraatikainen94533 жыл бұрын
Three pins worked ok: digital D3 (PD3), D9 (PB1) and PD10 (PB2). Other PWM - pins did not work. Those that worked ok, worked well.
@alfstewart259210 ай бұрын
thanks i was using D5 couldn't figure out why it wouldn't work
@Potatogambit6 жыл бұрын
Awesome thanks for sharing this. Question? Does this mess up the delay function?
@hilmydzulfaqar80877 жыл бұрын
can i change to 50hz?
@learnelectronics7 жыл бұрын
Hilmy Dzul Faqar yes
@danieldominguez81355 жыл бұрын
does it work also with the arduino mega?
@paragyadav034 жыл бұрын
no
@davemooreracing7 жыл бұрын
Paul did you ever test how low you could go the frequency?
@learnelectronics7 жыл бұрын
+Dave Moore no, but I will
@wa8eem5 жыл бұрын
It simply works
@JDI4DAVID7 жыл бұрын
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.
@learnelectronics7 жыл бұрын
+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.
@fredlllll7 жыл бұрын
hmm code.google? i thought they discontinued that. i would advise looking for a library that is on github :P
@learnelectronics7 жыл бұрын
GitHub bleh
@fredlllll7 жыл бұрын
you dont have to use it :P just download the zip
@xgrapher4 жыл бұрын
that on to off ratio is called DUTY CYCLE sir
@learnelectronics4 жыл бұрын
yeah. I know. sometimes I cant remember terms.
@JCchan995 жыл бұрын
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
@SirDella5 жыл бұрын
You could code that with delays or Millis, it's a very low frequency
@rupeshpatil55683 жыл бұрын
Now just feed that signal in a mosfet and you got a powerful speed controller!