Pages: [1]   Go Down
Author Topic: PWM variable frequency added to the PWM function.  (Read 2564 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I keep running into this issue for my capacitive discharge welder project.  I need to be able to accurately control the energy discharged with a MOSFET but not being able to easily set the frequency accurately.  It would be nice to see this feature added to the PWM function.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have had this capability on other boards right from the start that I've used for our robotics club at college.  It would be a shame to see such a useful feature left out of the next revision. :'(
Logged

AREA COLOGNE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1125
I am 1 of 10 who understands binary
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This woul be a nice feature. As you can read an another thread of me  I worte my own function to generate an Low Base Frequency PWM.
Logged

So ist das Leben:
Manchmal bis du das Denkmal, manchmal die Taube!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good idea.  You can do it hacking the timers, but the code is messy, and apparently can affect other things if you're not careful.

That's probably the main reason it wasn't included; unintended consequences... each pair of PWM pins is tied to a timer that controls the PWM frequency... and millis(), micros(), and other functions depend on TIMER0 being a specific frequency... still, this could all be noted in the documentation about how to use it...
Logged

Pages: [1]   Go Up
Jump to: