Skip to the content
PCBKitNew board
2 layers78.8 × 71.9 mmEE496, the printed circuit board in 3D

Chest compressions are hard to gauge mid-panic. This device measures force, rate, and posture in real time so you don't have to guess.

Size
78.8 × 71.9 mm
Copper layers
2
Thickness
1.6 mm
Parts
68
Nets
66
Pads
310
Tracks, vias
236, 111
Pours
11
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
8 May 2026
Updated
30 Sep 2026

Overview

EE496 is an open-source printed circuit board by Will946, from the Will946/CPRPal repository on GitHub, published under the MIT licence. It is a 2-layer board of 78.8 × 71.9 mm with 68 parts on 66 nets, routed with 236 tracks and 111 vias.

It is built around the SN74AHCT125N and TPS63070RNM. Its parts include 14 connectors, 11 capacitors, 9 resistors, 3 ICs and 1 diode. It belongs with the sensors and measurement boards and the ESP32 and AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

CPRPal — Real-Time CPR Feedback and Training Device


Table of Contents


Project Overview

CPRPal is a portable, puck-shaped CPR coaching device designed to help untrained bystanders and CPR trainees perform chest compressions with correct force, rhythm, and body positioning during a cardiac emergency or training session.

Sudden cardiac arrest is responsible for approximately 93% of out-of-hospital cardiac arrest deaths. Survival probability drops roughly 10% per minute without CPR or AED intervention, yet only about 3% of the U.S. population is CPR certified annually. CPRPal addresses this gap by providing real-time, easy-to-interpret feedback that requires no prior training to use.

The device is placed between the rescuer's hands and the patient's sternum during chest compressions. It measures compression force directly using a load cell, tracks body posture using a 9-DOF IMU, monitors for heartbeat presence using a PPG optical sensor, and delivers feedback through a color-coded NeoPixel LED ring, a 2.8" TFT LCD display, and a 100 BPM audio metronome buzzer.

Emergency Mode operates fully standalone with no Wi-Fi required, providing immediate real-time feedback the moment the button is pressed.

Training Mode connects to Wi-Fi, runs a 2-minute guided session, and uploads averaged session metrics to an Azure-hosted cloud dashboard for review.

The final prototype measures 4.5" x 4.5" x 2.25" and runs for over 15 hours on four AA batteries at a normal operating draw of approximately 155 mA.

CPRPal Demo: https://drive.google.com/file/d/1d1auYhc-_jhG4WK9BlywpUfyi4_rIxLO/view?usp=sharing (Note video isn't perfectly sync with operation)

RenderingFinal Build
CPRPal RenderingCPRPal Final Build

Repository Structure

text
CPRPal/
├── 3DModel/
│   └── Mechanical enclosure and CAD files
│       - Top shell with lattice structure and LCD/button/LED cutouts
│       - Bottom shell with battery pocket, support beams, and hard stops
│       - Full assembly files for PLA 3D printing
│
├── ArduinoCode/
│   └── CPRPal.ino — Main ESP32 firmware (FreeRTOS-based)
│       - Sensor integration (HX711, BNO055, PPG)
│       - Real-time signal processing and CPM detection
│       - LED and display feedback systems
│       - Emergency and Training mode logic
│       - Power management and idle sleep
│       - HTTP cloud upload for training sessions
│
├── ArduinoWebsite/
│   └── Azure Static Web App source code
│       - Frontend dashboard (HTML/CSS/JS)
│       - Azure Function API endpoint
│       - Receives HTTP POST from ESP32
│       - Displays training session summary
│
├── PartsList/

System Architecture

CPRPal uses a dual-core FreeRTOS architecture on the Arduino Nano ESP32-S3.

Core 0 — Sensor Acquisition and Processing

All time-critical sensor tasks run on Core 0 to prevent display rendering overhead from introducing jitter into sensor sampling.

