Skip to the content
PCBKitNew board
2 layers61 × 33.1 mmEc stingy, the printed circuit board in 3D

A cheap, compact electrocardiogram

Size
61 × 33.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
57
Nets
95
Pads
229
Tracks, vias
469, 56
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
3 Jul 2022
Updated
8 Aug 2023

Overview

Ec stingy is an open-source printed circuit board by stevefarra, from the stevefarra/ec-stingy repository on GitHub, published under the MIT licence. It is a 2-layer board of 61 × 33.1 mm with 57 parts on 95 nets, routed with 469 tracks and 56 vias.

It is built around the STM32F334R8T6, CP2102N-A02-GQFN20R and PCM12SMTR. Its parts include 22 capacitors, 18 resistors, 4 connectors, 3 ICs and 2 diodes. It belongs with the STM32 boards of this library.

Main components

3

README

pcb/README.md

PCB Design

3D PCB

Directory overview

This directory includes several files with project metadata, but the key files are:

pcb.kicad_pro: KiCad 6 project file. Use this to properly load and open the schematic and layout files.

pcb.kicad_sch: The schematic file.

pcb.kicad_pcb: The layout file.

libraries/: Contains symbols, footprints, and 3D models for components used in the project that are included in the KiCad library.

manufacturing/: Contains a bill of materials, a component placement file, and gerber files required to get the board produced.

V for Via: Establishing a workflow

We heavily based the overall design and microcontroller layout on the KiCad 6 STM32 tutorial, with several notable additions:

  • The AD8232 and all of its associated circuitry (a near replica of the SPICE model in this project)
  • The CP2102N USB-to-UART bridge controller, which acts as both a voltage regulator and PC interface in this design

We also added several peripherals to facilitate use and debugging:

  • A micro-USB port, to power the board
  • A 3.5 mm jack, to plug the electrode cable into
  • A boot switch, to reset the microcontroller
  • A serial wire debug pin header, to modify the firmware
  • An ECG signal pin header, to inspect the analog signal
  • LEDs to indicate a power connection and heartbeat readings, respectively

The schematic ends up falling roughly into 5 sections:

PCB Schematic

Before approaching the layout, we first consult PCB layout guidelines provided by the various ICs used. From the AD8232 datasheet:

Keep all of the connections between high impedance nodes as short as possible to avoid introducing additional noise and errors from corrupting the signal. To maintain high CMRR over frequency, keep the input traces symmetrical and length matched. Place safety and input bias resistors in the same position relative to each input. In addition, the use of a ground plane significantly improves the noise rejection of the system.

And from the STM32 datasheet:

Each power-supply pair (VDD/VSS, VDDA/VSSA etc..) must be decoupled with filtering ceramic capacitors as shown above. These capacitors must be placed as close as possible to or below the appropriate pins on the underside of the PCB, to ensure the good functionality of the device. The 10 nF capacitor must be ceramic (good quality) and it must be placed as close as possible to the chip.

With these principles in mind, a heavy draw of inspiration from the layout of the SparkFun AD8232 breakout, and a modest amount of trial-and-error, the resultant two-layer board layout came out like so:

PCB Layout

How cost-effective is it, really?

Time and effort were put into ensuring that the components chosen were economical and readily available to reduce the manufacturing cost as much as possible. Below is a breakdown of the per-board manufacturing costs at the time of writing this, ordering from JLCPCB (minimum quantity of 5):

CategoryCost (CAD)
Passives$0.50
Connectors$1.13
ICs$6.86
Assembly$3.07

Although it's difficult to directly compare this device to commercially-available products, the closest would be a Holter monitor like the Prince 180B1 from Heal Force which currently retails at $140 CAD. The total cost of our board comes to $11.56 CAD, which is roughly 9% of the market equivalent. Not bad!

The cutting room floor

Commission a board review: Despite passing KiCad's electrical and design rule checks, a third-party formal review could validate the schematic and layout. This review would also ensure adherence to best practices on differential trace length matching, passive component sizing, and decoupling capacitor layout, helping to prevent potential costly or time-consuming errors before manufacturing.

Add more safeguards: This device is far from being fully IEC 60601-compliant, but replacing the PC power supply with an external battery, adding TVS diodes to sensitive traces for ESD protection, and using an optocoupler to provide electrical isolation between the patient and the ECG would all increase the device's overall safety.

Compactify the layout: The board size comes in at roughly 61 mm by 33 mm, but there is still quite a bit of unused space which could be used for more peripherals or done away with altogether by rearranging components.

Design an enclosure: A hard casing with cutouts for peripheral access and LED viewing could enhance this project. The board already has mounting holes for fastening. KiCad's StepUp tool allows the 3D model above to be easily imported into FreeCAD and would come in handy here.

