2019年1月13日 星期日

2018年12月20日 星期四

Pulse Oximeter with MAX3010X

在同一波長下針對Hb和HbO2的吸收(extinction coefficient or absorption coefficient)有差異,而如果要求SPo2量測兩個不同波長的吸收就可以求解一個未知數。

因為光對於動脈微血管血液的變化(隨著心率)會有交流訊號,而其他的組織(吸收散射反射)則是直流成分,因此將兩波長反射量變化正規化後的結果作為R-Ration(SPo2為非線性),利用經驗公式A, B係數可得一SPo2曲線,例如660nm/940nm = 1, SPo2 = 85%,例如A - B = 110 - 25 斜率。

以下Github包含STM32F4 Driver for MAX30100(移植Reference 1.範例),和MAC OS X上的C++ wxWidgets GUI(左下角顯示SPo2)可透過VCP與STM32F4通訊,當然除了此方法使用更多的波長可以使SPo2求解聯立方程更加準確,並且實務上會做更高精度的SPo2曲線的建立以及motion artifact除去等。

Download : 

Demo : 

Reference : 

2018年10月4日 星期四

Continuous Non Invasive Blood Pressure Research Platform (ECG and PPG) Pulse Arrival Time Based

This project is cuffless cNIBP research platform with ECG(two-electrode) and PPG

In cuffless non-invasive blood pressure monitor field, we with the accurate calibration of PAT to BP, beat-to-beat BP can be estimated from PAT. On the basis of the theoretical relationship between PAT and BP and their experimental or empirical relationship, various models that correlate PAT with BP have been established.

PAT and BP with Regression:

Pulse transit time (PTT) is the time it takes for the pressure or flow wave to propagate between two arterial sites. PTT measured as the time delay between invasive proximal and distal blood pressure or flow, and PTT(propagate time) can be converted to Pulse Wave Velocity(PWV is speed unit).
the most used is the R-wave(QRS Complex) in the electrocardiogram (ECG) and combine pulsemeter(piezo or PPG), leading to the so called pulse arrival time (PAT). PAT is not exactly the PTT, as it includes the time interval between ventricular depolarization and the opening of the aortic valve which is known as pre-ejection period (PEP) and it varies beat-to-beat.

Most efforts have employed the time delay between ECG and finger photoplethysmography (PPG) waveforms as a convenient surrogate of PTT.

However, these conventional pulse arrival time (PAT) measurements include the pre-ejection period (PEP) and the time delay through small, muscular arteries and may thus be an unreliable marker of BP.

Shortcoming is that PAT includes the pre-ejection period (PEP) in addition to PTT. Since the PEP component depends on the electromechanical functioning of the heart, it can change independently of PTT and thus BP.

Because the ECG QRS-Complex is not the starting point for blood to actually enter the radial artery, it is a biopotential to depolarization of the sinus node

This project only for research

Reference : 
[1] Continuous Blood Pressure Measurement from Invasive to Unobtrusive: Celebration of 200th Birth Anniversary of Carl Ludwig
[2] Cuff-Less and Continuous Blood Pressure Monitoring: A Methodological Review

2018年9月21日 星期五

Xcode 10.0 update problem of wxWidgets (g++)

ld: warning: /System/Library/Frameworks//...

try dylib to TBD files:

if the problem remains unsolved:

1. sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.old
2. sudo rm -rf /Library/Developer/CommandLineTools.old
3. Download Command Line Tools from AppleDeveloper :
4. Double Click *.dmg (e.g. Command_Line_Tools_macOS_10.13_for_Xcode_9.2.dmg) install
5. Rebuild your wxWidgets project with g++

2018年9月9日 星期日


wxNixieClock is time sync tool for Nixie Clock project.(Only MAC-OS-X)

g++ -o2 -o wxnixieclock.cpp serialport.cpp connectargsdlg.cpp `wx-config --cxxflags --libs` -m64

1. Pair BT of MAC and Nixie Clock.
2. Open to select tools -> Connect Device -> cu.BT device driver
3. Click SyncTime button
4. Done!

Install wxWidgets dependency in terminal

1. user$ /usr/bin/ruby -e "$(curl -fsSL" 
2. brew install wxwidgets 

Reference : Nixie Clock