TaskFunctionSample Rate
taskHX711Load cell reading, EMA filtering, CPM detection, idle detection~80 Hz
taskIMUBNO055 orientation reading, tilt computation, posture status~40 Hz
taskPPGPPG sampling, adaptive peak detection, BPM estimation~50 Hz
taskBuzzer100 BPM metronome via LEDC PWM, rhythm LED strip sync100 BPM

Core 1 — User Interface and Control

The Arduino loop() function runs on Core 1 and handles all output rendering:

  • TFT display refresh at 10 Hz
  • NeoPixel force bar graph refresh at 40 Hz
  • Mode selection and session control logic
  • Training session timer and metric accumulation
  • Serial calibration commands

Shared State and Synchronization

All shared sensor variables use the g_ prefix, are declared volatile, and are protected by the FreeRTOS mutex xDataMutex. A second mutex xWireMutex serializes I2C bus access between taskIMU and any other bus user. This two-mutex architecture prevents data races while minimizing lock hold time.


Hardware Components

ComponentPartPurpose
MicrocontrollerArduino Nano ESP32-S3Main processing, Wi-Fi, dual-core FreeRTOS
Force SensorHalf-bridge strain gauge load cell (120 lb)Direct compression force measurement
Load Cell AmplifierHX711 24-bit ADCAmplifies and digitizes load cell signal at 80 SPS
IMUAdafruit BNO055 9-DOF Fusion BreakoutOrientation, tilt detection, motion artifact rejection
Pulse SensorPulse Sensor Amped (PPG)Supplemental heartbeat detection
DisplayAdafruit 2.8" ILI9341 TFT LCDReal-time prompts and numeric status
LED StripsAdafruit NeoPixel WS2812B (18 total)Force bar (15 px) and rhythm metronome (3 px)
BuzzerPiezo buzzer100 BPM audio metronome
Power RegulationTPS63070 buck-boost converter x2Regulated 3.3V and 5V rails from 4xAA batteries
Reverse ProtectionLM66200 ideal diode x2Prevents USB-to-battery reverse current
StorageSanDisk 32GB microSDBoot animation BMP frames
Battery4xAA alkaline10+ hours runtime at normal operating load
EnclosurePLA 3D print4.7" x 4.7" x 2.4" puck housing

Wiring and Pin Assignments

ESP32 GPIO Map

PinPeripheralFunction
GPIO2HX711 CLKLoad cell clock
GPIO3HX711 DOUTLoad cell data
GPIO4SD Card CSmicroSD chip select
GPIO6 (D6)Start ButtonMode selection (active low, internal pull-up)
GPIO9ILI9341 DCTFT data/command select
GPIO10ILI9341 CSTFT chip select
GPIO19BuzzerLEDC PWM channel 0, 2 kHz
GPIO21PPG LED indicatorHeartbeat flash LED
GPIO23PPG SensorAnalog ADC input
GPIO2 (LED_PIN)NeoPixel force bar15-pixel WS2812B data
GPIO4 (RHYTHM)NeoPixel rhythm strip3-pixel WS2812B data
A4 (SDA)BNO055 SDAI2C data, 400 kHz
A5 (SCL)BNO055 SCLI2C clock, 400 kHz

I2C Bus

  • BNO055 IMU address 0x28
  • 10 kOhm pull-up resistors on SDA and SCL
  • Bus speed 400 kHz (fast mode)
  • External 32.768 kHz crystal for improved BNO055 sensor fusion accuracy

SPI Bus

  • ILI9341 TFT LCD: DC on GPIO9, CS on GPIO10
  • microSD: CS on GPIO4
  • Both share the hardware SPI bus

Load Cell Wiring (Half-Bridge)

Wire ColorHX711 PinFunction
REDE+Excitation positive
BLACKE-Excitation negative
WHITEA-Signal negative (differential)
GREENA+Signal positive (differential)
YELLOWGNDCommon ground reference

Two 1 kOhm resistors on the HX711 board complete the Wheatstone bridge by providing the two fixed-impedance legs of the half-bridge configuration.


PCB Design

