Detailed explanation of capacitor basics