← Back to Projects

ECG Signal-Conditioning PCB

An AD623 instrumentation amplifier and two op-amp filter stages, taken from a lab reference schematic to my own fabrication-ready board.

Nov. 2026 · Design complete

  • AD623
  • TLV2462
  • Altium Designer
  • PCB
  • Analog filters
  • Feather nRF52840

Key outcomes

  • I designed the schematic and laid out the board. It validates clean, and the Gerbers are ready.
Two-layer ECG front-end PCB, 54/54 nets routed. Red = top copper, blue = bottom.
Two-layer ECG front-end PCB, 54/54 nets routed. Red = top copper, blue = bottom.

Project overview

An AD623 instrumentation amplifier and two op-amp filter stages, taken from a lab reference schematic to my own fabrication-ready board. It runs from a single 3.3 V rail and feeds a Feather's ADC.

Implementation

I designed the schematic and laid out the board. It validates clean, and the Gerbers are ready.

Full engineering log

Overview

What it does

An ECG at the skin is about 1 mV. It rides on electrode offsets hundreds of times larger and shares the wires with 60 Hz mains noise. One high-gain amplifier would saturate immediately, so the job is split across three stages. The instrumentation amplifier takes the difference between two electrodes. An integrator loop strips out the DC. Two filter stages then shape the band to about 0.5–160 Hz, where the PQRST waveform lives, and add the rest of the gain.

Everything runs from the Feather's 3.3 V rail, so 'zero' for the signal is 1.65 V, the middle of the supply, not 0 V. That gives the op-amps the most room to swing both ways.

Signal chain
Signal chain: J1 input → AD623 → 160 Hz low-pass → 0.5 Hz high-pass → J3 output, with an integrator on REF and a buffered 1.65 V reference.

Signal chain: J1 input → AD623 → 160 Hz low-pass → 0.5 Hz high-pass → J3 output, with an integrator on REF and a buffered 1.65 V reference.

Schematic
Full Altium schematic.

Full Altium schematic.

How it works

Four blocks, one reference

01

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)

Stage 1: AD623 + integrator
AD623 with R4 gain resistor; U1A integrator driving REF.

AD623 with R4 gain resistor; U1A integrator driving REF.

02

Stage 2: 160 Hz low-pass + gain

An RC filter at U1B's input rolls off everything above about 160 Hz before more gain is added. The gain resistor returns to 1.65 V, not ground, so the bias isn't amplified along with the signal.

fc = 1/(2π·10k·0.1µ) ≈ 159 Hz · G = 1 + 270k/12k = 23.5

Stage 2: 160 Hz low-pass + gain
10 kΩ / 0.1 µF low-pass into a non-inverting gain stage (U1B).

10 kΩ / 0.1 µF low-pass into a non-inverting gain stage (U1B).

03

Stage 3: high-pass + correction

A series capacitor blocks any remaining DC. The R10 ∥ C4 feedback gives a ×2 boost at very low frequency, which undoes the dip that Stage 1's lossy integrator creates.

(2 + sτ) / (1 + sτ), τ = 0.89 s

Stage 3: high-pass + correction
High-pass at the + input, R10 ∥ C4 correction feedback (U2A).

High-pass at the + input, R10 ∥ C4 correction feedback (U2A).

04

1.65 V virtual ground

Two 100 k resistors halve 3.3 V. U2B, wired as a follower, makes that half-supply stiff enough that the resistors tied to it can't drag it around. Every power port named 1.65V joins this net.

1.65 V virtual ground
100 k / 100 k divider buffered by U2B onto the 1.65V net.

100 k / 100 k divider buffered by U2B onto the 1.65V net.

Decisions

Design decisions

Gain split across three stages.

Problem
One amplifier at the full gain, about 60 dB, saturates on the electrode offset before the heartbeat shows up.
Choice
The AD623 takes the difference at about 46.5, and the two filter stages add the rest of the gain inside roughly 0.5–160 Hz.
Tradeoff
The low end is two shapes that have to cancel: Stage 1's dip, and Stage 3's boost.

Signal zero at 1.65 V.

Problem
The Feather supplies one 3.3 V rail, and the op-amps cannot swing below ground.
Choice
Every stage is biased to 1.65 V, half the rail, from a divider buffered by U2B. Stage 2's gain resistor returns to that net, so the bias is not amplified with the signal.
Tradeoff
Resistors tied to an unbuffered divider will drag it, and a net that is only a name is not a voltage.

A lossy integrator on REF.

Problem
REF has to cancel slow drift and still pass the heartbeat.
Choice
R5 across C2 cuts the lowest frequencies about in half, a 6 dB dip, and Stage 3's R10 ∥ C4 puts that back with a ×2 boost. The R/C node goes to U1A's − input, with + at 1.65 V.
Tradeoff
Neither stage is flat at the bottom by itself. Together the calculated −3 dB point is 0.53 Hz. Wiring the R/C node to + instead would latch REF to a rail.

