Visualize Cardiac Graphics on Smartphone With Cheapduino and Pulse Sensor

Introduction: Visualize Cardiac Graphics on Smartphone With Cheapduino and Pulse Sensor

About: Hola mi nombre es Carlos tengo un canal en youtube donde comparto mis proyectos en https://www.youtube.com/c/carlosvolt

In this project we are going to make a device, in which we will visualize heart beats, in our smartphone, for this we will use a bluetooth module hc-05 or the hc-06, a cheapduino (it can be replaced by an arduino one, mega, nano, etc), a buzzer and the cardiac pulse sensor amper.

An application has been designed in inventor app to visualize, heart beats as you can see in the following image

Step 1: Let's See the Hardware That We Will Need to Make This Project With All Its Features

Step 2: What Is CheapDuino

CheapDuino is the very affordable Arduino compatible processor. Its goal is to provide a low-cost processor for students and professional development enthusiasts. The price of each controller is almost 1/5 of the price of the Arduino UNO. Therefore, it is also suitable for the customized project of DIY, workshop, gifts for friends, E-Textiles and educational use.

Step 3: Specifications

  • Operating voltage: 3 ~ 5 volts
  • Recommended power supply: 5v
  • Microctonroller: Atmel AVR ATmega8
  • boot manager (option of board in Arduino IDE): Arduino NG / w ATmega8
  • 3 digital pins, 3 analog pins with easy-to-weld hexagonal pads
  • Integrates 3 pwm pins, I2C interface and UART interface
  • Suitable for workshops, educational use and customized DIY projects
  • Controller compatible with low cost Arduino
  • Designed for students and DIYers
  • Dimensions: 2cm x 2cm x 0.2cm

Step 4: Pinout Diagram

Step 5: Connection Diagram

Note:

  • When you connect the fpc programming cable to the DFRobot FPC programmer and the CheapDuino device, please, the blue side up.

Step 6: ​CheapDuino Can Be Bought CheapDuino on the DFRobot Page by Clicking on the Link

Step 7: Bluetooth Module Hc-06

  • Characteristics:
  • Specification bluetooth v2.0 + EDR (Enhanced Data Rate)
  • Slave mode (You can only operate in this mode)
  • It can be configured using AT commands (Must be written in uppercase)
  • Radio chip: CSR BC417143
  • Frequency: 2.4 GHz, ISM band
  • Modulation: GFSK (Gaussian Frequency Shift Keying)
  • Built-in PCB antenna
  • Emission power: ≤ 6 dBm, Class 2
  • Reach 5 m to 10 m
  • Sensitivity: ≤ -80 dBm at 0.1% BER
  • Speed: Asynchronous: 2 Mbps (max.) / 160 kbps, synchronous: 1 Mbps / 1 Mbps
  • Security: Authentication and encryption (Default password: 1234)
  • Profiles: Bluetooth serial port
  • Card mounted module with voltage regulator and 4 pins providing access to VCC, GND, TXD, and RXD
  • Current consumption: 30 mA at 40 mA
  • Operating voltage: 3.6 V to 6 V
  • Overall dimensions: 1.7 cm x 4 cm approx.
  • Operating temperature: -25 ºC to +75 ºC

Applications:

  • Wireless communication between microcontrollers
  • Wireless communication between computers and microcontrollers
  • Wireless communication between mobile phones or tablets and microcontrollers

Warnings: Bluetooth communication between two modules must be done between a module configured as a master and another as a slave. For Bluetooth communication with computer, telephone, PDA, tablet, etc., the module must be a slave.
Do not connect this device directly to a computer serial port, to do this it will require a TTL to RS232 serial converter. You can also connect via USB using a USB to serial TTL converter.

For wireless connection to a computer, the Bluetooth interface or adapter must support the serial port profile on bluetooth. You can also connect one of these modules via cable to the computer and communicate with a second module, provided that one of them is slave and the other master.

Configuration:
The module usually comes configured with serial transmission speed of 9600 bps, 1 stop bit, and without parity bit, name: linvor, password: 1234

For its configuration it can be connected to the old RS232 serial port of the computer through a TTL to RS232 converter, or better using a USB to TTL serial converter and using the Windows Hyperterminal or another program with serial terminal functions to send the AT commands (eg SSCOM32, PuTTY, etc.). (As of Win Vista the hyperterminal is no longer included in the OS)

With Arduino it can also be done easily and without any converter with a small sketch that uses the serial monitor of the Arduino IDE to write the AT commands and observe the response of the module. Since this monitor uses the serial communication that the Arduino uses to communicate with the computer on digital pins 0 and 1, a software serial port is created to pass the data to the Bluetooth module using digital pins 10 and 11.

It could also be done with a simpler sketch, directly connecting the module to the serial port of the Arduino board (Digital Pins 0 and 1), but you would have to remove the Arduino microcontroller first.

Of course you can also send the AT commands from any microcontroller without the help of computers.

Step 8: Heart Rate Sensor

Step 9:

The pulse sensor is essentially a photoplethysmograph, which is a known medical device that is used to control the heart rate non-invasively. Sometimes, photoplethysmographs measure the oxygen levels in the blood (SpO2), sometimes not. The heart pulse signal that comes out of a photoplethysmogram is an analog voltage fluctuation, and has a predictable waveform, as shown in figure 1. The representation of the pulse wave is called a photoplethysmogram or PPG. The Amped Pulse Sensor amplifies the raw signal from the previous Pulse Sensor and normalizes the pulse wave around V / 2 (midpoint in voltage). The Amped pulse sensor responds to relative changes in the intensity of light. If the amount of light incident on the sensor remains constant, the value of the signal will remain at (or close to) 512 (midpoint of the ADC range). More light and the signal increases. Less light, just the opposite. The green LED light that is reflected back on the sensor changes during each pulse.

Step 10:

The objective is to find successive moments of the heart's instantaneous beat and measure the time elapsed between them, called Inter Beat Interval (IBI). By following the predictable shape and pattern of the PPG wave, we can do exactly that.

When the heart pumps blood through the body, with each beat there is a pulse wave (a kind of shock wave) that travels along all the arteries to the same ends of the capillary tissue where the pulse sensor is connected. Real blood circulates in the body much more slowly than the pulse wave travels. Let's follow the events as they progress from the 'T' point in the PPG below. There is a rapid increase in the value of the signal as the pulse wave passes below the sensor, then the signal falls back to the normal point. Sometimes, the dichroic notch (downward peak) is steeper than others, but, in general, the signal is set in the background noise before the next pulse wave leaks. As the wave repeats and is predictable, we could choose almost any recognizable characteristic as a reference point, for example, the peak, and measure the heart rate by making mathematical calculations about the time between each peak. However, this may result in false readings from the dichroic notch, if present, and may also be susceptible to inaccuracy with respect to baseline noise. There are other good reasons for not basing the algorithm of detection of beats in arbitrary wave phenomena. Ideally, we want to find the instantaneous moment of the heartbeat. This is important for the accurate calculation of BPM, the variability of the heart rate (and measure the heart rate by calculating the time between each peak.) However, this can lead to false readings from the dichroic notch, if present, and may also be susceptible to inaccuracy with respect to baseline noise. There are other good reasons for not basing the algorithm of detection of beats in arbitrary wave phenomena. Ideally, we want to find the instantaneous moment of the heartbeat. This is important for the accurate calculation of BPM, the variability of the heart rate (and measure the heart rate by making calculations in time between each peak.) However, this can lead to false readings from the dichroic notch, if present, and may also be susceptible to inaccuracy with respect to baseline noise.There are other good reasons not to base the algorithm for detecting beats in arbitrary wave phenomena.Ideally, we want to find the instantaneous moment of the heartbeat.

Step 11:

Some researchers of the heart say that it is when the signal reaches 25% of the amplitude, some say that it is 50% of the amplitude, and some say that it is the moment in which the slope is more pronounced during the ascending event.

Step 12: We Are Also Going to Need a Buzzer

Step 13: Source Code

// Esto ejemplo muestra un pulso de latido del corazón humano en directo.

// Se puede visualizar en "Serial Plotter" de arduino o en aplicación de APP inventor.

// Sonará un buzzer con cada latido de tu corazón. // Esta es la señal directa del sensor de pulso.

// Variables

int buzzer = 11;

int pulso; // contiene los datos brutos entrantes. El valor de la señal puede variar entre 0-1024

int limite = 550; // Determine qué señal "se contará como un latido" y qué señal ignorar.

void setup() {

pinMode(buzzer,OUTPUT); //buzzer sonará al ritmo de tu corazón!

Serial.begin(9600); // Configura la comunicación serial a 9600(depende tu adaptador bluetooth como esté configurado)

}

void loop() {

pulso = analogRead(A0); // Lee el valor del pin analógico 0, y Asigna este valor a la variable "pulso". Serial.print("*");//Este caracter lo filtra la aplicación en APP inventor

Serial.println(pulso);// Envíe el valor de pulso al Plotter serial. Comentar si queremos visualizar en "serial ploter" if(pulso > limite){ // Si la señal es superior a "550", entonces suena el buzzer. digitalWrite(buzzer,HIGH);

} else

{

digitalWrite(buzzer,LOW); // De lo contrario, deja de sonar el buzzer.

}

delay(35);

}

Step 14: Circuit

Step 15: Application

Once the application is open, we will connect to hc-06 or hc-05, click on Choose BT device

Step 16:

And we will see a list with bluetooth devices, we choose ours

Step 17:

Then click on connect

Step 18:

Ready we are already receiving data on our cell

Step 19: Download the Application

http://rogerbit.com/wprb/wp-content/uploads/2018/0...

Maybe you can be interested in projects in arduino, pic, robotics, telecommunications, subscribe to http://www.youtube.com/user/carlosvolt?sub_confir... many videos with complete source code and diagrams

For más infromation visit http://rogerbit.com/wprb/index.php/2018/02/04/visualizar-grafica-cardiaca-en-smartphone-con-cheapduino-y-sensor-de-pulsos/

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Water Contest

      Water Contest
    • Metalworking Contest

      Metalworking Contest

    Discussions