First of all, sorry if the wording is not correct, my background and all work experience is basically mechanical engineering and I just started venturing on electronics.
I'm trying to control several solenoids at once, around 40, I adjusted the PWM frequency to be higher than 20 kHz so there would be no whining, and they are actuated with different voltages, so they output different forces, I'm overvoltaging then for no more 10-20 mS at a time. It works perfectly fine when I'm using it directly from the pins. But as you know, there is a limited number of pins on any Arduino.
I've been trying to use the shiftPWM library by Elco Jacobs, but I don't know if it is the right approach for it, since I've been having a hard time to make it work for higher PWM frequencies and then this whining is always there.
My question is, does anyone have more experience using that said library and can point if that library and shift registers are suited for that application. If not, what would be the best approach to do it and to be able to control all outputs at once?