Project tutorial

Electrocardiogram Using TouchDesigner & Arduino

I created an electrocardiogram using TouchDesigner. The image moves according to the value of the sensor connected Arduino.

  • 5,831 views
  • 2 comments
  • 20 respects

Components and supplies

Apps and online services

About this project

I created an electrocardiogram using TouchDesigner. The image moves according to the value of the sensor connected Arduino.

Sensor Configuration

Measure the heart rate with a sensor MAX30105.

The Arduino library for MAX30105 is below.

https://github.com/sparkfun/SparkFun_MAX3010x_Sensor_Library

Arduino IDE Program

I used Example4_HeartBeat_Plotter.ino in Library Example of MAX 30105 .

TouchDesigner Program

Operation

Program

1. Serial data from Arduino acquisition

Select and place the Serial operator from the DAT (Data) tab and obtain serial data from Arduino.

  • Port: Select the Arduino port connected to the PC
  • Baud Rate: 115200

2. Selection of serial data.

Select and place the Select operator from the DAT tab and wire it with the Serial operator so that only the latest serial data is acquired.

  • Select Rows: By Index
  • Start Row Index, End Row Index: 1
  • Select Cols: by Value

3. Convert latest serial data to CHOP data

Select and place the DAT to operator from the CHOP (Channel Operators) tab and convert the serial data of the DAT value to the value for CHOP.

  • First Column is: Values

4. Plot CHOP data

Select and place the Trail operator from the CHOP tab and wire it with the CHOP operator output and plot the data.

5. CHOP filter serial data of sensorized sensor

I wanted to eliminate the bias of the serial data, so I selected the Audio Filter operator from the CHOP tab.

  • Cutoff Units: Logarithmic Filter
  • Cutoff: 0.47

6. Square the filtered data and convert it to a positive value

Select, place, and wire Math operators from the CHOP tab.

Channel Post OP:Square

From Range: 0-40000 for Normalize output data

7. Further filtering the output value

Since the output value changes quite abruptly, arrange and wire the Filter operator from the CHOP tab and gently change the value.

  • Type:Left Half Gaussian
  • Filter per Sample:On

The operation so far is as follows.

8. Add image to display

Place the Movie File In operator from the TOP (Texture Operators) tab.

File: Specify image data to display

Here I will use the heart drawn by my daughter.

9. Change image size with data output value

Place the Fit operator from the TOP tab and connect the Movie File In operator.

Click the "+" in the lower right of the Filter operator in 7. and drag chan1 to the Fit operator to open the selection window for various variables. Select Export to Scale X and change the X axis of the image with the output of Filter operator. Likewise with Export to Scale Y, let's change the image size with Filter operator output value.

Comments

Similar projects you might like

Hacking My Toaster

Project tutorial by javier muñoz sáez

  • 633 views
  • 5 comments
  • 12 respects

Rickroll Box

Project showcase by slagestee

  • 1,648 views
  • 0 comments
  • 6 respects

Gyroscope Fun with NeoPixel Ring

Project tutorial by danionescu

  • 2,944 views
  • 0 comments
  • 12 respects

Arduino Obstacle Avoidance Robot with Ultrasonic HC-SR04

Project tutorial by Jorge Rancé

  • 1,188 views
  • 3 comments
  • 12 respects

Arduino 4WD RC Car

Project tutorial by Andriy Baranov

  • 22 views
  • 0 comments
  • 1 respect

START: A STandalone ARduino Terminal

Project tutorial by Alessio Villa

  • 2,069 views
  • 0 comments
  • 7 respects
Add projectSign up / Login