Coupons
Help
  • FAQ
    browse most common questions
  • Live Chat
    talk with our online service
  • Email
    contact your dedicated sales:
EN
EN

ESP32 Patient Health Monitor on a 2-Layer PCB: Analog Paths, Headers and DFM

Author : Daniel Li | PCB Assembly & Electronics Application Engineer

August 26, 2026


A breadboard full of biomedical modules is entertaining for an afternoon and unreliable by dinner. In the video, How To Electronics set out to leave that phase behind. The creator wanted a low-cost station that could read heart rate from a real ECG waveform, SpO₂ from a fingertip, body temperature from a 10K NTC, plus room temperature and humidity—then serve every reading from the ESP32 itself. Anyone on the same Wi-Fi network opens an IP address. No extra display. No cloud bill.

ESP32 Patient Health Monitor

That brief does not survive jumper wire. Cardiac signals sit in the millivolt range. The ESP32 radio is a noisy neighbor. Electrode cables, a shared I2C bus, and an analog divider all compete for the same ground. A compact 2-layer PCB with local decoupling and short analog runs is what turns the sketch into a station that can be demonstrated without holding the cables still.

Sensor Split That Keeps the Optical Path Off the Cardiac Amp

Four paths feed one ESP32 DevKit v1.

ESP32 DevKit v1

ECG stays analog: the AD8232 into ADS1115 AIN0, then firmware finds R-peaks and draws a PQRST-style trace. SpO₂ stays digital on the MAX30102 at 0x57 so the LEDs never fight the cardiac amp. Body temperature is a 10K/10K NTC divider into AIN1. Room air stays on the BME280 at 0x76, so a warm lab is not mistaken for a fever.

Figure: ESP32 Health Monitor Hardware Set

Red on the right arm, yellow on the left, green as driven right-leg. LO+ and LO− on GPIO 18 and 19 stop invented heartbeats: a flat cyan line and a "LEADS OFF" banner. SDN on GPIO 5 enables the front-end. The NTC path uses Beta 3950 and GAIN_ONE; skin readings sit around 35–37 °C. The ADS1115 resolves the ECG swing and the thermistor without sharing Wi-Fi jitter.

Electrode placement

 The firmware prints an IP at 115200 baud and hosts the page. The browser shows vitals cards, alerts, patient records, interval logging, and Excel export. ECG samples land near 125 Hz; slower sensors update every two seconds. None of that personality survives dangling DuPont wires. The EasyEDA schematic already assumed copper: 10 µF bulk, 100 nF on the rails, a short ECG_OUT run, female headers, terminal blocks. The creator ordered that board, soldered it, and the bench experiment started looking like a device.

Medmonitor browser

FR-4 Choices That Match a 125 Hz Educational Trace

This layout is not an HDI wearable and does not need to pretend otherwise. A 125 Hz teaching ECG does not require controlled impedance. It requires drill that lands in the pad, mask that does not flood a header, and copper that stays off the router.

Parameter

Choice on this project

Layers / material

2-layer standard FR-4

Thickness / copper

1.6 mm class, 1 oz both sides

Finish

Lead-free HASL for first articles

Layout style

Through-hole + female headers

Front-side priority

ESP32, ADS1115, connectors, decoupling

Analog / I2C

ECG_OUT → AIN0; NTC → AIN1; 0x48 / 0x57 / 0x76

Local power

10 µF bulk + 100 nF at each IC pin

Analog traces stay short. Ceramics sit on the pins, not somewhere on the 3.3 V net. Silkscreen stays off pads. Those three rules prevent more failed first articles than a prettier 3D render.

ESP32 Patient Health Monitor on a 2-Layer PCB

Breadboard Hum, Lead-Off Gaps and Outline Copper

ECG next to a Wi-Fi radio is a known headache. On a breadboard the electrode cable, USB ground, and ESP32 bursts all couple into AIN0. Moving conversion onto the ADS1115 is the right instinct. Three I2C devices behave if addresses stay unique and pull-ups exist once. A missing ACK at 0x57 looks like a dead oximeter when the BME280 ADDR pin is simply wrong. Headers add inductance, which is why the 100 nF parts must sit at the module. Without LO+ and LO− in firmware, a dangling electrode becomes fake tachycardia. The video’s flat-line behavior is software DFM done correctly.

The board then raises factory questions. The layout is compact, through-hole heavy, and parks connectors near the outline—the same pattern that fills the EQ queue on 2-layer FR-4 PCB. CAM routinely holds files when via tenting on the quote disagrees with the mask layer, when reference designators sit on solderable pads, when copper pours to the routed edge, and when header holes never declare PTH or NPTH. Those are not exotic HDI problems. They decide whether a first article solders.

Via tenting vs open via on 2 Layer FR4 PCB

A recent 2-layer PCB CAM review made the mechanical risk obvious. Pad-to-pad spacing sat at 4 mil where 7–8 mil would have given a reliable solder-mask bridge.

pad-to-pad spacing

Several 3.1 mm PTH holes had no mask opening.

3.1 mm PTH holes had no solder mask openings on top and bottom layers

