User:1sfoerster/enes100/fall2013/p3BioFeed

WIKIPAGE MODIFIED
By: Fatima Khan

Problem Statement
Design and build a device that will convert inputs from the human body such as heart rate, skin temperature, EEG, skin twitching and movement detection into various devices turning off and on such as EL wire, LED's, motors, lights, etc. These could be mounted on walls or on a helmet or in clothes. This could be used for both costumes and provide an alternative multi-sensory device for people who cannot normally control their environment.

=Conceive= Pulse Detector This is a working pulse sensor connected to an arduino and an LED. Put your finger on where the white heart is and the LED will blink every time your heart beats. Working on a clip printed on the makerbot that will attach to a finger like those in the hospital.

We took an Arduino Uno from Eng class home.then Figured out that we did not have a USB cord so drove back to hcc and picked one up along with LED lights. While downloading we had a hard time opening the software since the download failed to install. we tried redownloading and extracting several times but it didnt work.he then watched a video showing step by step how to complete the installation process and finally installed it.we played around with the arduino for a while switching LED lights here and there, then Programmed an Arduino Uno to make LED lights blink or stay lit.

we then researched diodes over the weekend and how they function. found some reliable articles that helped me to get a better understanding of the diode. http://insayne_kokane.tripod.com/diodes.shtml -helped us to understand the science and structure behind the diode http://en.wikipedia.org/wiki/Diode -helped us to understand the different structures and purposes for different diodes we thought the research was going to be much easier but once we realized it had to be more specific we definitely got more detailed in our mission.we also picked out some articles to give our team the gist of what we learned. .Once I realized there are many different types of diodes I did not want to narrow down on any one type of diode because I was hoping the team would come to a consensus.

here are some websites we discovered Rubber Snakes:

http://www.fakerubbersnakes.com/groupcoiledsnakes.htm

http://www.zymetrical.com/fake-rubber-snakes-c-300_214.html

http://www.thebigzoo.com/shopping/shopdisplayproducts.asp?id=51

We can also look at local places like Target, Walmart, and Party City if we don't want to buy these online.

LED's

http://www.pololu.com/catalog/product/1074

http://www.elexp.com/opt_rgbc.htm

http://www.theledlight.com/rgbdiodes.html

We could also use single colored LEDs and use more of them as opposed to multicolored.

In terms of how we are going to mount everything, my thoughts were that the arduino board would have to be exterior for comfort's sake, and it would have to be covered in some way so that it is weatherproof. We believe we could use either a Styrofoam casing or a plastic one that would cover up the board with adhesives acually being used to keep the board attached to the had. The snake can also be attached with adhesives, but there is more freedom with this option as well. The snake can also be sewn on, which would probably be the most secure in terms of movement, weather, and other factors that could jar it loose. We didn't look to much into the type of hat because I don't know exactly which one we are using. We figured a baseball cap or a type of beanie would be the best choices. Bring this up with the team and get back to me with the results. Also, can you email me whatever progress and next steps the team comes up with.

Gathered information on the electronics aspect of the project. We will need an instumentation amplifier to boost the level of the signal from our diodes to our logic system/software. An instrumentation amplifier consists of three operational amplifiers, two acting as buffers for the last. Schematic:

http://commons.wikimedia.org/wiki/File:Instrumentation_Amplifier.svg

Materials involved will be all parts found in above schematic, as well as a small enclosure.

Week 2:

We then started to experiment with circuits in the arduino uno by using a breadboard and wires and playing with the preinstalled programs such as blink and purchased 60 LEDs with six different colors to program

We found a way to make homemade ecg pads and conductive gel. We would use the polyethylene plastic in beer caps and brass snap on buttons to create the pads. All we need to do is find beer caps and use the snap on buttons from old pants and then those materials would be out of the way. the instructions for this part of the snake hat project can be found here - http://www.instructables.com/id/How-to-make-ECG-pads-conductive-gel/

Delved deeper into analysis of snake hat electronics. Involves three inverters and a series of resistors + power supply. Cleaned up plans on the specifics of the input/output from the pads/in amp/arduino. Pads may be either from nursing dept or homemade.

