You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
This is clever! Seems that the Mozzi sound synthesis library uses this trick for it's so called "HIFI" mode.Edgar Bonet– Edgar Bonet2015年06月17日 19:40:17 +00:00Commented Jun 17, 2015 at 19:40
-
That is a great us of the PWM. But wouldn't this smooth out the waveform? I am asking this since you are using a RC filter. Haven't mentioned this in my question but I'm driving a DC motor with it <feeling ashamed>. Thank you for the input!KoenR– KoenR2015年06月18日 06:14:14 +00:00Commented Jun 18, 2015 at 6:14
-
@KoenR (fwiw: I don't see anything to be ashamed of.) I don't know what frequency response/rate of change you want in your ADC output. Or why you want N bits or how big is enough. Motors will usually not be usefully controlled by more than 8 bits - depends on how precision an application you have. Motor acts as part of a smoothing filter due to inductance. You need to say what sort of motor and how driven. And a circuit diagram is about essential. Unless motor is tiny you have a driver. A brushed motor fed PWM must have a a catch diode to pass motor current when PWM is off. Adding two ...Russell McMahon– Russell McMahon2015年06月18日 09:01:07 +00:00Commented Jun 18, 2015 at 9:01
-
... PWMs here is entiely doable but circuit details need to be known.Russell McMahon– Russell McMahon2015年06月18日 09:01:34 +00:00Commented Jun 18, 2015 at 9:01
-
Beware! In some cases, smoothing out PWM with a low pass RC is not desirable. E.g., if you plug the Arduino output into the gate of a MOSFET, the MOSFET will stay cold as long as it's driven by clean PWM. But if you smooth it out, the MOSFET will start dissipating much more heat. Sometimes that's not a good thing.Florin Andrei– Florin Andrei2015年07月13日 06:46:03 +00:00Commented Jul 13, 2015 at 6:46
lang-cpp