PWM/Solenoid is making an audible tone

Hey ya'll, thanks in advance for taking a look at this.

I'm using an hbridge/solenoid to whack something. The circuit is working fine. :grin:

When I use PWM to control how hard the solenoid hits, I can hear it as an audible tone out of the solenoid. It's quiet, but loud enough that it sounds like I have a squeaky solenoid, and that doesn't fly for this application.

Anyone know of a way to mitigate this? I've considered:
a) putting in an analog low pass filter to filter out the audible portion of the frequency
b) changing the PWM timing on the Arduino (somehow getting it above 18-20kHz?)
c) a brilliant solution that I haven't thought of that you will share with me

Thoughts? Thanks a bunch!

-Nate

Google "Arduino PWM secrets" for sites on changing the PWM frequency.

Oh @neito. I just can't resist embarrassing you.

List of topics in this section...
http://forum.arduino.cc/index.php?board=9.0

The top two threads when I created this post...

How to get 20khz PWM on pin D9
PWM/Solenoid is making an audible tone
...

PWM/Solenoid is making an audible tone is this thread. Guess what's in the other thread? :wink:

HAHAHAHAHA oh my gosh. Thanks!