We were able to get a sketch of what the design for the hat could look like. We concluded that a hat with a flat lid would be easier to work with than a hat with a round lid. This is because it would be easier to mount the board or the case in a way where it won't interfere with comfort or function of the hat, and it would be more secure than if it were positioned at the sides or on top. We would then have the wires inside the snake attached to the LED's so that they wouldn't be exposed to outside elements and the rubber in the snake will keep the electricity contained. The snake would have to mounted in a removable fashion for maintenance and tweaking purposes.

Week 3:

We made another two brief sketches on how to simplify the hat design, like using less LED's and how to mount the Arduino in other ways since we still don't have a flat brim hat to use.

We are going to purchase a pulse sensor like the one displayed in the video and download the arduino code from makeprojects.com.

We're zeroing in on the details of the project. we've found a pulse sensor made specifically for the arduino for simplicity, as well as its schematic. We will be attempting to build the sensor as well as use the premade one. We're also still doing work on the homemade ekg sensor. We are also on track to find the instrumentation amplifier, also with a schematic for an "in-house" variety.

Pulse sensor: http://pulsesensor.myshopify.com/collections/frontpage/products/pulse-sensor-amped

Schematic: http://pulsesensor.myshopify.com/pages/open-hardware

we decided to create our own pulse sensor from scratch because we assumed that everything that we would need to construct our very on mockup model would not be that hard to find and it turned out to be very much true. This first link shows the specific things we would have to make ourselves if we want to create a pulse sensor https://docs.google.com/a/pulsesensor.com/document/d/1iOZv-ubb-cbfhLEYUawFpGXLxOGqULidrHE5UD5vx9s/edit?pli=1#

Once we got a pretty good idea about the materials needed and the process in which we would have to create the sensor we then looked up different ways to solder and this one seemed like the best fit for this type of miniscule project http://www.youtube.com/user/digikey?v=QRW4gBcsRkY&feature=pyv&ad=5942790449&kw=soldering%20tips

this site helped us to find the designs and layouts for the pulse sensor so that we would have a better understanding of how the sensor actually works http://pulsesensor.com/open-hardware/ this link is the simple shematics to the sensor and it is crucial to this project http://pulsesensor.files.wordpress.com/2012/02/pulsesensor-05-schem.jpg ---

we Found a video that shows the actual inventors of the small light-weight pulse sensor for arduino: http://www.kickstarter.com/projects/1342192419/pulse-sensor-an-open-source-heart-rate-sensor-that This is the only place to purchase it from as they are the only ones who have it. we have also downloaded the arduino sketch from http://makeprojects.com/Project/Beating+Heart+Headband/1622/1#.UHHnspiHKp0

Instrumentation amplifier schematic:

We visited the nursing department to get some information on how EKG pads work. Monique from the nursing faculty provided us with a couple of standard EKG pads to compare with our homemade version. We tested the homemade EKG ad; we couldn't get it to work with a standard EKG machine; it was the wrong machine to use. Later returned to use the proper machine, an arterial pulse oximeter. It worked! The homemade ekg pad read into the machine. This was great progress.









BIOFEEDBACK HELMET Use LEDs from flashing party glasses to connect to an arduino as seen bellow
 * http://www.youtube.com/watch?v=wVBljPK06W4*
 * http://www.amazon.com/Shutter-Shades-Multicolor-Rockstar-Sunglasses/dp/B003ZUNYSC/ref=sr_1_2?ie=UTF8&qid=1381845734&sr=8-2&keywords=FLASHING+LED+RAVE+PARTY+SHADES

Take out the LEDs and connecting wires to connect to a helmet so that it changes color base on sensory input
 * https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Project_parts.jpg/220px-Project_parts.jpg

Program EL Sequencer so that EL wires blink in different sequences/pattern
 * /program/

Design
BIOFEEDBACK HELMET Part of the project was to use a flashing party classes and figure out how there are connected. We open the glasses, took out the LEDs connected to the wires and control switch, Printed a heart from the class makerBot and put the LEDs inside. We then tried to turn on the switch to see if the LEDs will glow. this have not work and we are still trying to figure out why

Base has batteries, logic, on/off, lights, and fan.

Headset has batteries, logic, and on/off.

Other parts were figuring out how to recharge LiPo battery which can be found in https://en.wikiversity.org/wiki/User:Kshew12/ENES-100/project_2:_BioFeedback

Soldering FTDI basic onto EL sequencer in order to connect it to the computer

