A system for cardiac pacing includes circuitry and at least two electrodes, configured to be placed in contact with a chest of a subject. The circuitry is configured to receive electro-cardiogram (ECG) signals from the at least two electrodes, to identify brachycardia or asystole or ventricular tachycardia in the subject based on the received ECG signals, upon identifying brachycardia or asystole or ventricular tachycardia, to shape a mains electrical source signal into a waveform applicable to a transformer for generating a pacing signal, to generate the pacing signal by applying the waveform to the transformer, and to apply the pacing signal through the at least two electrodes to the chest of the subject.