CPRPal uses a custom panelized PCB fabricated by JLCPCB, separated into six press-fit sub-boards using mouse-bite breakaway tabs. Each sub-board can be removed and replaced independently without additional soldering.

PCB Panel Layout

Sub-Board Summary

BoardKey ComponentsOutput
3.3V BuckBoostTPS63070, LM66200, 213k/365k feedback divider, decoupling caps, 1.5uH inductorRegulated 3.3V rail
5V BuckBoostTPS63070, LM66200, alternate feedback divider, decoupling caps, 1.5uH inductorRegulated 5V rail
Power HubDistribution headers, 10uF X5R decoupling caps x2Common power and ground plane
HX711HX711 IC, 1kOhm bridge resistors, DOUT/CLK headersLoad cell ADC interface
BNO055 IMUBNO055 breakout, 10kOhm I2C pull-ups, 32.768kHz crystalEuler angle outputs via I2C
ESP32Nano ESP32-S3 socket, USB passthroughMain MCU
Bit ShiftLogic level shifter3.3V to 5V NeoPixel data translation

Component Footprints

3.3V and 5V BuckBoost Boards
ReferenceComponentFootprint
U1TPS63070 — Buck-boost converterSOT-23-8
U2LM66200 — Ideal diode controllerSOT-23-6
L11.5 µH inductorInductor_SMD 4x4mm
R1, R2Feedback divider resistors (213k / 365k for 3.3V; alternate values for 5V)0402
R3Current sense resistor0402
R4, R6, R7Bias/compensation resistors0402
C1–C6Decoupling and compensation capacitors0402
C7Output bulk capacitor0805
D1Schottky diodeSOD-123
J1, J2, J3, J4Power input/output headersPinHeader 1x02 2.54mm
Power Hub Board
ReferenceComponentFootprint
C10, C1110 µF X5R decoupling capacitors0805
J (3.3V)3.3V distribution headerPinHeader 2x05 2.54mm
J (5V)5V distribution headerPinHeader 2x05 2.54mm
J (GND)Ground distribution headerPinHeader 1x08 2.54mm
HX711 Board
ReferenceComponentFootprint
U1HX711 — 24-bit ADCSOP-16
R5, R81 kΩ Wheatstone bridge completion resistors0402
J (VDD, VCC, DAT, CLK, GND)MCU interface headerPinHeader 1x05 2.54mm
J (RED, BLK, WHT, GRN, YLW)Load cell wire headerPinHeader 1x05 2.54mm
BNO055 IMU Board
ReferenceComponentFootprint
U1BNO055 — 9-DOF IMULGA-28 (custom)
X132.768 kHz crystalCrystal SMD 3.2x1.5mm
R1, R210 kΩ I2C pull-up resistors0402
J7Configuration header (PS0, PS1, ADR, INT)PinHeader 1x04 2.54mm
J (RST, SDA, SCL, GND, 3V, VIN)MCU interface headerPinHeader 1x06 2.54mm
ESP32 Board
ReferenceComponentFootprint
U1Arduino Nano ESP32-S3Custom dual-row female socket, 2x15 2.54mm
J (USB)USB-C passthrough cutoutUSB-C receptacle footprint
J (left, right)GPIO breakout headersPinHeader 1x15 2.54mm x2
Bit Shift Board
ReferenceComponentFootprint
U374AHCT125 — Quad level shifterSOIC-14
R10Pull-down resistor0402
J (input)3.3V NeoPixel data input headerPinHeader 1x02 2.54mm
J (output)5V NeoPixel data output headerPinHeader 1x02 2.54mm
J (VCC, GND)Power headersPinHeader 1x02 2.54mm

Power Architecture

Two independent TPS63070 buck-boost converters are used instead of a single converter with an LDO post-regulator. This improves efficiency across the full 4xAA discharge range (approximately 6V fully charged to 4.8V near end of life), since the buck-boost topology maintains tight output regulation without the linear losses an LDO would introduce at shrinking headroom.

  • 3.3V rail powers: ESP32-S3, BNO055 IMU, PPG sensor, piezo buzzer
  • 5V rail powers: ILI9341 LCD, NeoPixel strips (18 px total), HX711 amplifier

