---
title: "Cardia: An ECG Web Monitor with Arduino and W5100 Ethernet"
url: "https://maker.wiznet.io/Lihan__/projects/cardia-an-ecg-web-monitor-with-arduino-and-w5100-ethernet/"
markdown_url: "https://maker.wiznet.io/Lihan__/projects/cardia-an-ecg-web-monitor-with-arduino-and-w5100-ethernet/md"
type: "UCC: User Created Content"
author: "Nisa Maaşoğlu"
author_url: "https://github.com/nisamaasoglu/Cardia"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Nisa Maaşoğlu"
original_url: "https://github.com/nisamaasoglu/Cardia"
license: "MIT license (MIT)"
published: "2026-10-25"
updated: "2026-10-27"
language: "en"
tags: ["W5100", "Arduino", "Ethernet", "ECG", "AD8232"]
hardware: ["Arduino Ethernet Shield W5100", "Arduino Uno R3", "ECG Module (AD8232 i.e. Electro-Cardiogram)"]
likes: 0
views: 87
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Cardia: An ECG Web Monitor with Arduino and W5100 Ethernet

> An open-source AD8232 ECG monitor using Arduino and W5100 Ethernet to deliver heart rate and waveform data to a web dashboard.

Original author: Nisa Maaşoğlu (source: https://github.com/nisamaasoglu/Cardia)

## Components

- **Arduino Ethernet Shield W5100** x 1: WIZnet W5100-based Ethernet Shield; README and firmware identify W5100.
- **Arduino Uno R3** x 1: Arduino Uno or compatible, as listed in the source README.
- **ECG Module (AD8232 i.e. Electro-Cardiogram)** x 1: AD8232 single-lead ECG breakout; exact board manufacturer is not specified in the README.

## Documents and links

- [Cardia source code](https://github.com/nisamaasoglu/Cardia) (code): Original Arduino firmware and web dashboard by Nisa Maaşoğlu. MIT license.
- [README and hardware documentation](https://github.com/nisamaasoglu/Cardia/blob/main/README.md): Hardware list, operating modes and setup instructions. Dashboard screenshot is demo mode.

## Article

## Cardia — A W5100 Ethernet ECG Web Monitor

**Open-source project curation | Original work by Nisa Maaşoğlu**

The illustrative artwork is AI-generated. The dashboard image is an original DEMO screenshot; the system diagram is a simplified explanation based on the source.

### English

#### 01 — Project Overview

Cardia connects an AD8232 ECG front end and an Arduino Uno to a browser dashboard through wired Ethernet. Its appeal is the complete signal path: the microcontroller acquires an analog signal, detects R-peaks, estimates heart rate, and exposes the results as JSON for a lightweight web interface.

**Sampling at a glance:** The firmware targets 500 Hz ECG acquisition (one reading every 2 ms), keeps every fourth sample for a 125 Hz waveform, and the browser requests the latest 96 waveform points every 250 ms (4 updates per second). These are configured targets, not measured timing guarantees.

![Cardia conceptual data flow from AD8232 to Arduino Uno, W5100 and web dashboard](https://maker.wiznet.io/upload/ckeditor5/098514e918484b92a79633d065193f97.jpg)

*Data flow: AD8232 → Arduino Uno → W5100 Ethernet → browser. AI-generated architecture illustration; shown rates are configured targets, not measured throughput.*

#### 02 — What the System Provides

- Single-lead analog ECG acquisition through an AD8232 and Arduino Uno.

- R-peak detection, heart-rate estimation and a short waveform buffer.

- An HTTP/JSON server connected to the LAN through a W5100 Ethernet Shield.

- A browser dashboard with device polling and a synthetic demo mode.

Project documentation: [README — hardware, architecture and demo mode](https://github.com/nisamaasoglu/Cardia/blob/main/README.md).

#### 03 — System Architecture

The AD8232 provides an analog ECG signal to Arduino A0. The Arduino samples the signal, detects R-peaks, calculates BPM and maintains a short waveform buffer; its firmware also builds the HTTP/JSON response. The W5100 Shield connects this server to the LAN over SPI and Ethernet. A browser polls the device every 250 ms and draws the returned waveform. Demo mode replaces the hardware data with a synthetic source.

![Cardia system architecture: AD8232 analog input, Arduino signal processing and HTTP server, W5100 Ethernet, browser polling](https://maker.wiznet.io/upload/ckeditor5/2589a7c45c634d8d9bf9cb0f9f73e86d.jpg)

*Simplified architecture based on the firmware and dashboard source. The HTTP application runs on Arduino; W5100 provides the TCP/IP and Ethernet path. Sampling rates shown are configured targets.*

**Signal path:** AD8232 → Arduino signal processing and HTTP server → W5100 Ethernet → browser. HTTP requests travel back from the browser to the device.

#### 04 — How W5100 Is Used — and Whether TOE Is Used

The README hardware list and firmware comments explicitly identify a W5100 Ethernet Shield. The sketch includes SPI.h and Ethernet.h, initializes the network with Ethernet.begin(mac, ip), creates an EthernetServer on port 80, accepts clients, and writes HTTP/JSON responses through EthernetClient. This provides implementation evidence beyond a component mention. This article is based on public documentation and source review; it does not report an independent hardware test or physical chip identification.

**Hardware TCP/IP offload: yes.** The sketch uses the Ethernet library’s server/client socket interface for the W5100 path. Arduino runs the signal-processing and HTTP application; W5100 supplies the TCP/IP and Ethernet transport.

Implementation: [Arduino sketch — network initialization, EthernetServer and EthernetClient](https://github.com/nisamaasoglu/Cardia/blob/main/firmware/cardia_ecg/cardia_ecg.ino).

#### 05 — Dashboard: Measured Values and Simulated Values

With hardware connected, heart rate and related signal metrics come from the ECG path. Blood pressure, oxygen saturation, and the cardiovascular index are generated UI placeholders, explicitly grouped as Simulated. Demo mode also synthesizes the ECG waveform and labels the interface accordingly. A dashboard screenshot alone therefore does not prove successful live acquisition.

With leads-off detection disabled, the quality field is an amplitude-based heuristic (at least 60 ADC counts). It should not be interpreted as verified electrode contact or clinical signal quality.

![Original Cardia dashboard screenshot in DEMO mode with no board connected](https://raw.githubusercontent.com/nisamaasoglu/Cardia/main/docs/dashboard.png)

*Original dashboard in DEMO mode: the ECG and heart-rate values here are synthetic, with no board connected. Blood pressure, oxygen and cardiovascular index are also simulated placeholders. This image demonstrates the interface, not a live measurement.*

[Screenshot source: Nisa Maaşoğlu / Cardia — docs/dashboard.png](https://github.com/nisamaasoglu/Cardia/blob/main/docs/dashboard.png)

Rendering and simulated fields: [web/app.js](https://github.com/nisamaasoglu/Cardia/blob/main/web/app.js).

#### 06 — Hardware and Software Roles

The firmware reads the AD8232 output on A0 at a scheduled target interval of 2 ms. An adaptive signal envelope sets the R-peak threshold, with hysteresis, a 250 ms refractory period, interval filtering, and averaging over up to five recent R–R intervals. Every fourth sample enters a 96-value waveform buffer.

The Ethernet endpoint returns signal samples and derived metrics, including BPM, beat interval, amplitude, a signal-quality flag, and a beat counter. In device mode, the browser requests updates every 250 ms and draws the waveform on Canvas. The 500 Hz acquisition target, 125 Hz decimated waveform spacing, and 4 Hz HTTP polling describe separate parts of the design, rather than measured performance guarantees.

#### 07 — Reproducibility and Verification Limits

Read firmware/cardia_ecg/cardia_ecg.ino for acquisition and the HTTP server, and web/app.js for polling, rendering, and demo generation. The repository describes configuring a free LAN address, flashing the sketch, serving the web folder locally, and connecting the dashboard to the device. Leads-off detection is disabled by USE_LEADS_OFF=0. Its optional LO+→D10 and LO−→D11 assignments conflict with the usual Uno W5100 Shield roles of D10 (chip select) and D11 (MOSI). Enabling this feature requires different available pins, matching code changes, and verification.

- This review checks public documents and code; it does not independently reproduce hardware measurements.

- 500 Hz acquisition, 125 Hz waveform spacing and 4 Hz polling are configured design targets, not measured timing guarantees.

- The amplitude-based quality flag does not establish electrode contact or clinical signal quality.

Pin reference: [W5100 Shield — D10 chip select and D11 MOSI](https://wiki.seeedstudio.com/Ethernet_Shield_V1.0/).

#### 08 — Why This Is an Interesting WIZnet Use Case

Cardia is a useful study in moving sensor data from an MCU to a web interface through W5100 Ethernet. It is presented as a hobby and learning project, not a clinical diagnostic instrument.

The repository makes the complete sensor-to-browser path visible: analog acquisition, MCU processing, Ethernet transport and web presentation can be studied together.

#### Q&A

**Does the dashboard screenshot show live ECG?**
No. The included original screenshot is in DEMO mode with synthetic ECG and heart-rate values.

**Does AD8232 measure oxygen saturation or blood pressure here?**
No. These fields are simulated browser values.

**Can the optional leads-off pins be enabled unchanged?**
They must be checked and reassigned because D10 and D11 conflict with the usual Uno W5100 Shield connections.

---

## Cardia — W5100 Ethernet 기반 ECG 웹 모니터

**오픈소스 프로젝트 큐레이션 | 원작: Nisa Maaşoğlu**

설명용 일러스트는 AI로 제작했습니다. 대시보드는 원본 DEMO 화면이며, 시스템 구성도는 소스의 동작을 단순화해 표현했습니다.

### 한국어

#### 01 — 프로젝트 개요

Cardia는 AD8232 센서와 Arduino Uno로 읽은 단일 리드 ECG 신호를 유선 네트워크의 웹 대시보드로 전달하는 프로젝트입니다. 센서 값을 그대로 보여주는 데 그치지 않고, Arduino에서 R 피크를 검출하고 심박수를 계산한 뒤 Ethernet을 통해 JSON으로 제공합니다. 작은 마이크로컨트롤러의 신호 처리와 브라우저 시각화를 연결한다는 점이 흥미롭습니다.

**샘플링 주기 요약:** ECG는 2 ms 간격의 500 Hz를 목표로 읽고, 4개 중 1개를 저장해 화면용 파형을 125 Hz로 구성합니다. 브라우저는 250 ms마다 최신 파형 96개 점을 받아 화면을 갱신합니다(초당 4회). 각 주기는 설정상 목표이며 실측 주기를 보장하지 않습니다.

![AD8232에서 Arduino Uno와 W5100을 거쳐 웹으로 전달되는 Cardia 구성도](https://maker.wiznet.io/upload/ckeditor5/098514e918484b92a79633d065193f97.jpg)

*데이터 흐름: AD8232 → Arduino Uno → W5100 Ethernet → 웹 브라우저. AI로 만든 개념도이며, 표시된 주기는 설정상 목표값이지 실측 처리량이 아닙니다.*

#### 02 — 주요 기능

- AD8232와 Arduino Uno를 이용한 단일 리드 아날로그 ECG 획득을 구현합니다.

- R 피크 검출, 심박수 계산과 짧은 파형 버퍼를 제공합니다.

- W5100 Ethernet Shield를 통해 HTTP·JSON 서버를 LAN에 연결합니다.

- 브라우저에서 장치 데이터와 합성 Demo 모드를 확인할 수 있습니다.

프로젝트 안내: [README — 하드웨어, 구조와 Demo 모드](https://github.com/nisamaasoglu/Cardia/blob/main/README.md)에서 확인할 수 있습니다.

#### 03 — 시스템 아키텍처

AD8232가 아날로그 ECG 신호를 Arduino의 A0 핀으로 전달합니다. Arduino는 신호 샘플링, R 피크 검출, BPM 계산과 짧은 파형 버퍼 관리를 수행하고 HTTP·JSON 응답도 구성합니다. W5100 Shield는 SPI와 Ethernet으로 이 서버를 LAN에 연결합니다. 브라우저는 250 ms마다 데이터를 요청해 파형을 그리며, Demo 모드에서는 하드웨어 데이터 대신 합성 신호를 사용합니다.

![AD8232 센서, Arduino 신호 처리와 HTTP 서버, W5100 Ethernet 및 브라우저 폴링을 나타낸 Cardia 시스템 아키텍처](https://maker.wiznet.io/upload/ckeditor5/2589a7c45c634d8d9bf9cb0f9f73e86d.jpg)

*펌웨어와 대시보드 코드를 바탕으로 단순화한 구성도입니다. HTTP 애플리케이션은 Arduino에서 실행되고 W5100은 TCP/IP·Ethernet 경로를 제공합니다. 표시된 샘플링 주기는 설정상 목표값입니다.*

**신호 경로:** AD8232 → Arduino 신호 처리·HTTP 서버 → W5100 Ethernet → 브라우저 순서입니다. HTTP 요청은 브라우저에서 장치 방향으로 전달됩니다.

#### 04 — W5100 활용 방식과 TOE 사용 여부

원본 README의 Hardware 항목과 펌웨어 주석에 W5100 Ethernet Shield가 명시돼 있습니다. 펌웨어는 SPI.h와 Ethernet.h를 포함하고 Ethernet.begin(mac, ip), EthernetServer server(80), server.available()를 사용합니다. 실제 HTTP 응답을 EthernetClient에 기록하는 코드까지 확인할 수 있어, 단순히 부품 이름만 언급한 저장소보다 구현 근거가 구체적입니다. 다만 이 큐레이션은 공개 문서와 소스 검토에 기반하며, 실물 보드를 직접 시험하거나 W5100 칩을 독립적으로 식별한 결과는 아닙니다.

**하드웨어 TCP/IP 오프로딩을 사용합니다.** 펌웨어는 Ethernet 라이브러리의 서버·클라이언트 소켓 인터페이스를 이용합니다. Arduino는 신호 처리와 HTTP 애플리케이션을 실행하고, W5100은 TCP/IP와 Ethernet 전송을 담당합니다.

구현 근거: [Arduino 스케치 — 네트워크 초기화와 EthernetServer·EthernetClient](https://github.com/nisamaasoglu/Cardia/blob/main/firmware/cardia_ecg/cardia_ecg.ino)에서 확인할 수 있습니다.

#### 05 — 대시보드의 측정값과 시뮬레이션 값

장치 연결 시 ECG에서 얻는 심박수와 R–R 간격 등을 표시합니다. 혈압, 산소포화도, 심혈관 지수는 AD8232 측정값이 아니라 브라우저에서 생성한 시뮬레이션 값입니다. 저장소는 이를 별도 Simulated 영역으로 구분합니다. 보드 없이 확인하는 Demo 모드는 ECG 자체도 합성 데이터이므로, 대시보드 화면만으로 실측 성공을 판단해서는 안 됩니다.

quality 필드는 기본 설정에서 신호 진폭이 60 ADC 카운트 이상인지로 판단하는 간단한 휴리스틱입니다. 전극 접촉 상태나 임상적 신호 품질을 검증하는 지표로 해석하면 안 됩니다.

![보드 없이 DEMO 모드로 실행한 Cardia 원본 대시보드 화면](https://raw.githubusercontent.com/nisamaasoglu/Cardia/main/docs/dashboard.png)

*원본 대시보드의 DEMO 화면입니다. 보드가 연결되지 않아 이 화면의 ECG와 심박수는 합성 데이터입니다. 혈압·산소포화도·심혈관 지수도 시뮬레이션 표시이며 실측 성공의 증거가 아닙니다.*

[화면 출처: Nisa Maaşoğlu / Cardia — docs/dashboard.png](https://github.com/nisamaasoglu/Cardia/blob/main/docs/dashboard.png)

화면 처리와 시뮬레이션 필드: [web/app.js](https://github.com/nisamaasoglu/Cardia/blob/main/web/app.js)에서 확인할 수 있습니다.

#### 06 — 하드웨어와 소프트웨어의 역할

AD8232의 아날로그 출력을 Arduino A0에서 읽습니다. 펌웨어는 2 ms 간격, 즉 목표 500 Hz로 샘플링하며, 변화하는 최소·최대 신호 범위에 맞춰 검출 임계값을 조정합니다. 히스테리시스, 250 ms 불응 구간, R–R 간격 필터를 함께 적용하고 최근 최대 다섯 간격으로 BPM을 평균화합니다.

W5100 기반 Ethernet Shield를 거쳐 HTTP 포트 80에서 raw, bpm, ibi, amplitude, quality, beats, uptime, wave 필드를 JSON으로 제공합니다. 파형 버퍼는 네 샘플마다 하나를 보관하는 96개 표본 구조입니다. 브라우저는 장치 모드에서 250 ms마다 데이터를 요청하고 Canvas로 파형을 그립니다. 샘플링 목표 500 Hz, 파형 표본 간격 125 Hz, HTTP 폴링 4 Hz는 서로 다른 주기이며 실측 처리량 보장을 의미하지 않습니다.

#### 07 — 재현 흐름과 검증 범위

firmware/cardia_ecg/cardia_ecg.ino에서 신호 처리와 HTTP 서버를, web/app.js에서 장치 폴링과 데모 생성을 확인할 수 있습니다. 원본 안내는 LAN 내 사용 가능한 고정 IP 설정, 펌웨어 업로드, web 폴더의 로컬 웹 서버 실행, 장치 주소 입력 순서로 구성돼 있습니다. 전극 이탈 검출은 USE_LEADS_OFF=0으로 꺼져 있습니다. 선택적 LO+→D10, LO−→D11 배선은 일반적인 Uno용 W5100 Shield의 D10(칩 선택)·D11(MOSI)과 충돌하므로 그대로 활성화하면 안 됩니다. 다른 핀으로 재배치하고 코드를 함께 수정한 뒤 검증해야 합니다.

- 공개 문서와 코드를 검토했으며, 하드웨어 측정 시험을 직접 재현한 결과는 아닙니다.

- 샘플링 500 Hz, 파형 표본 간격 125 Hz, 폴링 4 Hz는 설정상 목표이며 실측 주기 보장은 아닙니다.

- 진폭에 기반한 quality 값은 전극 접촉이나 임상적 신호 품질을 검증하지 않습니다.

핀 참고 자료: [W5100 Shield의 D10 칩 선택과 D11 MOSI](https://wiki.seeedstudio.com/Ethernet_Shield_V1.0/)에서 확인할 수 있습니다.

#### 08 — WIZnet 활용 사례로서의 가치

**큐레이터 관점:** 센서 데이터 획득 → MCU 분석 → W5100 유선 통신 → 웹 표현이라는 흐름을 한 저장소에서 따라갈 수 있습니다. 교육용 신호 처리와 Ethernet 기반 계측 UI를 공부하기 좋은 사례입니다. 저장소가 밝히듯 취미·학습용 프로젝트이며 임상 진단용 의료기기가 아닙니다.

#### Q&A

**원본 대시보드는 실시간 ECG 측정 화면인가요?**
아닙니다. 포함된 원본 이미지는 합성 ECG와 심박수를 표시하는 DEMO 화면입니다.

**AD8232로 산소포화도와 혈압도 측정하나요?**
이 구현의 해당 필드는 브라우저가 생성하는 시뮬레이션 값입니다.

**선택적 전극 이탈 검출을 그대로 켜도 되나요?**
D10·D11이 일반적인 Uno용 W5100 Shield 연결과 충돌하므로 핀 재배치와 코드 수정 후 검증해야 합니다.

#### Sources / 출처

[Original repository — nisamaasoglu/Cardia](https://github.com/nisamaasoglu/Cardia)

[README: hardware, architecture and demo scope](https://github.com/nisamaasoglu/Cardia/blob/main/README.md)

[Arduino firmware: Ethernet server and signal processing](https://github.com/nisamaasoglu/Cardia/blob/main/firmware/cardia_ecg/cardia_ecg.ino)

[Dashboard source: polling and simulated values](https://github.com/nisamaasoglu/Cardia/blob/main/web/app.js)

[MIT license — Copyright (c) 2026 Hayrunnisa Maaşoğlu](https://github.com/nisamaasoglu/Cardia/blob/main/LICENSE)

[W5100 Shield pin reference: D10 chip select and D11 MOSI](https://wiki.seeedstudio.com/Ethernet_Shield_V1.0/)

Reviewed on 2026-10-25. Original project credit remains with its author. Cover artwork is an AI-generated architecture illustration, not a photograph or a live measurement screenshot.

---

Source: https://maker.wiznet.io/Lihan__/projects/cardia-an-ecg-web-monitor-with-arduino-and-w5100-ethernet/