Parts

57
QtyValueFootprintReferences
9100nCapacitor_SMD:C_0402_1005MetricC8, C9, C10, C11, C12, C13, C14, C20, C21
410MegResistor_SMD:R_0603_1608MetricR1, R3, R10, R11
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
31kResistor_SMD:R_0402_1005MetricR16, R17, R18
210nCapacitor_SMD:C_0402_1005MetricC3, C16
210pCapacitor_SMD:C_0402_1005MetricC2, C5
2180kResistor_SMD:R_0402_1005MetricR5, R6
21uCapacitor_SMD:C_0603_1608MetricC17, C18
2287kResistor_SMD:R_0603_1608MetricR2, R4
23300pCapacitor_SMD:C_0402_1005MetricC6, C15
24.7uCapacitor_SMD:C_0603_1608MetricC19, C22
29.09MegResistor_SMD:R_0603_1608MetricR13, R14
2LEDLED_SMD:LED_0603_1608MetricD1, D2
11.27MegResistor_SMD:R_0603_1608MetricR15
11.5nCapacitor_SMD:C_0402_1005MetricC1
1100kResistor_SMD:R_0402_1005MetricR8
1105133-0011105133-0011:MOLEX_105133-0011J4
110kResistor_SMD:R_0402_1005MetricR12
110uCapacitor_SMD:C_0603_1608MetricC7
1120RInductor_SMD:L_0603_1608MetricFB1
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
11MegResistor_SMD:R_0603_1608MetricR9
11nCapacitor_SMD:C_0402_1005MetricC4
1360kResistor_SMD:R_0603_1608MetricR7
1AD8232AD8232:LFCSP_20U1
1CP2102N-A02-GQFN20RCP2102N-A02-GQFN20R:SILABS_CP2102N-A02-GQFN20RU3
1Conn_01x02_MaleConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1Conn_01x04_MaleConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1LOGOLOGOG***
1PCM12SMTRPCM12SMTR:SW_PCM12SMTRSW1
1PJ-320D-APJ-320D-A:HRO_PJ-320D-AJ1
1STM32F334R8T6Package_QFP:LQFP-64_10x10mm_P0.5mmU2

Questions

How big is the Ec stingy PCB?

It measures 61 × 33.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ec stingy use?

57 parts, built around the STM32F334R8T6, CP2102N-A02-GQFN20R and PCM12SMTR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Ec stingy KiCad files?

From the stevefarra/ec-stingy repository on GitHub, at the commit this page was made from: the board is pcb/pcb.kicad_pcb and its schematic pcb/pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ec stingy design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers178 × 711 mmMSAP-2 rev.A SMD, the printed circuit board in 3D

    MSAP-2 rev.A SMD

    mehrantsi/MSAP-2

    An 8-bit computer. Successor to MSAP-1

    658 parts13MIT
  • 2 layers90 × 80 mmTestingPCB, the printed circuit board in 3D

    TestingPCB

    leslier7/thesis

    My Undergraduate Honors Thesis Code

    19 parts1
  • 2 layers135.3 × 78.4 mmMseq, the printed circuit board in 3D

    Mseq

    MF-Room/mseq_pcb

    KiCad 10 hardware design for MSeq embedded, the microcontroller implementation of the MSeq MIDI sequencer.

    93 parts1CERN-OHL-S-2.0
  • 4 layers69.5 × 62.6 mmPower Module, the printed circuit board in 3D

    Power Module

    Queens-Rocket-Engineering-Team/av-power

    QRET Avionics PCBs and firmware for delivering power to SRAD PCBs

    136 parts1
  • 4 layers90 × 54.7 mm1st ESP32 Demo project, the printed circuit board in 3D

    1st ESP32 Demo project

    ashfaque-ur-rahman/ESP32-Multi-Sensor-PCB

    ESP32-based multi-sensor PCB with temperature/humidity, light, and microphone sensors — 4 layer Board — KiCad design based on Tech Explorations tutorial

    87 parts
  • 4 layers89.3 × 63 mmESP32 ON BOARD SENSOR, the printed circuit board in 3D

    ESP32 ON BOARD SENSOR

    krishnaverma24/ESP32-4Layer-PCB-Design

    This project is a custom-designed PCB integrating the ESP32 microcontroller with multiple sensors on a single board. The goal was to create a compact, versatile hardware platform for IoT and embedded system experiments.

    87 partsMIT
  • 2 layers112.7 × 114.2 mmChunk pannel, the printed circuit board in 3D

    Chunk pannel

    paul-jo-dreyer/Atom

    Micro swarm robots

    108 parts