Firmware

The firmware is a single Arduino sketch located in ArduinoCode/CPRPal.ino. It is written in C++ using the Arduino framework for ESP32 and relies on FreeRTOS task management, mutex-protected shared state, and the ESP32's LEDC hardware PWM peripheral for the buzzer metronome.

Key Constants

cpp
// Force feedback thresholds (lbs)
const float FORCE_THRESHOLD_LB      = 30.0f;   // Rising edge detection
const float FORCE_LOW_OK            = 75.0f;   // Below = TOO LIGHT (yellow)
const float FORCE_HIGH_OK           = 110.0f;  // Above = TOO STRONG (red)

// CPM thresholds
const float CPM_LOW_OK              = 100.0f;  // Below = TOO SLOW
const float CPM_HIGH_OK             = 120.0f;  // Above = TOO FAST
const unsigned long CPM_DEBOUNCE_MS = 180UL;   // Anti-bounce window
const int CPM_INTERVAL_COUNT        = 6;       // Rolling average window size

// Tilt feedback
const float TILT_WARN_DEG           = 8.0f;    // Above = ADJUST

// Timing
const unsigned long IDLE_TIMEOUT_MS     = 20000UL;  // 20s inactivity -> idle
const unsigned long TRAINING_SESSION_MS = 120000UL; // 2-minute session
const unsigned long TRAINING_SAMPLE_MS  = 3000UL;   // Sample every 3s
const unsigned long TRAINING_HOLD_MS    = 3000UL;   // Button hold -> Training

// Buzzer metronome
#define BUZZER_FREQ_HZ    2000  // 2 kHz tone
#define BUZZER_BEEP_MS    30    // On-time per beat in ms
#define BUZZER_PERIOD_MS  600   // Full period = 100 BPM

Live Serial Calibration Commands

The calibration factor can be adjusted without reflashing firmware using the Serial Monitor at 115200 baud:

KeyAction
+ or aIncrease calibration factor by 10
- or zDecrease calibration factor by 10
t or TTare the scale (zero current load)
r or RReset session peak weight

EMA Filter

Raw load cell readings are smoothed before any threshold detection:

text
w_filtered[n] = 0.75 * w_filtered[n-1] + 0.25 * w_raw[n]

Smoothing factor alpha = 0.25 was chosen empirically to balance noise rejection against compression onset detection latency.

CPM Detection Algorithm

  1. EMA-filtered force crosses above FORCE_THRESHOLD_LB (30 lb) — rising edge detected
  2. 180ms debounce window prevents double-counting from signal ringing near threshold
  3. Inter-edge interval converted to instantaneous CPM: CPM = 60000 / delta_t_ms
  4. Stored in 6-entry circular buffer; rolling CPM = arithmetic mean of buffer entries
  5. If no compression detected for 2000ms, CPM resets to zero and buffer clears

IMU Baseline Calibration

On startup, 100 BNO055 orientation samples are captured (after 50 warm-up discards) and averaged as the resting baseline. All subsequent readings are deltas from this baseline so tilt feedback is relative to device placement on the patient, not absolute gravity direction.

  • Tilt magnitude = sqrt(delta_roll² + delta_pitch²)
  • Above 5 degrees triggers ADJUST on LCD
  • Above 10 degrees triggers LEAN on LCD

PPG Detection Algorithm

  1. ADC sampled at ~50 Hz, 12-bit resolution, 3.6V full-scale attenuation
  2. 10-sample moving average applied for noise reduction
  3. Adaptive baseline tracks slow DC component of signal
  4. Adaptive peak envelope tracks signal upper bound
  5. Beat detected on rising edge exceeding 55% of amplitude above baseline
  6. Flag resets when signal falls below 35% of amplitude (hysteresis)
  7. BPM = average of 4 most recent valid inter-beat intervals
  8. BPM zeroed after 3.5s without a detected beat
  9. Finger contact confirmed when ADC reading exceeds FINGER_ON threshold (1700)

