Pacemakers
The simple
physics behind this is actually relatively straightforward,
the cells that run along your heart (and even your bloodstream
for that matter) conduct electricity very well due to the high
concentration of electrolytes in them. So the only real
struggle with engineering the pacemaker is to identify exactly
how much voltage is necessary to get your heart going. Your
average pacemaker puts out up to 5 Volts creating about 10mA
of current. And the sensor within the pacemaker is what
determines when and how much of this is necessary.
https://www.health.harvard.edu/heart-health/dont-fear-pacemakers
A pacemaker
is essentially a small
Lithium battery, and a capacitor that is connected to a
sensor that tracks when your heartbeat is off rhythm.
This device creates electrical pulsations that either replace
or correct the regular pulses that your body would produce on
it's own. The most typical pacemaker that you will find is one
that has two leads that go into veins near the top atrium's
and send correctly timed pulses that cause the heart to
contract in a way that pumps blood properly. Not all
pacemakers use leads though, some don't even need to be
surgically implanted, there are some that are like small pill
capsules that send the electricity with no wire, while others
send a single lead into your vein with the device being
attached to your chest.