=Implement= BIOFEEDBACK PROJECTS Promote the students interest in Biotechnology along the line with engineering

To raise an awareness of Engineering club by producing cool and attracting devices.

=Operate= BIOFEEBACK SNAKEHAT

/* >> Pulse Sensor Amped << This code is for Pulse Sensor Amped by Joel Murphy and Yury Gitman www.pulsesensor.com >>> Pulse Sensor purple wire goes to Analog Pin 0 <<< Pulse Sensor sample aquisition and processing happens in the background via Timer 1 interrupt. 1mS sample rate. PWM on pins 9 and 10 will not work when using this code! The following variables are automatically updated: Pulse :    boolean that is true when a heartbeat is sensed then false in time with pin13 LED going out. Signal :   int that holds the analog signal data straight from the sensor. updated every 1mS. HRV :      int that holds the time between the last two beats. 1mS resolution. BPM :      int that holds the heart rate value. derived every pulse from averaging previous 10 HRV values. QS :       boolean that is made true whenever Pulse is found and BPM is updated. User must reset.

This code is designed with output serial data to Processing sketch "PulseSensorAmped_Processing-xx" The Processing sketch is a simple data visualizer. All the work to find the heartbeat and determine the heartrate happens in the code below. Pin 13 LED will blink with heartbeat. It will also fade an LED on pin 11 with every beat. Put an LED and series resistor from pin 11 to GND

See the README for more information and known issues. Code Version 0.1 by Joel Murphy & Yury Gitman Summer 2012

// VARIABLES int pulsePin = 0;         // pulse sensor purple wire connected to analog pin 0 int fadeRate = 0;         // used to fade LED on PWM pin 11

// these are volatile because they are used during the interrupt! volatile int BPM;                  // used to hold the pulse rate volatile int Signal;               // holds the incoming raw data volatile int HRV;                  // holds the time between beats volatile boolean Pulse = false;    // true when pulse wave is high, false when it's low volatile boolean QS = false;       // becomes true when pulse rate is determined. every 20 pulses

void setup{ pinMode(13,OUTPUT);   // pin 13 will blink to your heartbeat! pinMode(11,OUTPUT);   // pin 11 will fade to your heartbeat! Serial.begin(115200); // we agree to talk fast! interruptSetup;     // sets up to read Pulse Sensor signal every 1mS // UN-COMMENT THE NEXT LINE IF YOU ARE POWERING THE PulseSensor AT LOW VOLTAGE, // AND APPLY THAT VOLTAGE TO THE A-REF PIN //analogReference(EXTERNAL); }

void loop{

sendDataToProcessing('S', Signal);  // send Processing the raw Pulse Sensor data if (QS == true){                    // Quantified Self flag is true when arduino finds a heartbeat fadeRate = 255;                   // Set 'fadeRate' Variable to 255 to fade LED with pulse sendDataToProcessing('B',BPM);    // send the time between beats with a 'B' prefix sendDataToProcessing('Q',HRV);    // send heart rate with a 'Q' prefix QS = false;                       // reset the Quantified Self flag for next time }

ledFadeToBeat; delay(20);                         //  take a break

}

void ledFadeToBeat{ fadeRate -= 15;                        //  set LED fade value fadeRate = constrain(fadeRate,0,255);  //  keep LED fade value from going into negative numbers! analogWrite(11,fadeRate);              //  fade LED }

void sendDataToProcessing(char symbol, int data ){ Serial.print(symbol);     // symbol prefix tells Processing what type of data is coming Serial.println(data);     // the data to send }

Next Steps
BIOFEEBACK HELMET Fix all the splicing of EL wires that do light up when voltage is apply to it. [ Perhaps we can order more ]

Find new power source for EL sequencer so that when more than 3 of the EL wires are connected, they do not lose their brightness

Create a new program that alternates different EL wires.

Replace the logic boards inside of base and headset with arduinos

BIOFEEDBACK SNAKE HAT The hat design would have to be finalized and the programs should be retested to make sure that they still work. The next step would be to work out the bugs with the pulse sensor and find out how to convert the pulse blink into a signal to light up LEDs based on the speed of the heart pulse. A faster pulse should light up a different color as opposed to a slower pulse. Then, all the pieces would have to be brought together to build a prototype.