Operating Modes

Boot Sequence

On power-on the device performs the following sequence automatically:

  1. Serial initialization and reset reason diagnostic printout to serial monitor
  2. I2C bus initialization at 400 kHz on pins A4 and A5
  3. BNO055 initialization and external crystal enable
  4. SPI bus and TFT display initialization
  5. Boot animation — 8 BMP frames loaded sequentially from microSD, 1.25s per frame
  6. NeoPixel strip initialization at 40/255 brightness
  7. HX711 initialization, power-up, and tare to zero
  8. FreeRTOS sensor tasks spawned on Core 0
  9. Mode selection screen displayed
  10. User selects mode via button
  11. IMU orientation baseline captured in current resting position

Emergency Mode

Activated by a short press of the start button.

  • Wi-Fi fully disabled — no radio activity during emergency
  • 100 BPM metronome starts immediately
  • Live CPM, force, tilt, and PPG status shown on TFT display
  • NeoPixel force bar updates at 40 Hz
  • After 20s of inactivity (no load cell change exceeding 10 lb), all sensor tasks are suspended in RAM and device enters software idle mode at approximately 95 mA
  • To wake: hold button for 2 seconds; all peripherals reinitialize and device returns to mode selection

Training Mode

Activated by holding the button for 3 seconds.

  • Wi-Fi connection attempted with 10s timeout
  • If no network found: graceful offline fallback, session runs locally, no upload at end
  • 2-minute timed session with countdown timer displayed on LCD bottom-right
  • Sensor metrics sampled every 3s into running sum accumulators
  • At session end: averages computed, JSON serialized manually, HTTP POST sent to Azure endpoint
  • Session summary displayed on LCD regardless of upload success
  • Wi-Fi fully shut down after upload; device returns to mode selection

User Operation

Emergency Mode Step-by-Step

  1. Remove CPRPal from first aid kit and slide power switch on. Keep device still on a flat surface during the ~5 second boot and IMU calibration sequence.
  2. Call 911 immediately or direct a bystander to call. Do not delay emergency services.
  3. Place CPRPal face-up on the center of the patient's chest, between the nipple line, with the LCD visible to you.
  4. Short-press the start button once. Emergency Mode begins and the metronome starts at 100 BPM.
  5. Place both hands on top of the device and compress in time with the beep and amber LED ring.
  6. Watch the side LED bar: yellow = push harder, green = good depth, red = ease up.
  7. Watch LCD TILT row: ADJUST or LEAN means recheck your body position and ensure force is going straight down.
  8. Watch LCD PPG row: Heartbeat detect means consider pausing to reassess for pulse.
  9. Continue compressions until EMS arrives or AED is ready.

Training Mode Step-by-Step

  1. Power on and hold button for 3 seconds until "Training selected" appears on LCD.
  2. Device connects to Wi-Fi and displays IP address on successful connection.
  3. Scan QR code on device or navigate to the dashboard URL on a phone or computer.
  4. Begin compressions following the same LED and LCD feedback as Emergency Mode.
  5. 2-minute countdown timer shown at bottom right of LCD throughout session.
  6. At session end, summary shown on LCD and data uploaded to dashboard if Wi-Fi available.

Feedback Reference

ChannelStatesMeaning
LCD — CPMWAITING / TOO SLOW / GOOD / TOO FASTCompression rate guidance toward 100-120 CPM
LCD — ForceTOO LIGHT / GOOD / TOO STRONGCompression depth guidance toward AHA target
LCD — TiltGOOD / ADJUST / LEANPosture and off-axis warning
LCD — PPGBPM value / Heartbeat detect / Missing heartbeatSupplemental pulse status
NeoPixel barYellow / Green / RedVisual force classification
Buzzer + rhythm LEDs100 BPM beep + amber flashCompression pacing metronome