Pads sat on the outline of a customer-built V-cut panel, and the V-cut lines were duplicated. After routing that is exposed copper and a ground the ECG firmware should not trust.

duplicate V-CUT lines

Three-Day Fabrication That Made the Waveform Believable

The Gerbers left EasyEDA, landed at AIVON, and boards came back in three days—clean mask, honest holes, a double-sided panel that matched the 3D view. Analog confidence is visual. A ragged soldermask or an offset header hole sends a designer hunting the AD8232 for noise that started in the fab.

PCB 2-layer PCB 3D view

What the PCB enabled matters more than what it "fixed." ECG_OUT no longer hops three jumper colors. The NTC divider lives on copper. Each rail has a ceramic where the current loop is small, so a 125 Hz trace can sit next to an ESP32 radio and still look like a heart. Headers let the creator finish assembly in an evening and still swap a module. Once the waveform was stable, the clinical UI stopped being theater.

AIVON custom 2-layer PCB for ESP32 Patient Health Monitor

Six layers were never the requirement. The requirement was 2-layer FR-4 that holds drill, mask, and outline. That is the same review double-sided files receive on the floor: align via covering with the Gerber mask, pull silkscreen off pads, keep copper 0.2 mm from a routed edge and about 0.4 mm from a V-cut, and open every PTH header. On that tight-spacing panel the fix was unglamorous—spread pads to 7–8 mil, pull features 0.3–0.5 mm off the outline, open the large holes, delete the extra V-cut. After that the order released. Manufacture the boring details tightly enough and firmware can trust the numbers.

DFM checklist for ESP32 + AD8232 + ADS1115 monitors

Check

Why it shows up here

Pass look

100 nF within 2–3 mm of each 3.3 V pin

ECG supply rejection

Cap pad kisses the module pin

Analog ECG net short, away from GPIO 21/22

I2C edges modulate the baseline

No digital run parallel to ECG_OUT

LO+ / LO− routed and used in firmware

Stops fake BPM

Flat trace plus warning on lead-off

Copper and pads ≥0.2 mm from routed outline (≥0.4 mm if V-cut)

Edge connectors on 2-layer FR-4

No 3.3 V pour on the router path

Pad-to-pad spacing ≥7–8 mil where mask must bridge

Fine gaps crack mask

Bridge stays intact after develop

Silkscreen clear of pads; quote tenting matches mask

Solderability and CAM holds

Ref des sits beside the pad

PTH vs NPTH named; mask openings on large headers

Wetting and clear barrels

Drill chart matches the pads

The lead-off row is the one worth stealing first. A pretty dashboard that lies is worse than no dashboard.

A Teaching Instrument, Not a Clinical Claim

The build holds together because How To Electronics treated the PCB as part of the instrument, not as a way to hide wires. The ESP32 still does the clever work—web server, R-peak math, SpO₂, patient log—but the board is what lets a live ECG sit next to a Wi-Fi radio without falling apart. Short AD8232 runs, ceramics on the pins, and a 2-layer file that CAM will not have to argue with are the habits that make the IP address worth opening.

The design remains a learning platform, not a certified diagnostic device. The useful takeaway is the analog and DFM discipline, ready for the next prototype that actually has to leave the bench.

 

FAQ

Q1: Is a 2-layer PCB enough for AD8232 ECG plus ESP32 Wi-Fi?

A1: Yes for an educational single-lead monitor if analog runs stay short and each rail has local 100 nF. Four-layer construction helps when lower noise or denser routing is required.

Q2: Why add an ADS1115 instead of the ESP32 ADC?

A2: The ESP32 SAR ADC is noisy. A 16-bit I2C converter keeps ECG and NTC off the Wi-Fi jitter.

Q3: HASL or ENIG for a first sensor prototype?

A3: Lead-free HASL is fine for through-hole headers. ENIG fits fine-pitch SMT or repeated probe mating.

Q4: How close can copper sit to the board outline on 2-layer FR-4?

A4: Pads should stay at least 0.2 mm from a routed edge and about 0.4 mm from a V-cut. Connectors at the perimeter are safer at 0.3–0.5 mm.

Q5: What I2C mistakes hit this parts list?

A5: BME280 at 0x76 versus 0x77, missing pull-ups, and 0x57 disappearing on a stuck bus. A bus scan belongs ahead of SpO2 debugging.

Q6: Can this be treated as a medical device?

A6: No. Clinical monitors need isolation, IEC 60601 thinking, and a quality system. This board is for learning those habits.

Daniel Li | PCB Assembly & Electronics Application Engineer Daniel Li | PCB Assembly & Electronics Application Engineer

Daniel Li is an experienced PCB assembly and application engineer with over 10 years of experience in SMT and DIP processes. He focuses on soldering quality, stencil design, and defect analysis, as well as real-world PCB applications across industries such as automotive, industrial, and consumer electronics. At AIVON, he reviews and improves content related to assembly techniques and application scenarios, helping bridge the gap between design and manufacturing.

Related Tags


2026 AIVON.COM All Rights Reserved
Intellectual Property Rights | Terms of Service | Privacy Policy | Refund Policy