I’m using the PWM output via pins 5 and 6 of my UNO (About 980hz as far as my researches tell me), via a DRV8833 H-Bridge to power a small model rail loco.
No surprisingly the loco motor whines a bit (I don’t yet know if it overheats!), though the setup works perfectly well from the point of view of what I want it to do.
I don’t want to fudge the UNO to give a higher frequency, since this seems to be a good way of impacting its internal timing, which would mess up the other processing ever so slightly!
However I want to get rid of the whine, and the way to do this seems to be to put a low-pass RC filter between the H-Bridge and the track to smooth the output.
The circuits and advice I can find on the web (almost too much information!) all seem to be as per the attached circuit diagram.
The H-Bridge of course reverses the current! So ground becomes +ve and vice-versa.
So I need a bit of clarification to tell me what I’m missing - will the circuit as attached work irrespective of polarity, or do I need to do something else such as add a second filter that comes into play instead when the polarity is reversed, separated by a pair of diodes from the first?
Thanks in advance for your help - Richard.