Signal Processing

Force Classification

Force RangeLED ColorLCD StatusMeaning
< 5 lbOff—No significant contact
5–75 lbYellowTOO LIGHTInsufficient compression force
75–110 lbGreenGOODTarget depth range
> 110 lbRedTOO STRONGExcessive force

CPM Classification

CPM RangeLCD Status
< 1WAITING
1–99TOO SLOW
100–120GOOD
> 120TOO FAST

Tilt Classification

Tilt MagnitudeLCD Status
< 5 degreesGOOD
5–10 degreesADJUST
> 10 degreesLEAN

Power System

Rail Assignments

RailPowered Components
3.3VESP32-S3, BNO055 IMU, PPG sensor, piezo buzzer
5VILI9341 LCD, NeoPixel strips (18 px total), HX711 amplifier

Power Budget

Operating ModeCurrent DrawNotes
Peak startup~235 mABoot animation with full brightness LEDs and LCD
Normal (Emergency Mode)~155 mAColored LEDs at 40/255, dim LCD, all sensors active
Idle (tasks suspended)~95 mALCD dim showing idle screen, ESP32 running, all else off
Training Mode~195 mANormal + 40 mA Wi-Fi radio, no idle mode

At 155 mA normal draw with a 2700 mAh 4xAA pack, theoretical runtime is approximately 17 hours. Measured battery life exceeded 10 hours under mixed-use testing.


Cloud and Web Application

Dashboard URL

text
https://gentle-stone-0c20e761e.6.azurestaticapps.net/

The dashboard is a static web application hosted on Microsoft Azure Static Web Apps using the free tier only. No charges are incurred.

Data Flow

text
ESP32 collects sensor data every 3s during Training Mode session
  -> Averages computed at 2-minute session end
  -> JSON payload manually serialized (no external library)
  -> HTTP POST to Azure Function API endpoint
  -> Azure processes and stores payload
  -> Dashboard displays session summary

JSON Payload Format

json
{
  "deviceId": "nano-esp32-test",
  "timestamp": "123456789",
  "mode": "TRAINING",
  "sessionType": "summary",
  "ppg": 1800,
  "imuY": 2.5,
  "imuZ": -1.2,
  "compressionRate": 110,
  "compressionDepth": 85.3,
  "recoil": 1,
  "status": "Good compressions",
  "sampleCount": 40,
  "sessionDurationMs": 120000
}

Status String Logic

ConditionStatus Field Value
Rate > 125 CPM or depth > 6.2 lb"Bad: too fast/deep"
Rate < 100 CPM or depth < 5.0 lb or recoil == 0"Warn: shallow/recoil"
All within range"Good compressions"

Offline Fallback

If Wi-Fi is unavailable when Training Mode is entered:

  1. Device displays offline warning on LCD
  2. Full 2-minute session runs locally with all normal feedback active
  3. Session summary displayed on LCD at session end
  4. HTTP POST upload skipped

Setup and Installation

Requirements

  • Arduino IDE 2.x
  • Arduino ESP32 board package installed via Boards Manager
    • Search for esp32 by Espressif Systems
    • Select board: Arduino Nano ESP32

Step 1 — Install Required Libraries

Open Arduino IDE and go to Sketch -> Include Library -> Manage Libraries. Search for and install each of the following:

LibraryAuthor
Adafruit BNO055Adafruit
Adafruit BusIOAdafruit
Adafruit EPDAdafruit
Adafruit FT6206 LibraryAdafruit
Adafruit GFX LibraryAdafruit
Adafruit HX8357 LibraryAdafruit
Adafruit ILI9341Adafruit
Adafruit ImageReader LibraryAdafruit
Adafruit NeoMatrixAdafruit
Adafruit NeoPixelAdafruit
Adafruit seesaw LibraryAdafruit
Adafruit SH110XAdafruit
Adafruit SPIFlashAdafruit
Adafruit SSD1331 OLED Driver Library for ArduinoAdafruit
Adafruit SSD1351 libraryAdafruit
Adafruit ST7735 and ST7789 LibraryAdafruit
Adafruit STMPE610Adafruit
Adafruit TouchScreenAdafruit
Adafruit TSC2007Adafruit
Adafruit Unified SensorAdafruit
HX711bogde
PulseSensor PlaygroundWorld Famous Electronics
SdFat - Adafruit ForkAdafruit

