=== E-Textiles and Wearables II === [[https://www.emiliapucci.com/week-9-e-textilesandwearables2|https://www.emiliapucci.com/week-9-e-textilesandwearables2]] INSPIRATION ---- I want to work on heartbeat and the connection between physical and emotional wellbeing as a part of my final project. My focus for this assignment is to develop a heart rate sensing top that can capture heartbeat and translate into pulsating LED lights. This will allow me to start experimenting with heart rate sensors as input and led as a possible output. In the future my project will be more complex, but it's a start! {photos of my heart stuff and links of heart rate sensors} OBJECTIVES & PLAN ---- In order to ensure I have an interactive product ready for the assignment and start building my final project step-by-step, I decided to break down the process in digestible modules: * MODULE 1 - CAPTURING HEARTBEAT WITH AN ECG SENSOR * MODULE 2 - MAKING A PARAMETRIC HEART EMBROIDERY * MODULE 3 - CODING A PULSATING HEART * MODULE 5 - ASSEMBLING A SMART SPORTS BRA * MODULE 4 - ADDING A CAPACITIVE PRESSURE SENSOR In the next step, the goal is to experiment making an **optical heart beat sensor**, and to **compare it with the ECG for accuracy and wearability.** MODULE 1 - CAPTURING HEARTBEAT WITH AN ECG SENSOR ---- {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:heartbeat_sensor2.jpg?nolink&1028x771|heartbeat_sensor2.jpg}} I wanted to start playing with heartbeat sensors, so I hooked up the **Sparkfun ****AD8232**** Heart Rate Monitor** and tried the tutorial **[[https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide?_ga=2.201365204.473264447.1511475547-1795541270.1509035117&_gac=1.261668479.1511475547.Cj0KCQiAgNrQBRC0ARIsAE-m-1xEAOVLjkU-u7wNyBpwLxaM95b01vU1b-0jouuG_tjH5Jj7ESRjNuoaAuVOEALw_wcB|here]]** , to create a monitor for my cardiac activity. {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-25_at_10.52.33_am.png?nolink&512x289 }}{{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-25_at_10.52.45_am.png?nolink&512x290}} The hookup on Arduino went smoothly. My difference with the tutorial was that I used an Arduino UNO vs an Arduino Pro Mini 328. The only difference with the UNO is that it has 3.3V or 5V instead of VCC, so I checked the AD8232 **[[https://cdn.sparkfun.com/datasheets/Sensors/Biometric/AD8232.pdf|datasheet]] **and found that I need to use the 3.3V. The issues came when I tried to display the ECG on Processing. I continuously got the error //**Error, disabling serialEvent() for /dev/cu.usbmodem1411 \\ null** // {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-23_at_8.47.54_pm.png?nolink&1028x581}} {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-23_at_9.27.50_pm.png?nolink&1028x212}} I went on **[[https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide/discuss|this]] **forum to troubleshoot my issue, and found that one user solved it by **downloading the 2.2.1 version of Processing**. It worked! Now I can visualize my heartbeat easily on the screen. {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-23_at_9.34.40_pm.png?nolink&1028x304}} MODULE 2 - BUILDING A PARAMETRIC HEART EMBROIDERY ---- Sketched a parametric heart outline. {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:heart_sketch.jpg?nolink&512x677 |heart_sketch.jpg}}{{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:heart_embroidery.jpg?nolink&510x680|heart_embroidery.jpg}} Uploaded the drawing as a background on Rhino. Created the outlines. Then opened **Grasshopper** and used the **Delaunay edges** to create a nice parametric geometric design. {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-24_at_11.00.25_pm.jpg?nolink&512x277 |screen_shot_2017-11-24_at_11.00.25_pm.jpg}}{{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-24_at_11.11.59_pm.jpg?nolink&512x277|screen_shot_2017-11-24_at_11.11.59_pm.jpg}} Traced the lines on the cotton fabric and stitched the embroidery with red thread. Then I drew the circuit: //**{image of circuit}** // And started sewing the LEDs with conductive thread. Once I connected all the + sides to the Lilypad, I realized I didn't;t have enough conductive thread left. I had another one, but about 1/2 as thick. \\ So I took my multimeter and measured the resistance of the two threads: **THREAD 1 ** 270 - 280 Ohm **THREAD 2** 900 - 940 Ohm So the second thread has three times the resistance of the first. I believe this will be an issue for the circuit, so I will go and find a way to make the circuit with the same thread. **[[https://learn.sparkfun.com/tutorials/sewing-with-conductive-thread|Here**]]**is a link to help choose the right type of conductive thread and in general how to understand conductive's thread's behavior. {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:hilo_conductivo.jpg?nolink&1028x683|hilo_conductivo.jpg}} {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:img_20171127_081524.jpg?nolink&368x490 |img_20171127_081524.jpg}}{{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:multimeter_and_embro.jpg?nolink&653x490|multimeter_and_embro.jpg}} MODULE 3- CREATING A PULSATING HEART ---- I broke down the interaction in its 2 main components: INPUT - A capacitive pressure sensor (while waiting to add the heartbeat sensor) OUTPUT - Fade in fade out LEDs On Arduino, I tried to build up my skills by starting with two different sketches: * LEDs blinking in series * LEDs Fading in and out TBC with details on the coding {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:screen_shot_2017-11-27_at_1.03.18_pm.png?nolink&1028x536}} {{:fabricademy2017:students:emilia.pucci:etextiles_and_wearables_ii:em_and_ardu.jpg?nolink&1028x771|em_and_ardu.jpg}} MODULE 4 - ASSEMBLING A SMART SPORTS BRA ---- Created the pattern by using a bra I have. Checked the pattern with online sports bra patterns Made it in Rhinoceros Laser Cut the pattern (speed 12, Power 18) Sewed with a sewing machine MODULE 5 - MAKING A CAPACITIVE PRESSURE SENSOR ---- This capacitive pressure sensor is going to substitute the heart rate sensor in this iteration, so I can add an INPUT that will cause the OUTPUT of the pulsating LEDs. I used the tutorial **Fabric Piano** in the book **[[http://sewelectric.org/diy-projects/5-fabric-piano/|Sew Electric]]**, written by Leah Bueckley (the inventor of the Lilypad) and Kanjun Qiu. The piano keys are capacitive pressure sensors and I found the tutorial delightfully comprehensible and very achievable :) {photos} Step 1 - Sew the conductive yarn from Pin A4 to a side of the sports bra Step 2 - Writing and uploading the code for the pressure sensor from Sew Electric Step 3 - Testing if it works Step 4 - Putting together the Pressure Sensor input with the LED fade in and out output. Check **[[https://youtu.be/AJf7z-lPIjI|here]]**the video of the smart heart bra making of