Lsse-Semester Vii - Biomedical Engineering - 2020-2021 - Oddsemester
Lsse-Semester Vii - Biomedical Engineering - 2020-2021 - Oddsemester
Lsse-Semester Vii - Biomedical Engineering - 2020-2021 - Oddsemester
Backgroun
d Knowledge of Pulse Oximeter & Tools like Arduino IDE
● MAX30102 sensor:
Online ExperimentReport(OnlinePractical)
LSSE-Semester VII – Biomedical Engineering – 2020-2021 –OddSemester
MAX30105 particleSensor;
const byte RATE_SIZE = 4; //Increase this for more averaging. 4 is good. byte
rates[RATE_SIZE]; //Array of heart rates
byte rateSpot = 0;
long lastBeat = 0; //Time at which the last beat occurred float
beatsPerMinute;
int beatAvg;
0x00, 0x08, 0x10, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00,
0x01, 0x80, 0x00 };
void setup()
{
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Start the OLED display
display.display();
delay(3000);
// Initialize sensor
particleSensor.begin(Wire, I2C_SPEED_FAST); //Use default I2C port, 400kHz
speed
particleSensor.setup(); //Configure sensor with default settings
particleSensor.setPulseAmplitudeRed(0x0A); //Turn Red LED to low to
indicate sensor is running
}
void loop() {
long irValue=particleSensor.getIR(); //Reading the IR value it will permit
us to know if there's a finger on the sensor ornot
beatAvg = 0;
for (byte x = 0 ; x < RATE_SIZE; x++) //Take average ofreadings
beatAvg +=rates[x];
beatAvg /= RATE_SIZE;
}
}
}
if (irValue < 7000) //If no finger is detected it inform the user and put the average
BPM to 0 or it
{
will be stored for the next measure
beatAvg=0;
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(30,5);
display.println("Please Place ");
display.setCursor(30,15);
display.println("your finger ");
display.display();
noTone(3);
}
}
Circuit
Diagram
Online ExperimentReport(OnlinePractical)
LSSE-Semester VII – Biomedical Engineering – 2020-2021 –OddSemester
Both the modules (MAX30102 and OLED) use I2C interface for communication. If2
pin buzzers are used, then negative terminal should be grounded and positive
terminal should relate to the resistor to the digital pin 3(D3).