In certain aspects, a method for providing electrical stimulation includes transferring energy from a battery to an electrode to charge the electrode, and, after the electrode is charged, transferring energy from the electrode to the battery to discharge the battery. The energy transferred from the electrode to the battery may include a portion of the energy transferred from the battery to the electrode.