WiFi and HTTPClient are included with the ESP32 Arduino core and do not require separate installation.

Step 2 — Prepare the microSD Card

The boot animation requires 8 BMP image files placed in the root of a FAT32-formatted microSD card. Name the files exactly as follows:

text
/Step0.bmp
/Step1.bmp
/Step2.bmp
/Step3.bmp
/Step4.bmp
/Step5.bmp
/Step6.bmp
/Step7.bmp

Each image should be a 24-bit BMP at 240x320 pixels to match the ILI9341 display resolution. If the SD card fails to mount, the firmware will halt and display an error on the TFT screen.

Step 3 — Configure Wi-Fi Credentials

Open ArduinoCode/CPRPal.ino and locate the following lines near the top of the file:

cpp
const char* WIFI_SSID     = "YOUR_SSID_HERE";
const char* WIFI_PASSWORD = "YOUR_PASSWORD_HERE";

Replace with your Wi-Fi network credentials. Wi-Fi is only used during Training Mode. Emergency Mode runs fully offline regardless of these settings.

Note: The ESP32 posts directly to the Azure cloud endpoint over any internet-connected Wi-Fi network. The viewing device does not need to be on the same network as the ESP32.

Step 4 — Select Board and Port

In Arduino IDE:

  1. Go to Tools -> Board -> esp32 -> Arduino Nano ESP32
  2. Go to Tools -> Port -> select the correct COM port for your device
  3. If the board is not recognized, hold the BOOT button on the ESP32 while connecting USB

Step 5 — Flash Firmware

Click Upload in Arduino IDE. Open the Serial Monitor at 115200 baud to view boot diagnostics, reset reason history, sensor readings, and calibration output.

Step 6 — Calibrate the Load Cell

  1. Power on the device and let it boot fully
  2. Open Serial Monitor at 115200 baud
  3. Place a known weight on the device
  4. Use + and - keys in Serial Monitor to adjust calibration factor until the displayed value matches the known weight
  5. Note the final calibration factor and update calibration_factor in the sketch to save it permanently

Library Dependencies

LibraryPurpose in CPRPal
Adafruit BNO055BNO055 IMU driver and Euler angle output
Adafruit BusIOI2C/SPI abstraction layer required by Adafruit sensor libraries
Adafruit GFX LibraryCore graphics primitives for TFT display rendering
Adafruit ILI9341ILI9341 TFT display driver
Adafruit ImageReader LibraryBMP image loading from SD card for boot animation
Adafruit NeoPixelWS2812B addressable LED control for force bar and rhythm strip
Adafruit NeoMatrixNeoPixel matrix support (dependency)
Adafruit Unified SensorUnified sensor abstraction required by BNO055 driver
Adafruit SPIFlashSPI flash support (alternative storage backend)
SdFat - Adafruit ForkSD card FAT filesystem for microSD BMP loading
Adafruit EPDE-paper display support (dependency)
Adafruit FT6206 LibraryCapacitive touchscreen support (dependency)
Adafruit HX8357 LibraryHX8357 display driver (dependency)
Adafruit seesaw LibraryAdafruit seesaw breakout support (dependency)
Adafruit SH110XOLED display driver (dependency)
Adafruit SSD1331 OLED DriverSSD1331 OLED support (dependency)
Adafruit SSD1351 librarySSD1351 OLED support (dependency)
Adafruit ST7735 and ST7789 LibraryST77xx display drivers (dependency)
Adafruit STMPE610Touch controller support (dependency)
Adafruit TouchScreenResistive touchscreen support (dependency)
Adafruit TSC2007Touch controller support (dependency)
HX711 by bogdeHX711 load cell amplifier driver
PulseSensor PlaygroundPPG pulse sensor signal processing

