scieee AI-readable full text Open interactive document viewer

Repositorio Institucional de Documentos

Abstract

Focus meditation has been proven to reduce stress, which according to American Psychological Association, 77% of the US population experienced in 2014. The Lotus, a meditation training device, will read brain signals and provide real time feedback to help a person meditate. The Lotus software package acquires and process brain signals to determine when the user has entered a meditative state. The signals were then output to a controller that varies the intensity of LED lights and movement of the lotus. This will, through neurofeedback, train the user to more effortlessly enter the meditative state. The brain signals present in meditating patients were studied and the lotus, as well as the software, were designed and calibrated to ensure optimal feedback. Moya García, Beatriz; Simpkins, C. Alexander

Full text

1" " Lotus"Meditation"Assistive" Device"Using"EEG"to" Measure"State"of"Mind" " " Maricruz Carrillo, Roman Huizar, Jordan Lenoir, Beatriz Moya Garcia, Diego Wright" Table of Contents Project Management 3 Ideation 13 Chosen Project 16 Background Research 18 Electroencephalography (EEG) 30 Selection of EEG Machine 47 Programming 42 Design 65 Finances 130 Conclusion 131 Appendix 132 3" " PROJECT MANAGEMENT" " " 4" " Figure''SEQ'Figure'\*'ARABIC'1.'Team'availability'for'Spring'2015" " Organizing the team" Finding a meeting time when all team members were available was one of the most challenging tasks at the beginning of the semester. The spreadsheets seen below, showing work and school hours in blue, allowed us to visually identify a time that worked for everyone. The spreadsheet below is an example of how we organized it and the same format was used for Fall 2014." " " " " " " 5" " " Organizing the tasks: Task Manager in Excel." The task manager includes a column for task description, person responsible, due date and status. If the status is ‘In Progress’ after the due date, it is marked late and the person responsible is contacted." " Ite m" Task" Person Responsible" Due Date" Status" Late" 1" Talk to psychologists to introduce project " Team" 11/6/2014" Complete" NO" 2" Coordinate with Simpkins to meet the machine" Simpkins" 11/20/2014" Complet e" NO" 3" Fill in Focus Meditation section of Research doc (Dr.Simpkins' book)" Diego" 11/17/2014" Complet e" NO" 4" Fill in Focus Meditation section of Research doc (Dr.Simpkins' book)" Roman" 11/17/2014" Complet e" NO" 5" Fill in EEG input & output section of Research doc" Jordan" 11/17/2014" Complet e" NO" 6" Fill in EEG input & output section of Research doc" Bea" 11/17/2014" Complet e" NO" 7" Fill in Brainwave section of Research doc" Mari" 11/17/2014" Complet e" NO" 8" Have 5 different prototype ideas for the physical machine" Team" 11/20/2014" Complet e" NO" 9" Analyze (or try at least) EEG data" Bea" 12/16/2014" Complet e" NO" 10" Create small prototype with arduino to demonstrate what the will do" Diego" 11/25/2014" Complet e" NO" 11" Collect all emails to compose the design notebook" Jordan" 12/14/2014" Complet e" NO" 12" Reorganize and add details to Timeline " Mari" 12/14/2014" Complet e" NO" 13" Come up with code to make Matlab communicate with Arduino" Diego" 12/15/2014" Complet e" NO" 14" Finalize poster slides " Jordan" 12/15/2014" Complet e" NO" 15" Print out poster" Roman" 12/17/2014" Complet e" NO" 16" Discuss description of project for poster fair" Team" 12/16/2014" Complet e" NO" 16" Put together the design notebook" Bea/Mari" 12/18/2014" Complet e" NO" 17" Create finance spreadsheet to record our expenses" Mari" 12/30/2014" Complet e" NO" 6" " 18" Find alternatives for EEG Machine" Team" 1/31/2015" Complet e" NO" 19" Purchase NeuroSky mindwave EEG " Mari" 1/31/2015" Complet e" NO" 20" Set up NeuroSky and figure out how to connect to Arduino" Diego" 3/30/2015" Complet e" NO" 21" Order supplies needed to send to Puebla" Jordan" 3/10/2015" Complet e" NO" 22" Create Solidworks model for petal" Bea" 3/19/2015" Complet e" NO" 23" Create Solidworks model for lifting mechanism" Mari" 3/19/2015" Complet e" NO" 24" Create Solidworks model for Base" Roman" 3/19/2015" Complet e" NO" 25" Write Arduino sequence" Jordan" 4/20/2015" Complet e" NO" 26" Test Arduino code" Jordan" 4/20/2015" Complet e" NO" 27" Print parts" Mari/Bea" 4/17/2015" Complet e" NO" 28" Finish poster draft" Team" 4/12/2015" Complet e" NO" 29" Write draft design notebook" Team" 4/19/2015" Complet e" NO" 30" Finish final poster" Roman/Jordan" 4/20/2015" Complet e" NO" 31" Print final poster" Diego" 4/22/2015" Complet e" NO" 32" Finalize compilation of Design notebook" Mari" 5/10/2015" Complet e" NO" 33" Prepare final presentation draft" Team" 4/19/2015" Complet e" NO" 34" Incorporate draft presentation comments to final presentation" Mari" 4/27/2015" Complet e" NO" " " " " " " " " " 8" " " High-level Timeline: The timeline was continuously changing throughout the length of the project. A Microsoft Word document was kept and revised periodically. All timeline revisions are seen below." " " Timeline"(Initial)" November(10th,(2014" Meditation"device"using"EEG"will"help"people"meditate"by"providing"them"neurofeedback"to"attain"a"meditative" brain"state."This"will"help"people"with"stress,"ADHD,"PTSD." ● November" ● Meet"the"machine" ● Talk"to"psychologists" ● Group/individual"meditation" ● Understand"output"of"EEG" ● Research"meditation"–"How/why"it"helps?" ● Understand"different"brain"waves" ● Research"code" ● Plan"“crude”"prototype"meditation"device" ● Financial"plan" ● December" ● Build"“crude”"prototype"meditation"device" ● Build"alpha"code" ● Test"prototype" ● January" ● Plan"final"design" ● Beta"version"of"code" ● February" ● Build"final"meditation"machine" ● March" ● Synchronize"code"with"machine" ● Extensive"testing,"refinement,"debugging" ● April" ● Write"Report" ● May" ● Present" " " " " " " 9" " " Timeline"(Rev"A)" December(10th,(2014" Project:"Using"EEG"signals"to"provide"neural"feedback"during"meditation"for"training"purposes" Purpose:"Help"people"meditate"by"providing"them"real`time"neurofeedback"to"attain"a"meditative"brain"state." This"will"help"people"with"stress,"ADHD,"PTSD." ● November" ● Talk"to"psychologists"(completed)" ● Group/individual"meditation"(completed)" ● Understand"output"of"EEG"(completed)" ● Research"meditation"–"How/why"it"helps?"(completed)" ● Understand"different"brain"waves"" ● Research"code"needed"for"arduino"(completed)" ● Plan"“crude”"prototype"meditation"device"(completed)" ● " ● December" ● Build"“crude”"prototype"meditation"device"(completed)" ● Test"prototype" ● Financial"plan"" ● January" ● Meet"the"machine"(delayed)" ● Plan"final"design" ● Build"alpha"code"" ● February" ● Build"final"meditation"machine" ● Synchronize"code"with"machine" ● March" ● Extensive"testing,"refinement,"debugging" ● April" ● Write"Report" ● May" ● Prepare"presentation" ● Present" " " " 10" " " Timeline"(Rev"B)" February(16th,(2015" Project:"Using"EEG"signals"to"provide"neural"feedback"during"meditation"for"training"purposes" Purpose:"Help"people"meditate"by"providing"them"real`time"neurofeedback"to"attain"a"meditative"brain"state." This"will"help"people"with"stress,"ADHD,"PTSD." ● November" ● Talk"to"psychologists"(completed)" ● Group/individual"meditation"(completed)" ● Understand"output"of"EEG"(completed)" ● Research"meditation"–"How/why"it"helps?"(completed)" ● Understand"different"brain"waves"" ● Research"code"needed"for"arduino"(completed)" ● Plan"“crude”"prototype"meditation"device"(completed)" ● " ● December" ● Build"“crude”"prototype"meditation"device"(completed)" ● Financial"plan""(completed)" ● January" ● Order"the"machine"(completed)" ● Plan"final"design"(completed)" ● February" ● Write"Alpha"code"" ● Complete"Solid"Works"models" ● March" ● Synchronize"code"with"machine"" ● Print"parts" ● Extensive"testing,"refinement,"debugging" ● April" ● Build"final"meditation"machine" ● Write"Report" ● May" ● Prepare"presentation" ● Present" " " " " 17" " " Project: Using EEG signals to provide positive neural feedback during meditation for training purposes." " Sponsors: Dr. Alex Simpkins (mentor) and Dr. Kee Moon (financial support)" " Background: According to American Psychological Association, 77% of the US population experienced significant stress in 2014. Stress have been quoted as being the number one killer in America, and although this is not proven, the adverse effects of stress have been studied and have proven to be significant. Meditation has proven to be effective in treating stress. " " Problem: Many people do not know how to meditate" " Solution: Create a meditation training device to help new users get to a meditative state by using positive feedback using real time EEG signals. " " Initial Goals:" ● To create an intuitive device to train people into becoming better at meditating" ● Give visual feedback based on brain wave activity" ● Clear / Easy to use " ● Advance meditation research " ● More effective meditation " ● Aid mental health through meditation " " The topic of brain waves and meditation was a new topic for everyone in the team, therefore, extensive research was necessary to get a good insight on how the brain works and how meditation works, as well." " " " " 18" " " " " " " " " " " BACKGROUND RESEARCH" " " 19" " " Google Doc- Background Research" " Beatriz, Diego, Roman, Jordan, Maricruz" " http://store.neurosky.com/products/developer-tools-2-5" " http://sccn.ucsd.edu/~arno/fam2data/publicly_available_EEG_data.html" " http://www.mathworks.com/company/newsletters/articles/eeg-data-processing- and-classification-with-gbsanalyze-under-matlab.html" " Signal processing" " https://www.youtube.com/watch?v=3tdumuwHgxc" " https://www.youtube.com/watch?v=r3xup1GamDs" " Focus Meditation (How/What/When/Why/Where)" Look at page 58 " Notes from Meditation: from thought to action" Yoga" Philosophy of higher consciousness and a system of guidelines for living. Came from India, backdrop of Hinduism. It is a progressive sequence of methods of concentration that results in higher states of consciousness and healthier body. Originally yoga was written by Patanjali approx. 200 B.C." It is divided by Eight Limbs of Yoga" Yama: Delineates actions prohibitions against immoral actions (e.x. killing, stealing, lying)" Niyamas: Instructs people to be modest, tolerant, sincere, clean, and healthy" Asana: Encourages to perform yogic postures and exercises" Pranayama: Breathing techniques" Pratyahara: Accomplished by focusing disciplined attention and attaining self-control" Dharana: Intense concentration" Samadhi: Spiritual enlightenment" " Many forms of yoga have then erected from back then" E.x.- Hatha Yoga: mostly focuses on body postures, healthy diet, and cleanliness [most familiar to westerners]" Buddhism" Philosophy that originated in India around the 6th century" Sees that evil and suffering derive from the ignorance we carry in our minds" Founder Siddhartha Gautuama discovered enlightenment [nirvana] through meditation" Buddha’s answer to suffering" Four noble truths: Illness, pain, failure, and eventual death are ever present" 20" " Life is not hopeless because the cause of suffering derives from our own thinking" Craving for possessions, power, position, or other pleasures are bonded to suffering" True happiness comes from being free from desires and from Wisdom" Path to wisdom: Eightfold path" Right views, right aspirations, right speech, right behavior, right livelihood, right effort, right thoughts, and right contemplation" Early adopters [elders] took strict discipline and took themselves out of society" Mahayana Buddhism: similar to early Buddhism but viewed that helping out other, especially in achieving nirvana, was very important" No-self" Self-identity is an illusion" Source of suffering" Contradictory to western views" Solution is to base society on no-self {bit confusing, need to look more into tha}" Self cannot be categorized and in doing so we limit ourselves by our illusion of who we are" “no-self” is achieved through meditation" Emptiness: Synonymous to no-self" The world is in constant change, nothing ever is, but nothing is not, either" Emptiness is in the middle, between two extremes" Moderation: Emptiness should not be conveyed as emptiness but in nonduality [not being two separate things]" Suchness: reality of our world without superimposing our own interpretations" " There are slightly different ways in which object focused meditation can be done, but it is easier to do it as follows:" ● do breath counting meditation to stabilize the mind as a prelude to moving the attention outward to the external object" ● once the mind is calm and present, open your eyes and study the object" ● observe every detail in a non-discursive way" ● notice how light falls on the object - does it induce any changes in its texture or colour" ● how sharp are the lines of its edges" ● is the object's surface rough or smooth" ● simply observe and refrain from putting labels on what you see" - See more at: http://www.do-meditation.com/object-focused- meditation.html#sthash.OWVMizBS.dpuf" " " " " 21" " EEG input" It is a non-invasive way to observe brain activity. EEG is based on measuring postsynaptic potentials of neurons with electrodes." Those electrodes can be attached to the subject's scalp, subdurally (beneath the dura matter; the outermost, toughest and most fibrous of three membranes covering and protecting the brain and the spinal cord), or even on the cortex itself (these later two cases are relatively rare)." EEG potentials are measured as the difference between two points, one on the scalp where EEG effects are strong and one (the reference electrode) hopefully isolated from these effects. " " " PHYSIC PRINCIPLE: This method is based on the theory of volume conduction of ionic current through non-empty extracellular space." Electrodes measure the sum of the activity of all the neurons in the surface below them. Usually, a conductive gel is used to create a better contact. " EEG records voltage differences across low resistance extracellular space. Generally, it measures potentials of pyramidal cells because: They have strong enough potentials to be detectable (ex: neurons are asynchronous and too fast-moving to generate measurable signals), they are oriented in parallel and their dendrites run perpendicular to the cortical surface. Dipoles are created when a pyramidal cell in the cortex receives stimulation from surrounding neurons; the dipole results in a recordable electrical field or potential. Depending on the orientation of the combined dipoles, the potential recorded at the scalp is either positive or negative" 22" " " " " 23" " " Pyramidal cell" " The machine records the signals and works as both an amplifier and as a galvanometer, and signals are amplified 10,000 times (the rapid drop in potential combined with the large resistance of the scalp, skull and cerebrospinal fluid surrounding the brain results in a measured scalp potential that is very small)." " Points where electrodes are placed." " ADVANTAGES OF EEG: " ● continuous recording with split second accuracy" ● It indicates the general conscious state of a person, useful for measuring answer under a stimuli, assess brain damage or sleep research." DISADVANTAGES OF EEG:" EEGs is limited in that they do not reveal brain structures or anatomy, nor can they indicate the functioning of specific brain structures." " http://www.csulb.edu/~cwallis/482/eeg/eeg.html" https://www.youtube.com/watch?v=86zIa3pGM50" https://www.youtube.com/watch?v=YtbP8klTBZ0" http://www.psych.nmsu.edu/~jkroger/lab/EEG_Introduction.html" " Other explanations just in case:" Galvanometers are instruments that detect and measure small electric currents by means of a copper hoop or coil of wire that deflects a needle proportionate to the current flowing through the coil. The galvanometers are in turn hooked up to pens, which trace the electrical signals on graph paper moving continuously underneath them." " 24" " EEG output" ● there is general info of brain waves in this link: http://www.csulb.edu/~cwallis/482/eeg/eeg.html( ● I’ve uploaded the textbook “EEG Signal Processing (Sanie, Chambers) to the Google Drive folder “Reference Material.” It is a lengthy and thorough text. Below are the chapters to give you an idea of what is covered. I will skim it tomorrow and after we talk to Simpkins about his EEG code, we can focus on the relevant section(s)." o Ch 1 - Introduction to EEG (p1)" o Ch 2 - Fundamentals of EEG Signal Processing (p35)" o Ch 3 - Event-Related Potentials (p127)" o Ch 4 - Seizure Signal Analysis (p161)" o Ch 5 - EEG Source Localization (p197)" o Ch 6 - Sleep EEG (p219)" o Ch 7 - Brain-Computer Interfacing (p239) " ● Typical EEG signal in adult (EEG signal Processing, Sanei, p18)" o " ● From skimming over textbook and graphs (and talking with Prof May-Newman) it seems we will be able to extract signal amplitude and frequency" " " " " 25" " Brain waves (during meditation)" Alpha Brain Waves (I believe these are the ones we will focus on)" ● 8-12 Hz" ● This brain wave indicates a relaxed state of mind.. State of relaxed alertness, good for inspiration and learning facts fast. A meditative mind. In this state tap into internal “antenna” like qualities. Visions, powerful ideas, mindless creation of the incredible. Internal feeling & sensations. " " Theta Brain Waves (We might be interested in these... It looks like these waves land in the unconscious/subconscious realm so maybe they don’t apply to what we want.)" ● 4 to 8 cycles per second Deep meditation. Deep inward thought. This is associated with life-like imagination. High state of mental concentration. A magical mind. Internal pictures / visualisation. Intuition, inner guidance. Access to unconscious material. Dreaming." 4.5 Hz - Brings about Shamanic/Tibetan state of consciousness, Tibetan chants." 4.9 Hz - Induce relaxation and deeper sleep" 4.9 Hz - Introspection. Relaxation, meditation" 5 Hz - Reduces sleep required. Theta replaces need for extensive dreaming" 5.35 Hz - Allows relaxing breathing, free and efficient" 26" " 5.5 Hz - Inner guidance, intuition" 6.5 Hz - Centre of Theta frequency. Activates creative frontal lobe" 7.5 Hz - Activates creative thought for art, invention, music. Problem solving" 7.5 Hz - Ease of overcoming troublesome issues" 7.83 Hz - Schumann earth resonance. Grounding, meditative, Leaves you revitalized" 3 - 8 Hz - Deep relaxation, meditation. Lucid dreaming" 3 - 8 Hz - Increased memory, focus, creativity" 4 - 7 Hz - Profound inner peace, emotional healing. Lowers mental fatigue" 4 - 7 Hz - Deep meditation, near-sleep brainwaves" " " " Prototype (concepts)" " I came across this. It’s a 3d printed led ball. We could program the ball to stay still and have the lights do cool stuff. http://imgur.com/a/xwP0I" " Choosing a visual object as your object of meditation." For the purpose of taming the mind, it is best to pick a neutral object – one that you don’t have strong opinions about and one that does not arouse strong emotion. (We’ll talk below on different kinds of visible objects.) A rock, a flower or a candle would be fine – not a picture of a loved one or an enemy. Take your meditation posture with the object in front of you. It will be most comfortable for you if the object is slightly below the horizontal plane of your eyes. (If the object is above the horizontal plane, you may find yourself tipping your head back to see the object, and developing a neck tension as a result.)" https://badlamaguide.wordpress.com/2012/09/10/meditating-on-visual-objects/ " " Colors for Relaxation" Blue: calming, sedative effect, and can actually cause the body to become cooler." Green: said to lessen depression, anxiety, and nervousness by soothing and refreshing." Purple: can be very relaxing depending on tone; lighter is better." Avoid reds, oranges and yellow." http://stress.lovetoknow.com/Colors_for_Relaxation " " " " " " " " " " " " " " " 33" " SIGNAL PROCESSING" Potential signal processing procedure per the following guide: Pre-processing for EEG and MEG by Przemek Tomalski & Kathrin Cohen Kadosh." Some experimental runs where performed to get familiar with the processing process, depicted below." " " 34" " 35" " 36" " 37" " " 38" " " 39" " " 40" " " 41" " " 42" " " 50" " PROGRAMMING" " " " " " " " " " The data analysis process and programming is illustrated in the following flow chart:" " " " Meditation Value" The communication between the EEG headset and computer was done via socket communication. The ThinkGear Communication driver was given by the headset manufacture to aid in the development of applications for the headset. The ThinkGear communication took care of the bluetooth communication and rerouted all the output from the headset in a JSON object via IP socket protocols. All of the code was done in Processing, a program that allows for easy GUI creation as well as easy access to Arduino. Processing uses a form of javascript language as its code. " 51" " In order to connect to the headset, a socket had to be opened at the IP address : 127.0.0.1 " " "//"Connect"to"ThinkGear"socket"(default"="127.0.0.1:13854)" """""String"thinkgearHost"=""127.0.0.1";" """""int"thinkgearPort"="13854;" """" "" """""String"envHost"="System.getenv("THINKGEAR_HOST");" """""if"(envHost"!="null)"{" """""""thinkgearHost"="envHost;" """"" }" """""String"envPort"="System.getenv("THINKGEAR_PORT");" """""if"(envPort"!="null)"{" """"""""thinkgearPort"="Integer.parseInt(envPort);" """"" }" """""println("Connecting"to"host"="""+"thinkgearHost"+"","port"="""+"thinkgearPort);" """""myClient"="new"Client(this,"thinkgearHost,"thinkgearPort);" """""String"command"=""{\"enableRawOutput\":"false,"\"format\":"\"Json\"}\n";" """""print("Sending"command");" """""println"(command);" """""myClient.write(command);" """""" Once the connection had been established, the EEG would send the data in a JSON object. JSON stand for javascript object notation. It is a simple way to send an array of information. " " " " This is an example of how the data is received:" 52" " //"Sample"JSON"data:" "" //{"eSense":{"attention":91,"meditation":41},"eegPower":{"delta":1105014,"theta":211310,"lowAlpha ":7730,"highAlpha":68568,"lowBeta":12949,"highBeta":47455,"lowGamma":55770,"highGamma":282 47},"poorSignalLevel":0}" The data then had to be split between each of the different channels. This is done by parsing the JSON object. " String"data"="myClient.readString();" "try"{" """JSONObject"json"="new"JSONObject(data);"//<>//" "" "" """channels[0].addDataPoint(Integer.parseInt(json.getString("poorSignalLevel")));" "" "" """JSONObject"esense"="json.getJSONObject("eSense");" """if"(esense"!="null)"{" """""channels[1].addDataPoint(Integer.parseInt(esense.getString("attention")));" """""channels[2].addDataPoint(Integer.parseInt(esense.getString("meditation")))" """ }" "" "" """JSONObject"eegPower"="json.getJSONObject("eegPower");" """if"(eegPower"!="null)"{" """""channels[3].addDataPoint(Integer.parseInt(eegPower.getString("delta")));" """""channels[4].addDataPoint(Integer.parseInt(eegPower.getString("theta")));" """""channels[5].addDataPoint(Integer.parseInt(eegPower.getString("lowAlpha")));" """"" channels[6].addDataPoint(Integer.parseInt(eegPower.getString("highAlpha")));""" """""channels[7].addDataPoint(Integer.parseInt(eegPower.getString("lowBeta")));" """""channels[8].addDataPoint(Integer.parseInt(eegPower.getString("highBeta")));" """""channels[9].addDataPoint(Integer.parseInt(eegPower.getString("lowGamma")));" """""channels[10].addDataPoint(Integer.parseInt(eegPower.getString("highGamma")));" " The data we were interested was in" :channels[2].addDataPoint(Integer.parseInt(esense.getString("meditation")))" This channel gave us the Mediation score given off by the Mindwave. " 53" " That meditation score was then added to an array so that the average can be calculated." ● //Set"up"the"average" ● """"""storedValues"="new"float[500];" void"AddNewValue(float"val)" {" ""if(count"<"storedValues.length)" ""{" "//array"is"not"full"yet" "storedValues[count++]"="val;" """"" "sum"+="val;" ""}"else" ""{" sum"+="val;" "sum"`="storedValues[0];" """"" "//shift"all"of"the"values,"drop"the"first"one"(oldest)" "for(int"i"="0;"i"<"storedValues.length`1;"i++)" " {" """storedValues[i]"="storedValues[i+1]";" " }" "//the"add"the"new"one" "storedValues[storedValues.length`1]"="val;" ""}" That score was then converted from a float to an integer and sent to the Arduino via serial." int"med"="int(ave);" myPort.write(med);" The Arduino then reads this score and executes programmed sequences dependent on value. " " 54" " " " " In conclusion, the software worked for the purposes of this project. It took some time to learn the basics of javascript but once the overall concept of how it worked was understood it was easy to make the software work. " " " " 55" " " Communication with Lotus" The Arduino software was used to program the flower’s movement and lighting. The following logic was used:" " IF: user remains in meditative state for specified time" THEN: servo rotates specified degrees (opening lotus) and brightness of LEDs increases using PWM" ELSE: servo (hence the LOTUS) remains in current position " " " " 56" " " 57" " " " " // Title: led_1_brightness //SERVO STUFF #include <Servo.h> Servo myservo;// create servo object to control a servo // a maximum of eight servo objects can be created //LED fade int ledPin = 3;//the Arduino pin that is connected to the LED!int ledPin2 = 5;//the Arduino pin that is connected to the LED #2 int ledPin3 = 6;//the Arduino pin that is connected to the LED #2 int ledPin4 = 11;//the Arduino pin that is connected to the LED #2 int MinValue = 0;!int MaxValue = 0;!int DelayTime = 3000;!int pos = 0;// variable to store the servo position!int MinServo = 0;!int MaxServo = 0;!int IntervalServo = 0;!int DelayBetween = 5000;!int IntervalLED = 0; void setup() { pinMode(ledPin, OUTPUT);// initialize the pin as an output pinMode(ledPin2, OUTPUT);// initialize the pin as an output pinMode(ledPin3, OUTPUT);// initialize the pin as an output pinMode(ledPin4, OUTPUT);// initialize the pin as an output myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { //SERVO TRIAL myservo.write(pos); //SETTING 1 // tell servo to go to position in variable 'pos' MinValue = 1; MaxValue = 4; IntervalLED = (MaxValue-MinValue)/3; IntervalServo = 20/(MaxValue-MinValue); for (pos = 0; pos < 21; pos +=IntervalTimer){ myservo.write(pos); // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } delay(DelayTime/20); } 58" " delay(DelayBetween);// wait one second //SETTING 2 MinValue = 4; MaxValue = 9; IntervalLED = (MaxValue-MinValue)/20; for (pos = 21; pos < 41; pos ++){ myservo.write(pos); // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } delay(DelayTime/20); } delay(DelayBetween);// wait one second //SETTING 3 MinValue = 9; MaxValue = 15; IntervalLED = (MaxValue-MinValue)/20; for (pos = 41; pos < 61; pos ++){ myservo.write(pos); // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } delay(DelayTime/20); } delay(DelayBetween);// wait one second //SETTING 4 MinValue = 15; MaxValue = 22; IntervalLED = (MaxValue-MinValue)/20; for (pos = 61; pos < 81; pos ++){ myservo.write(pos); 59" " // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } delay(DelayTime/20); } delay(DelayBetween);// wait one second //SETTING 5 MinValue = 22; MaxValue = 30; IntervalLED = (MaxValue-MinValue)/20; for (pos = 81; pos < 101; pos ++){ myservo.write(pos); // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } delay(DelayTime/20); } delay(DelayBetween);// wait one second //SETTING 6 MinValue = 30; MaxValue = 42; IntervalLED = (MaxValue-MinValue)/20; for (pos = 101; pos < 121; pos ++){ myservo.write(pos); // move servo MaxValue =round(MinValue + IntervalLED);!for (int brightness=MinValue;brightness<MaxValue;brightness++){ analogWrite(ledPin,brightness); analogWrite(ledPin2,brightness); analogWrite(ledPin3,brightness); analogWrite(ledPin4,brightness); } 66" " INITIAL DESIGN IDEA" At the end of the Fall 2014 semester, the design was an orb. The orb would have LEDs protruding from it that would light up with different intensities and colors depending on the user’s state of mind. A solidworks model was started for that design but, as seen in a later section, the design was later changed completely. Below is half of what the orb would have looked like. " 67" " ACTUAL DESIGN OF THE PARTS " The design of the Lotus was decided in two steps. First, we tried different possible mechanisms and configurations for our flower. Once we decided the best system for the Lotus, we adapted the size to the power limitations of the servo and the assumptions that were made for the movement of the mechanism. Two options were explored for the mechanism connected to the servo that was to move the flower; the rack & pinion and the piston. In addition, two possible designs to move the petals were tested; the “pull-push” system and the linkage mechanism. For the “pull-push” mechanism entails six sticks with curved ends that link the petals to the central pole. When the central pole raises vertically, the sticks push the petals up and they close. When it goes down, it pulls the petals and opens them. On the other hand, the linkage mechanism is a simple system of links that opens the flower when the central pole lifts. Initial configurations PETAL" Prototype petal" " The dimensions of the petal were defined based on the dimensions of the base, so the flower has a proportional size within we can include the mechanism chosen. We decided to make the flower with 6 petal, so each one covers an angle of 60º. It was created following the next steps: 1. Creating four planes, parallel to the top plane, so we can draw the section of the petal at each height to use the Loft tool, which creates a feature by making transitions between profiles, creating organic shapes. Plane 1 is located 45 mm over the top plane (height of maximum distance between flowers), and Plane 2 is located 132.5 mm over the top plane (maximum height of the flower). Plane 4 and 5 are located respectively 45 and 15 mm over the top plane. They are simply used to model the shape of the flower. 68" " 69" " 2. Draw in each plane the section of the flower that the tool Loft is going to follow. The shape of the petal is not relevant in the design, but it is important to define the height and sections of the petal in the planes that we have already defined in order to have enough space within the flower to assemble the mechanism that is going to make the petal move. According to the initial scale freehand designs, these are the sections required for our model: Section at plane #1 70" " Section at plane #2 Section at plane #3 Section at plane #4 Section at plane #5 71" " 3. Use the tool loft to build the petal 4. Add and extrude a cylinder in the petal to assemble the petals with a ring, which will be introduced in the extruded cylinder, with the tool Revolve and Cut Revolve. In addition add fillets with the Fillet tool. 72" " 5 Create plane #6 as a reference for the extruded element to connect the petal with the mechanism at 65 mm from the front plane 73" " 6 Create element with the required dimensions to fit with the mechanism “pull-push” 6.1 Extrude two rectangles, in which we will create the attachment, from the sixth plane. Add Fillets of 5 mm of diameter with the Fillet tool to the connection edges of the rectangle to reinforce them. 74" " 6.2 Extrude a cylinder of surfaces tangent to the extruded rectangles. 75" " 6.3 Extrude a hole, drawn in the front plane, for the hanger of the ring 82" " 3.1.4) Use the tool “Circular pattern” with n= 10 elements, equally spaced, to obtain the final shape of the gear. 83" " Rack The size of the rod used to move the petals through the sticks has been designed according with the dimensions of the petal. 3.2.1) Create a extruded cylinder with the tool Extrude, from a circle drawn in the top plane, which is going to be the rod. 3.2.2) Develop the rack shape following the same dimensions of the pinion to extrude it. 84" " 3.2.3) Use Linear Pattern to complete the rack 3.2.4) Build the connection element between the pole and the stick. 85" " Extrude six squares, perpendicular to the surface ot the cylinder. Extrude circular cylinder at the end of the six extruded squares. 86" " PULL-PUSH MECHANISM Once we add to the petal and the central pole the connection elements to attach both parts to the stick, we only have to build it. 4.1 Create circular section on the front plane. Draw trajectory equivalent to the shape that the stick has. 87" " 4.2 Use Sweep tool to make the circular section follow the trajectory 4.3 Use Mirror tool to end the stick 88" " ASSEMBLIES Design chosen After assembling the parts described before and trying them, we realized that those designs did not function as planned. The petals did not opened as much as expected since their movement were much restrictive than we thought due to the holding system that we chose the petals did not open the amount required to successfully communicate to the user the progress. Also, the “pull-push” mechanism attachment elements and the central pole were difficult to print. Consequently, we had to print more parts, which were fragile, small to print properly, and difficult to glue to the pole again. With the linkage system, we overcame both problems. This system consists of two links which transform the vertical movement of the central pole to horizontal movement, opening the petals when it lifts. The reason we chose the linkage system is because it consists of simple parts, which are easy to print and easy to change dimensions if necessary. Moreover, the flower is held only by a small hinge restricting the movement side to side but not limiting the opening. As a result of these changes, we have easy printable parts, less material and a more efficient system. The system chosen to move the flower was the piston mechanism. The rack and pinion mechanism was discarded because it had a higher probability of failure since the elements were too small and the 3D printer did not have the resolution required to get the accuracy needed for those parts. In addition, the rack and pinion system, due to friction, loses more energy. 89" " The last design change was to make the flower with four petals instead of six. This variation simplifies the flower and makes it easier to print all parts in a timely matter. 1. Piston mechanism a. Crank i. Define size We assumed that the flower was going to open when the piston raised 30mm (1.18 in). ii. Draw profile in the front plane To keep that condition, the center of the holes for the bolts must be separated 13 mm. The diameters of the holes must be 4mm and 5mm for the bolt and servo respectively. iii. Extrude it using the Extrude tool. To make it strong and, at the same time, thin enough, the crank will be 3 mm thick 90" " b. Piston i. Define size. The second assumption for the design is that the cylinder will have diameter 10 mm since we consider it thick enough but not too big to meet the power specifications of the servo. The piston must have length twice the height of the piston support of the base so neither the piston nor the rod hit any other element of the mechanism. So that, the final length must be 50 mm ii. Create thin cylinder to restrict the movement of the piston when it goes down, acts like a bumping post. Extrude a cylinder of diameter 20 mm, drawn in the front plane, 2.5 mm. 91" " iii. Extrude circular section of 9 mm diameter (tolerance of 1 mm so the movement within the base is correct) to create the piston in the front plane, and extrude it in the opposite direction to the cylinder created before.Extrude it with the Extrude tool 50 mm 98" " Add Chamfer at the boundary between the two halves to make it more robust. Use Extrude Cut to create in the part the holes for the bolts. 99" " Use Add Fillet to curve the edge of the thinner half 100" " 1. Linkage system a. Crown i. Draw profile in the top plane 101" " ii. Extrude it 102" " iii. Extrude cut of circles of diameter 2 for the hinge connection at outside elements of the crown . Use Fillet tool for the curved edges b. Internal link i. Draw profile in the top plane 103" " ii. Extrude it 104" " iii. Revolve half spheres for the hinge connection at outside elements.Use Fillet tool for the curved edges 105" " 1. Petal i. Use the same the 5 initial planes to draw the different section. Use Loft tool to create the petal 106" " ii. Create a plane, parallel to the front plane. 107" " iii. Draw a rectangle at the plane just created. Extrude rectangle. 114" " 1. Extrude a empty cylinder, which will be the connection with the Holder cylinder ii. Use Extrude Cut for the piston at the guide cylinder 115" " iii. Add hinge to attach the petal with the base First we create only one side of the hinge to copy it with the tool Mirror and obtain the hinge complete. For the hinge connection, a half sphere of diameter 2 mm is revolved. Then, the tool circular pattern is used to get the 4 hinges for the 4 petals. 116" " iv. Add hole for the LEDs 117" " v. Make a cut at the end of the space between the hinge so the petal does not hit the cover 118" " vi. Add Fillet at the guide cylinder 119" " 1. Holder It was designed to - Make the model more robust and safe material -Built the servo holder in the bottom of the holder cylinder i. Extrude an empty cylinder for the connection between the base and the Holder 120" " 121" " ii. Extrude one support pole Use Circular Pattern to build the final structure 122" " iii. Create a reference plane at the bottom of the support poles 123" " iv. Create servo holder 1. Extrude rectangle for the holder 130" " " " " " " " " Finances The project received it funding from the Engineering Research Center (ERC) for Sensimotor Neural Engineering, a grant given by the National Science Foundation and managed by Professor Dr.Kee Moon. The team was given a budget of one thousand dollars at the beginning of the year. The team kept a record of all expenses in an excel spreadsheet to make sure the expenses did not exceed the allowed budget. Extra precaution was needed given that one of the team members was studying abroad in Mexico for the second semester of the project which led to unexpected expenses such as importation fees and extra shipping costs. Also, the main expense, which was the EEG Headset, was bought twice for the team here because the first one failed to operate after working with it for a while. The total spent was $669.22, which is well below the budget given. All expenses are tabulated below and receipts for all transactions are attached in the appendix. Item Purchaser Supplier Total NeuroSky EEG Headset Mari Amazon 89,36 Sparkfun Logic controlller Diego Sparkfun 6,96 Acetone Mari SDSU Pharmacy 2,00 Nuts and Bolts Mari Home Depot 2,25 Neurosky EEG Headset (bluetooth) Diego Amazon 108,76 MindWave Dongle Diego Amazon 21,59 Supplies/Fees for member abroad Jordan Multiple 438,3 Total 669,22 The costs due to having a member studying abroad are tabulated below: Product Price Currency Final Price (USD) Mindwave EEG 90,70 USD 90,70 Shipping for Mindwave EEG 336,54 MXN 23,21 Import Taxes (16%) for Mindwave EEG 14,51 USD 14,51 Newark (Arduino Kit, LEDs, PWN chip) 237,77 USD 237,77 Import Fees for Newark 333,20 MXN 22,98 Adafruiti 24 Channel PWM LED Driver 39,16 USD 39,16 Import Fees Adafruit LED Driver 144,53 MXN 9,97 TOTAL COST 438,30 Conversion (Buy Rate) 14,50 131" " CONCLUSION" " " " " " " The goals set at the beginning of the project were met. The team created a device, the LOTUS, which provides visual feedback to the user while meditating. The team was able to make the EEG signals reach a computer, communicate with Arduino and, in turn, communicate with the flower. " " Unexpected issues encountered:" ● All 3D printers available malfunctioning" ● Original EEG Headset failure" ● EEG Headset used required software that was unfamiliar to team" ● Lack of documentation online on ThinkGear program " ● Proprietary information" " Recommendations for the future:" ● Add ability to record data to log meditation sessions" ● Include health metrics (e.g. heart rate) to illustrate improvement" ● Improve aesthetics of lotus" ● Make design more compact for easy transportation" ● Connect to mobile device rather than laptop " " " " Appendix Shipping fees Import fees