How to isolate the charging of capacitors