CPRPal is a prototype device developed for educational purposes. It is not a certified medical device. Always call emergency services first in a cardiac emergency.

Parts

68
QtyValueFootprintReferences
18MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4, H5, H6, H7, H10, H11, H12, H13, H14, H15, H16, H17, H19 +2
10VAL**MouseBite:mouse-bite-2mm-4mmmouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm, mouse-bite-2mm-4mm
410uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2, C3, C5, C9
4Conn_02x05_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_VerticalJ6, J9, J13, J14
322uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6, C7, C8
20.1uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C4
2100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC10, C11
210kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R7
21KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR5, R8
2Conn_01x02_PinConnector_PinHeader_2.00mm:PinHeader_1x02_P2.00mm_VerticalJ1, J2
2Conn_01x03_PinConnector_PinHeader_2.00mm:PinHeader_1x03_P2.00mm_VerticalJ3, J4
2Conn_01x15_PinConnector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_VerticalJ10, J11
11.5uHInductor_SMD:L_Coilcraft_XxL4020L1
110KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR10
11kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR6
1365kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR4
150kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR3
168.1kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2
1Arduino_Nano_ESP32Module:Arduino_NanoA1
1Conn_01x05_PinConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ5
1Conn_02x04_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x04_P2.54mm_VerticalJ7
1Conn_02x06_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ8
1Conn_02x08_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_VerticalJ12
1LM66200DRLRLM66200DRLR:SOT-5X3_DRL_TEX-LU2
1REDLED_SMD:LED_0603_1608MetricD1
1SN74AHCT125NSN74AHCT125N:N14U3
1TPS63070TPS63070RNMR:RNM0015AU1

Questions

How big is the EE496 PCB?

It measures 78.8 × 71.9 mm and has 2 copper layers, 1.6 mm thick.

What parts does the EE496 use?

68 parts, built around the SN74AHCT125N and TPS63070RNM. 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 EE496 KiCad files?

From the Will946/CPRPal repository on GitHub, at the commit this page was made from: the board is PCB/EE496.kicad_pcb and its schematic PCB/EE496.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the EE496 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

  • 4 layers30 × 23.5 mmNIMRS-21Pin Decoder, the printed circuit board in 3D

    NIMRS-21Pin Decoder

    CDFER/NIMRS-21Pin-Decoder

    An open source 21-Pin DCC Decoder for model trains

    89 parts21
  • 2 layersSupplyBoard, the printed circuit board in 3D

    SupplyBoard

    LaboratorioGluon/Icaro

    Proyecto para Globo Estratosférico Ícaro con ESP32

    6 parts15
  • 2 layers67 × 45 mmMarvin PS, the printed circuit board in 3D

    Marvin PS

    lhm0/marvin_robot

    robot model controlled by ESP32

    20 parts2
  • 2 layers43.6 × 25.5 mmBikeUSBv2, the printed circuit board in 3D

    BikeUSBv2

    H3wastooshort/BikeUSBv2

    Charge your Phone off of your Bike while adapting charging power to available power / riding speed.

    63 parts1GPL-3.0
  • 2 layers94 × 94 mmMotorboard, the printed circuit board in 3D

    Motorboard

    icl-rocketry/payload_gimbal

    the ReAL payload

    72 parts1MIT
  • 4 layers60 × 60 mmBatteryBoard lipo, the printed circuit board in 3D

    BatteryBoard lipo

    takuhoTech/LagopusSystem-2024

    Avionics for Human-Powered Aircraft (Japan International Birdman Rally 2024)

    80 parts1MIT
  • 2 layers44.3 × 46.3 mmCatear pcb, the printed circuit board in 3D

    Catear pcb

    TobleMiner/catear-pcb

    This repo contains the PCB for the Nekomimi project of @BenBE . It will be used to illuminate 3D printed catears.

    121 parts1