In some examples, a device for delivering electrical stimulation to a medical patient includes an electrical stimulation generator, a coupling circuit, and a processing module. The electrical stimulation generator is configured to generate electrical stimulation. The coupling circuit includes a first node connected to the electrical stimulation generator, a second node configured to deliver the electrical stimulation to the patient, and a capacitor. The coupling circuit is configured to operate in a first state to couple the capacitor between the first and second nodes in a first orientation and operate in a second state to couple the capacitor between the first and second nodes in a second orientation that is opposite to the first orientation. The processing module is configured to set the state of the coupling circuit to one of the first and second states.