I've used the PWM pins on a Arduino, works well. Good dimming range with no obvious flickers
https://github.com/bnepethomas/bne-arduino-flight-simulator-interfaces/tree/547932be65f759cf038e3f2a632a62336e5e0f8f/PCBs/OH - Hornet Forward Upper Output Shield
I take the output directly from DCS BIOS
https://github.com/bnepethomas/bne-arduino-flight-simulator-interfaces/blob/547932be65f759cf038e3f2a632a62336e5e0f8f/DCS BIOS Sketches/Active/UIP_MAX7219_NEXTRON_POWER_RELAY/UIP_MAX7219_NEXTRON_POWER_RELAY.ino