Through-hole everything.

Problem
I'm assembling the board by hand.
Choice
DIP and axial/radial parts only, including a custom DIP-8 footprint for the AD623.
Tradeoff
A bigger board, but every joint can be soldered and probed.

−IN on a header, not ground.

Problem
The lab reference grounds −IN, which only suits the single-ended sine test.
Choice
Route −IN to its own pin on J1.
Tradeoff
One jumper wire for the sine test, but the same board works with real electrodes.

Values from parts on hand.

Problem
I didn't have the lab's 330 k / 0.47 µF values.
Choice
100 k / 3.3 µF and 270 k parts, re-checked analytically.
Tradeoff
Different time constants, but nearly the same passband as the reference (see Performance).

What failed

What broke in the schematic

Vin reported as GND.

What I saw
The Vin net kept showing as GND.
What I checked
Junction dots along one long wire.
What it was
A single wire had merged +IN, −IN, both gain pins and ground into one net.
What I took from it
Crossing wires must not get junctions, so I read the dots.

“Through-hole” parts that weren’t.

What I saw
AD623BRZ and TLV2462IDG4 in the BOM.
What I checked
The package codes and footprints.
What it was
Both were SOIC, and the vault part was locked.
What I took from it
The footprint decides THT or SMD, not the part name, so I built a DIP-8 footprint.
Altium Footprint Wizard for a DIP-8 AD623.
DIP-8 footprint drawing for the AD623.
3D body of the DIP-8 footprint for the AD623.

Building a DIP-8 footprint for the AD623 in Altium.

Decoupling caps in series.

What I saw
3.3 V routed through a capacitor into pin 8.
What I checked
The power path on each chip.
What it was
The chip would have had no DC power.
What I took from it
Decoupling sits across the rails, one cap per package.

A reference with no source.

What I saw
Resistors tied to a 1.65V port.
What I checked
What actually drove that net.
What it was
Nothing; a label is not a voltage.
What I took from it
I added the divider + follower, and now every named net gets a “who drives this?” check.

Layout

From ratsnest to Gerbers

Parts are grouped by chip in signal order (AD623 → U1 → U2), with the input header away from the output. Rules were set for hand fabrication: 15–30 mil traces and 14 mil clearance. The Situs autorouter completed 54 of 54 connections on two layers.

Placement
Placement: each chip clustered with its own parts.

Placement: each chip clustered with its own parts.

Routed
Two-layer ECG front-end PCB, 54/54 nets routed. Red = top copper, blue = bottom.

Two-layer ECG front-end PCB, 54/54 nets routed. Red = top copper, blue = bottom.

Headers
J1 input, J2 power, J3 output headers.

J1 input, J2 power, J3 output headers.

  • Validate: 0 errors
  • Routed: 54/54
  • DRC electrical: 0
  • DRC silkscreen: 6 (cosmetic)
  • Outputs: RS-274X + NC drill

Performance

Predicted response

Calculated from component values with ideal op-amps, not yet measured on hardware.

Overall
Predicted overall gain: ~60.7 dB peak, −3 dB at 0.53 Hz and 160 Hz.

Predicted overall gain: ~60.7 dB peak, −3 dB at 0.53 Hz and 160 Hz.

Per stage
Gain of each stage alone.

Gain of each stage alone.

Predicted gain from the component values, ideal op-amps
FrequencyPredicted gain
0.5 Hz57.6 dB
10 Hz60.7 dB (peak, ~1086×)
100 Hz59.3 dB
160 Hz57.7 dB

A 2 mVpp, 100 Hz test signal should come out at about 1.85 Vpp centred on 1.65 V, inside the 3.3 V rails.

Diary

Project diary

The full engineering write-up: every stage, every fix, the footprint work and the layout, as a 10-page diary in the same format as my other project journals.

  • Project diary, page 1 of 10.

    Page 1

  • Project diary, page 2 of 10.

    Page 2

  • Project diary, page 3 of 10.

    Page 3

  • Project diary, page 4 of 10.

    Page 4

  • Project diary, page 5 of 10.

    Page 5

  • Project diary, page 6 of 10.

    Page 6

  • Project diary, page 7 of 10.

    Page 7

  • Project diary, page 8 of 10.

    Page 8

  • Project diary, page 9 of 10.

    Page 9

  • Project diary, page 10 of 10.

    Page 10

Read the full diary (PDF)

Status

Where it stands

Done

Clean schematic, custom DIP-8 footprint, routed two-layer board, Gerbers exported.

Open

Add C5 (U2 decoupling) to the PCB, tidy four auto-generated designators and the BOM part numbers, then re-export.

Next

Fabricate and assemble, confirm 1.65 V, run the lab's stage-by-stage tests and Bode sweeps, then capture a live ECG on the Feather.