Stage 1: AD623 + integrator
The AD623 amplifies the difference between +IN and −IN and rejects anything common to both. U1A watches its output and drives the REF pin to cancel slow drift, so the output stays centred on 1.65 V while the heartbeat passes through.
G = 1 + 100 kΩ / 2.2 kΩ ≈ 46.5 (33 dB)

AD623 with R4 gain resistor; U1A integrator driving REF.





















