How to convert a transformer into a capacitor