The box houses very delicate electronic circuits as well as a battery. A small computer monitors and stores information about the heart beat and if needed generates an electric current that normalizes the pulse.