A compact, low-cost prototype that estimates hemoglobin-related optical signals from the fingertip using a MAX30100 sensor and a NodeMCU (ESP8266), and shows the result live on a web dashboard (heart rate, SpO2, PPG waveform and an Hb status).
Disclaimer: Academic prototype. It provides an experimental estimate, not a clinical diagnosis, and does not replace a blood test (CBC / hematology analyzer). See Limitations.
Institution: Department of Biomedical Engineering, V.S.B. Engineering College Guide: Dr. Yuvaraj V, Associate Professor Team: Boobalan S, Gopinath A (@Gopinath-Biomedical), Nishanth R
Standard hemoglobin testing needs a blood sample and a laboratory. It is invasive, slow and costly, which makes frequent or large-scale screening difficult, especially in rural areas where anemia often goes undetected. A painless, low-cost, portable screening aid would help early detection.
- The MAX30100 shines red and infrared light through the fingertip and measures the reflected light (photoplethysmography, PPG).
- The ESP8266 extracts the pulsatile (AC) and steady (DC) parts of both signals and computes the ratio of ratios
R = (AC_red/DC_red) / (AC_ir/DC_ir). - Heart rate (peak detection), approximate SpO2 and a calibrated hemoglobin estimate are derived from the signals.
- The ESP8266 serves the data as JSON over Wi-Fi;
dashboard/index.htmlpolls it and displays the results.
| Controller board | MAX30100 sensor | Enclosure |
|---|---|---|
![]() |
![]() |
![]() |
Add a screenshot of your running dashboard as images/dashboard.png and embed it here.
| Part | Role |
|---|---|
| NodeMCU (ESP8266) | Reads the sensor, computes values, hosts the /data endpoint over Wi-Fi |
| MAX30100 | Red + IR LEDs and photodiode (I2C) |
| Buzzer (optional) | Audible indicator |
| 9V battery | Portable power |
Wiring and cost table: hardware/README.md
non-invasive-hemoglobin-monitor/
├── README.md
├── LICENSE
├── requirements.txt # numpy (for the calibration tool)
├── .gitignore
├── firmware/hemopulse_esp8266/
│ ├── hemopulse_esp8266.ino # NodeMCU firmware
│ └── secrets.h.example # copy to secrets.h, add Wi-Fi details
├── dashboard/index.html # HemoPulse dashboard (open in browser)
├── tools/calibrate.py # fits Hb = a*R + b from lab values
├── data/calibration_template.csv
├── hardware/README.md
└── images/
1. Wi-Fi hotspot on the laptop
Windows: Settings → Network & internet → Mobile hotspot. Set the network name to TOM (or any name), note the password, and set the network band to 2.4 GHz (the ESP8266 cannot join 5 GHz). Windows hotspots use the 192.168.137.x range, which the firmware expects.
2. Flash the firmware
- Install the Arduino IDE and add the ESP8266 board package (File → Preferences → Additional boards manager URLs:
https://arduino.esp8266.com/stable/package_esp8266com_index.json, then Boards Manager → esp8266). - Open
firmware/hemopulse_esp8266/hemopulse_esp8266.ino. - Copy
secrets.h.exampletosecrets.hin the same folder and put in your hotspot name and password. - Select Tools → Board → NodeMCU 1.0 (ESP-12E Module), choose the COM port, click Upload.
- Open Serial Monitor at 115200 baud. You should see
MAX30100 OKand the board's IP (192.168.137.200). If you use a different IP, open the dashboard asindex.html?ip=<that IP>and changelocalIPin the firmware.
3. Open the dashboard
Open dashboard/index.html in Chrome on the laptop (or any device on the hotspot). The badge turns green (MODULE CONNECTED) when the board answers. Place a fingertip gently on the sensor; after about 3 seconds the readings appear.
The live dashboard cannot be hosted on GitHub Pages. It reads from the board over plain HTTP on a private network, and browsers block an
https://page from doing that. Run it locally. To show the project online, add a screenshot or a short screen recording of the dashboard toimages/.
4. Calibrate (required for a hemoglobin value)
Until calibrated, the dashboard shows UNCALIBRATED together with the measured R.
- For each volunteer, record the device
R(Serial Monitor prints it every second) and a same-day lab Hb value indata/calibration.csv(format indata/calibration_template.csv). Use informed consent, and include both anemic and non-anemic subjects. pip install -r requirements.txtthenpython tools/calibrate.py data/calibration.csv- Paste the printed
HB_CALIBRATED,HB_A,HB_Binto the firmware and re-upload.
- Total Hemoglobin (g/dL), approximate SpO2 (%), Heart rate (BPM), Probe contact state
- Live PPG waveform drawn from the real samples sent by the sensor
- Screening result: normal / mild / moderate / severe low Hb estimate, using WHO adult cut-offs (female 12 g/dL, male 13 g/dL; selectable on the page)
- Offline, probe-idle, measuring and uncalibrated states
- The MAX30100 has only two wavelengths (red, IR). It was designed for pulse oximetry. Estimating hemoglobin from two wavelengths is experimental and strongly affected by skin tone, finger pressure, motion and ambient light.
- The Hb value is only as good as your calibration data. Report your own measured error (MAE, bias) against lab values before making any accuracy claim.
- SpO2 uses a generic empirical formula and is not calibrated against a reference oximeter.
- The dashboard uses adult WHO cut-offs only. Cut-offs differ for children, pregnancy and altitude, and the result is never a diagnosis.
- Commercial or clinical use would need clinical validation and regulatory compliance (for example ISO 13485 and IEC 60601).
To be added: calibration sample size, MAE / RMSE / bias against lab Hb (from tools/calibrate.py), and screenshots.
- Larger calibration study and validation against lab CBC
- Additional wavelengths (for example MAX30102 or multi-LED designs)
- Temperature and motion compensation
- Battery monitoring, case design, mobile app
-
Maxim Integrated, MAX30100 Pulse Oximeter and Heart-Rate Sensor IC for Wearable Health, datasheet. https://www.analog.com/media/en/technical-documentation/data-sheets/max30100.pdf
-
WHO, Haemoglobin concentrations for the diagnosis of anaemia and assessment of severity (WHO/NMH/NHD/MNM/11.1), 2011.
MIT License, see LICENSE.



