I'm building a charging circuit for two supercaps (2.7V, 3000F each) in series. I've got a 12V supply and a buck converter rated to 15A, which I've set to provide 4.8V. I'm using balance resistors to evenly distribute the voltage between the two caps. I'm using an Arduino to monitor and display the charge across the capacitor bank through another potential divider, and the current with a 20A ACS712 module. I can charge the capacitors by using a current limiting ~0.5 Ohm resistor (actually quite a few power resistors in parallel) in series with the capacitor but this is quite inefficient in terms of both volume and power. Can I use a PWM signal from the Arduino to control a power MOSFET in place of the resistor to limit the current to the capacitor, basing the duty cycle on the ACS712 current signal? I'm guessing I'd need to smooth the input signal to the Arduino to get an average current reading, but my question is would this rapid switching of current damage the buck converter or capacitor?