{"id":91740,"date":"2022-02-28T12:23:24","date_gmt":"2022-02-28T06:53:24","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=91740"},"modified":"2024-07-30T15:47:11","modified_gmt":"2024-07-30T10:17:11","slug":"control-lights-through-thoughts-using-eeg-based-iot-controller","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/control-lights-through-thoughts-using-eeg-based-iot-controller","title":{"rendered":"DIY: Brain Controlled Lights!!! (Using EEG Based IoT Controller)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-55476\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2019\/08\/Ashwini-EFY-Tested.png\" alt=\"\" width=\"161\" height=\"147\" \/>Have you ever thought of controlling things with just your thoughts? Well, it is now possible!<\/p>\n<p>The idea for this <a href=\"https:\/\/www.electronicsforu.com\/iot-projects-ideas\">IoT project<\/a> came while working on the BioSecure project wherein a unique pattern was created using a <a href=\"https:\/\/www.electronicsforu.com\/electronics-projects\/brain-controlled-iot-eeg\">brain controlled<\/a> EEG and EMG signals to act as a unique password. This led to the development of a <a href=\"https:\/\/www.electronicsforu.com\/technology-trends\/learn-electronics\/machine-learning-basics\" target=\"_blank\" rel=\"noopener\">machine learning<\/a> (ML) model that understood brain signals and thereby created unique patterns using our thoughts. For example, when thinking in a particular language, the ML model is able to read those thoughts and translate them.<\/p>\n<p>To achieve this, the brain data corresponding to the level of mental attention needs to be obtained using an EEG sensor. This level is then given a threshold value. When the attention level goes above this threshold value, lights or other IoT connected appliances (that were thought of) switch on\/off.<\/p>\n<p>This project does not end here. The journey of discovery will continue, which will later evolve into a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Brain%E2%80%93computer_interface\" target=\"_blank\" rel=\"noopener\">brain-computer interface<\/a> (BCI) and might become the world\u2019s first thoughts translator that uses an ML model.<\/p>\n<figure id=\"attachment_91750\" aria-describedby=\"caption-attachment-91750\" style=\"width: 354px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-91750 size-medium\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/1-16-354x500.jpg\" alt=\"Author\u2019s prototype during testing for Control Lights Through Thoughts\" width=\"354\" height=\"500\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/1-16-354x500.jpg 354w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/1-16-297x420.jpg 297w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/1-16.jpg 500w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><figcaption id=\"caption-attachment-91750\" class=\"wp-caption-text\">Fig. 1: Author\u2019s prototype during testing for Control Lights Through Thoughts<\/figcaption><\/figure>\n<p>Sounds highly interesting and quite futuristic as well? If so, let us start the project by shopping for the components mentioned under Bill of Material.<\/p>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/g5gMK87TUdI\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h2>Prerequisite<\/h2>\n<p>There are various EEG sensors such as OpenBCI and NeuroSky MindWave available in the market. For this project, the NeuroSky MindWave Mobile 2 EEG sensor is being used.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-91742\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/table-1-1-500x271.jpg\" alt=\"\" width=\"350\" height=\"190\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/table-1-1-500x271.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/table-1-1.jpg 636w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>Install Bluez driver into the Raspberry Pi. But if you have the latest version of the Raspbian OS, there is no need to do so as the driver and relevant software are pre-installed.<\/p>\n<p>Open the Bluetooth devices in Settings and pair the EEG sensor via Bluetooth with the Raspberry Pi. On successful connection with serial ports, a message with the serial port name will be displayed. Note it down.<\/p>\n<figure id=\"attachment_91749\" aria-describedby=\"caption-attachment-91749\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-91749 size-medium\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/2-16-500x286.jpg\" alt=\"Bluetooth setting\" width=\"500\" height=\"286\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/2-16-500x286.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/2-16-696x399.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/2-16-733x420.jpg 733w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/2-16.jpg 873w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><figcaption id=\"caption-attachment-91749\" class=\"wp-caption-text\">Fig. 2: Bluetooth setting<\/figcaption><\/figure>\n<figure id=\"attachment_91748\" aria-describedby=\"caption-attachment-91748\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-91748 size-medium\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11-500x83.jpg\" alt=\"Serial port name\" width=\"500\" height=\"83\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11-500x83.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11-1024x170.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11-696x116.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11-1068x177.jpg 1068w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/02\/3-11.jpg 1331w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><figcaption id=\"caption-attachment-91748\" class=\"wp-caption-text\">Fig. 3: Serial port name<\/figcaption><\/figure>\n<div class=\"mepr_error\"><div class=\"locked-content\">\n<b>EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.<\/b><\/p>\n<p>Oops! This is an EFY++ article, which means it's our Premium Content. You need to be a Registered User of our website to read its complete content.<\/p>\n<p><b>Good News: <\/b>You can register to our website for FREE! <a href=\"https:\/\/www.electronicsforu.com\/plans\/subscription-plans\" target=\"_blank\" rel=\"noopener\">CLICK HERE<\/a> to register now.<\/p>\n<p><b>Already a registered member? <\/b>If YES, then simply login to you account below. (TIP: Use 'forgot password' feature and reset and save your new password in your browser, if you forgot the last one!)\n<\/div>\n<\/div><div>\n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/www.electronicsforu.com\/login\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/91740\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n      <a href=\"https:\/\/www.electronicsforu.com\/login?action=forgot_password\">Forgot Password<\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever thought of controlling things with just your thoughts? Well, it is now possible! The idea for this IoT project came while working on the BioSecure project wherein a unique pattern was created using a brain controlled EEG and EMG signals to act as a unique password. This led to the development of [&hellip;]<\/p>\n","protected":false},"author":33369,"featured_media":91745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,3713,3880],"tags":[1985,1911,110,83,8296],"class_list":{"0":"post-91740","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-premium","10":"category-raspberry-pi-diys","11":"tag-diy-projects","12":"tag-do-it-yourself","13":"tag-electronics-projects","14":"tag-featured","15":"tag-premium"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/91740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/33369"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=91740"}],"version-history":[{"count":1,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/91740\/revisions"}],"predecessor-version":[{"id":144809,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/91740\/revisions\/144809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/91745"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=91740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=91740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=91740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}