Hey guys! I'm working on an audio circuit and I'm using PWM to control and LED. I'm using the PCA9635 which is switching at 96Khz (100Khz measured) and it works fine except that the PWM line that I'm using is emitting a noise (around 1k) which is being picked up by the audio circuit. I'm definitely not hearing the PWM signal since that signal is way out of the audio band so I assume it's something switching in the PCA9635.
To that end I had the idea to put the I2C code in the setup loop so it would only run once. That didn't help.
I added 0.1uF of filter after the series resistance and that helped a ton BUT it basically turned the PWM output to the LED into an ON/OFF situation. Totally makes sense there.
So today I had the idea to try the PWM output on the Arduino UNO and once I modded the code to run the PWM at 63Khz it worked perfectly. No noise and no filtering needed.
The issue is that I need to control 14 of these LED's and obviously I don't have enough onboard PWM outputs to make that happen which is the reason why I was using the PCA9635 in the first place.
Does anyone have any council/experience with the PCA9635 and have any ideas on what I could be missing?
I did find that the noise signature is way better when the PCA9635 is run in current sink mode instead of current source mode.
What is the difference between the onboard PWM on the Arduino and the outboard units...aside from the I2C connection?
Thanks so much for any advice!