Your wiring is mostly correct. Connect PCA9685 V+ to motor power supply and all grounds together. Use the Adafruit PWM library, map 0–255 to 0–4095 for each channel, and control motors via serial by sending ID and value. Make sure your power supply can handle total current; 3.3V 20A may be insufficient for all 32 motors.
Use Adafruit PCA9685 library, try some example to set PWM duty cycle.
PCA9685 outputs 12-bit PWM, so its range is 0–4095. Either use that on your serial commands or use for example 0-100 and map it to 0-4095 on your code.
20A is way more than you need for your motors, doesn't hurt though.
FYI:
All PCA9685 boards that I have seen, have a 220Ω resistor in series with each output.
The source current capability of the PCA9685 is very limited. It is primarily designed to sink current for LEDs
You are in a questionable area, you will need about 200mA just to drive the bases. A much better solution is to use a MOSFET in place of the 2n2222. You also need some additional bypass capacitors to filter out noise.
With a 100mA load that regulator will be very hot, near shutdown with a 12V supply. I recommend you use an external power supply for the 5V but use the Vin to power the Nano because of the extra filtering and noise immunity you will get.
True. The PCA9685 is better at sinking current.
If PCA VCC is the same as motor VCC, then you could use HIGH-side switching, with PNP transistors.
A better option is to use the ULN2803 (8 outputs) instead of transistors + diodes.
Then you can also use a more common 5volt supply, because of the higher saturation loss of darlingtons.
Leo..
I looked into that IC - it looks like a good solution for the transistor motor drivers I shared in my schematics. But I will then need to use 16 output of the Arduino in order to control each of my 16 pairs of motors separately, isn’t it?
Have you considered the power dissapation of the IC. Under certain combinations of speed and number of motors running you may exceed the total power dissapation of the IC.
You also need to consider the Vce(sat). Your motors will now have a much lower voltage and run slower
That chip can replace the motor drivers, but you still need that PCA9685 board to generate the 16 PWM control signals, assuming you want speed control.
Leo..