{"id":524,"date":"2021-12-28T16:36:30","date_gmt":"2021-12-28T15:36:30","guid":{"rendered":"https:\/\/spotonfun.pl\/?p=477"},"modified":"2021-12-28T21:25:28","modified_gmt":"2021-12-28T20:25:28","slug":"project-arduino-device-for-biofeedback-science-meditation-part-1","status":"publish","type":"post","link":"https:\/\/spotonfun.pl\/index.php\/en\/2021\/12\/28\/project-arduino-device-for-biofeedback-science-meditation-part-1\/","title":{"rendered":"Arduino Project &#8211; Biofeedback Device &#8211; Learning Meditation &#8211; Part 1 &#8211; Introduction"},"content":{"rendered":"<p>Lately, I&#8217;ve been very interested in hypnosis (and self-hypnosis), meditation, spirituality and such topics that seem to be detached from the hard, scientific reality. However, it turns out that they are not as detached as I thought. There are devices that measure brain waves and can show when we are in the phase of concentration, meditation, thinking and even stress. Of course, the very knowledge of which waves are responsible for which state of our consciousness is nothing new, but the fact that you can already check it at home is quite new. In addition, there is quite a bit of research on brainwave and imagination\/visualization in the context of applying it as control of artificial limbs. Imagine a prosthetic hand controlled by a man only by the imagination that his hand takes a cup and puts it to his mouth in order to drink a tea&#8230;. Fantastic! However I want to focus on the more metaphysical element &#8211; that is, meditation and other states of consciousness (in particular, I am interested in theta waves).<\/p><p>Because I like to do various DIY (generally create various &#8222;handy stuff&#8221; and not only) &#8211; I decided to launch a new project entitled &#8222;Biofeedback device &#8211; meditation learning&#8221;. I assume that I will do most things myself and of course use generally available examples, blogs, documentation, etc.<\/p><style>.wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75, .wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75[data-kb-block=\"kb-adv-heading_8ff238-75\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75[data-kb-block=\"kb-adv-heading_8ff238-75\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_8ff238-75[data-kb-block=\"kb-adv-heading_8ff238-75\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading_8ff238-75 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_8ff238-75\">Main assumptions of the project<\/h2><style>.wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e, .wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e[data-kb-block=\"kb-adv-heading_c66931-7e\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e[data-kb-block=\"kb-adv-heading_c66931-7e\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_c66931-7e[data-kb-block=\"kb-adv-heading_c66931-7e\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h5 class=\"kt-adv-heading_c66931-7e wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_c66931-7e\">Project objective<\/h5><p>Construct a device that supports the learning of meditation, concentration and entering the theta state.<\/p><style>.wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da, .wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da[data-kb-block=\"kb-adv-heading_96c0da-da\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da[data-kb-block=\"kb-adv-heading_96c0da-da\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_96c0da-da[data-kb-block=\"kb-adv-heading_96c0da-da\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h5 class=\"kt-adv-heading_96c0da-da wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_96c0da-da\">MVP version (minimum valuable product, prototype):<\/h5><ul class=\"wp-block-list\"><li>Arduino-based device<\/li><li>Equipped with sensors: EEG, pulse meter, saturation meter, gyroscope<\/li><li>Computer application to show measurement results<\/li><li>Connectivity via USB serial port (or Bluetooth, if I will manage to do it :D)<\/li><li>Everything placed on a band, e.g. made of velcro<\/li><li>Battery powered<\/li><\/ul><style>.wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6, .wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6[data-kb-block=\"kb-adv-heading_b3953a-e6\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6[data-kb-block=\"kb-adv-heading_b3953a-e6\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_b3953a-e6[data-kb-block=\"kb-adv-heading_b3953a-e6\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h5 class=\"kt-adv-heading_b3953a-e6 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_b3953a-e6\">Version 1 (further development):<\/h5><ul class=\"wp-block-list\"><li>Additional sensors: noise, twilight, maybe a button to record subjective &#8222;other states of consciousness&#8221;<\/li><li>Computer application extended with Machine Learning (pattern search &#8211; that&#8217;s why you need a button for subjective &#8222;other states of consciousness&#8221;)<\/li><li>Power supply changed to Li-On batteries with charging module<\/li><\/ul><style>.wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b, .wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b[data-kb-block=\"kb-adv-heading_25a780-0b\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b[data-kb-block=\"kb-adv-heading_25a780-0b\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_25a780-0b[data-kb-block=\"kb-adv-heading_25a780-0b\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h5 class=\"kt-adv-heading_25a780-0b wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_25a780-0b\">Version 2:<\/h5><ul class=\"wp-block-list\"><li>Desktop application using Machine Learning results<\/li><li>Velcro band replaced with a 3D printed plastic band<\/li><\/ul><style>.wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1, .wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1[data-kb-block=\"kb-adv-heading_f160db-f1\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1[data-kb-block=\"kb-adv-heading_f160db-f1\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1 img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_f160db-f1[data-kb-block=\"kb-adv-heading_f160db-f1\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h5 class=\"kt-adv-heading_f160db-f1 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_f160db-f1\"> Version 3: <\/h5><ul class=\"wp-block-list\"><li>Mobile application &#8211; scope to be defined later<\/li><li>RTC module<\/li><li>GPS module<\/li><\/ul><p>As you can see &#8211; the project is quite &#8222;scalable&#8221; and ambitious. I&#8217;m curious where I will get stuck for the first time \ud83d\ude00<\/p><style>.wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e, .wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e[data-kb-block=\"kb-adv-heading_4a5887-3e\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e[data-kb-block=\"kb-adv-heading_4a5887-3e\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading_4a5887-3e[data-kb-block=\"kb-adv-heading_4a5887-3e\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<h2 class=\"kt-adv-heading_4a5887-3e wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading_4a5887-3e\">MVP version &#8211; necessary elements, budget<\/h2><p> Let&#8217;s get to work! Some of the necessary elements I already have at home, because my spouse &#8222;played&#8221; with Arduino earlier. So, a small inventory check:<\/p><ul class=\"wp-block-list\"><li>Arduino &#8211; I have a version UNO. For a start, it is enough. However, ultimately I will need something smaller, because the band will be worn on the head &#8211; it can not weigh too much (the batteries are to be the heaviest here) &#8211; so the Arduino Nano will need to be ordered.<\/li><li>Prototype board for Arduino &#8211; check ok<\/li><li>Prototyping cables &#8211; check ok<\/li><li>Sensors for Arduino:<ul><li>Gyroscope &#8211; I have GY-521 &#8211; check ok<\/li><li>Heart rate monitor and saturation &#8211; there is only a heart rate monitor, so to order a heart rate monitor with a saturation monitor &#8211; check NOK<\/li><li>EEG &#8211; as it turns out, the most expensive element &#8211; I do not have it, so I need to order it (from China, so I will also wait for it the longest) &#8211; I will order a ready-made set &#8211; TGAM sensor, 3 electrodes with cables (ready to connect to my project) &#8211; check NOK<\/li><\/ul><\/li><li>Bluetooth module &#8211; I do not have, need to order &#8211; check NOK<\/li><li>&#8222;Cube&#8221; for the battery to power &#8211; one will come with an EEG sensor, but I also have another; besides, at the beginning the power supply will be after USB anyway &#8211; check OK<\/li><li>Velcro for the band &#8211; I have, I also like to sew so mini-pasmenteria for me equipped \ud83d\ude1b &#8211; check OK<\/li><li>USB cable for connecting Arduino to a computer &#8211; check OK<\/li><\/ul><p> Budget summary:<\/p><figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\">Element<\/th><th>Indicative price<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">Arduino nano<\/td><td>19 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Prototype board &#8211; contact with cables<\/td><td>13 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">GY-521 gyro module<\/td><td>8 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Pulse heart rate monitor module MAX30102<\/td><td>19 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">EEG kit (TGAM module + electrodes with cables + battery box)<\/td><td>300 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Bluetooth 3.0 module JDY-31<\/td><td>13 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Velcro for the band &#8211; approx. 80cm<\/td><td>7 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">USB cable<\/td><td>15 PLN<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Together<\/strong><\/td><td><strong>394 PLN<\/strong><\/td><\/tr><\/tbody><\/table><figcaption>Budget summary<\/figcaption><\/figure><p>Well, now it&#8217;s time to wait for the ordered items \ud83d\ude42<\/p><p><\/p>","protected":false},"excerpt":{"rendered":"<p>Because I like to chisel and tinker (generally create various &quot;handy&quot; and not only) &#8211; I decided to launch a new project entitled &quot;Biofeedback device &#8211; learning meditation&quot;. I assume that I will do most things myself and of course use generally available examples, blogs, documentation, etc.<\/p>\n","protected":false},"author":1,"featured_media":543,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[69],"tags":[],"class_list":["post-524","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projekt-arduino"],"_links":{"self":[{"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":3,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":544,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/posts\/524\/revisions\/544"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/media\/543"}],"wp:attachment":[{"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spotonfun.pl\/index.php\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}