element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Smarter Life
  • Challenges & Projects
  • Design Challenges
  • Smarter Life
  • More
  • Cancel
Smarter Life
Blog Smarter Life Challenge - Brainwaves based appliance controller - Update 9
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ciorga
  • Date Created: 24 Dec 2013 11:22 PM Date Created
  • Views 1388 views
  • Likes 3 likes
  • Comments 8 comments
  • smarter_life_challenge
  • brainwave_controller
  • smarter_life
Related
Recommended

Smarter Life Challenge - Brainwaves based appliance controller - Update 9

ciorga
ciorga
24 Dec 2013

I'VE GOT IT TO WORK!!! I am so happy!!!  After two months of working every weekend, now I have a brainwaves appliance controller that works.  Here is a picture of how it looks like on my head and below it’s a more detailed picture of the project itself:

 

image

image

So there is my custom amplifier board plugged into J2 connector of the Pioneer PSoC4 kit and a battery pack connected to the USB port (that type of battery pack that provides 5V dc through a USB port).

 

 

In the following picture I have created simplified block diagram of this brainwave appliance controller.  Starting from the left, you can see three electrodes placed on my forehead.  Then, this is how it works: the brain sends control signals to eyes to move them left and right, which signals are in the form of electric currents transmitted through the nervous system.  These signals activate the muscles that hold the eyes contracting some of them in order to move the eyes.  I also learned that eyes are polarized so when they move they change the electric field around them (more like static electricity).  So these electric signals initiated by the brain’s decision to move the eyes are captured by the two side electrodes as shown in the block diagram below.

 

image

The electrodes are connected to an instrumentation amplifier setup to a gain of 50.  The instrumentation amplifier provides also the common mode signal, which is equal to the algebraic sum of the voltages at the two electrodes divided by two.  This common mode signal is applied to an inverting operational amplifier that connects to the center electrode, forming a negative feedback loop that controls the common mode at VREF voltage value.  This is essential for the instrumentation amplifier because it prevents it from drifting and railing up or down.  The amplified signal is then low pass filtered and applied to a second instrumentation amplifier that has a gain of 20.  The output of the second amplifier is applied to a window comparator made of the two operational amplifiers available in the PSoC 4 chip.  The comparator outputs are routed off chip to two LED indicators for the left and right movement of the eyes, and are also routed internally to two glitch filters made out of two UDB blocks of the PSoC 4 chip.  The glitch filters remove eye blinks and other artifacts generated by various noise sources.  The clean signals are then sent to the ARM Cortex CPU inside PsoC 4 chip where they are decoded.  The CPU programmed code receives a sequence of eyes movement after which it decides what bit sequence to send to the controlled appliance through the infrared LED transmitter.  Then the CPU program encodes the bits into a standard infrared communication protocol and sends this encoded signal to an off-chip infrared LED.  The CPU code also provides various audio signals as feedback to the user along this process through an external buzzer.

 

So let’s watch now a video that shows how I control my TV-set and my cable box using movements of my eyes.  In this video I will turn ON/OFF the TV by moving my eyes in Right -> Left -> Right sequence, I will turn ON/OFF the cable box through the eye movement sequence: Left -> Right -> Left, I will change the channel up by the eye movement sequence Left -> Left -> Right, and change the channel down through the sequence Right -> Right -> Left.  So let’s watch this video below:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This was how I can control the TV and cable box through their built-in infrared receivers.  But how about appliances that do not have an infrared receiver?  For those I will use a generic infrared power switch that I have purchased on eBay.  This power switch has been designed to be controlled through an infrared beam signal coming from a remote control.  The setup first puts the power switch in a training mode in which it learns the infrared signal pattern, after which every time it receives that signal pattern it switches ON/OFF any appliance that is plugged into its output ports.

 

So let’s watch a video in which I will train one of these generic infrared controlled switches, after which I will demonstrate how I turn ON/OFF a lamp through the brain signals associated to my eyes movements:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

In the next video I will show how I use three of these infrared controlled power switches to control three appliances: a table-top heater, a radio, and a lamp.  So let’s watch this video below:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

So up to this point I was able to create a brainwaves appliance controller that works with the TV-set, the cable box, and any appliance that can be plugged into those infrared power switches.  The schematic of the circuit inside PsoC4 is shown in the following picture:

 

image

 

And below I have inserted some screenshots of part of the code that runs into the ARM Cortex MCU.

 

image

image

image

image

image

image

image

image

image

image

image

image

 

So this is how my brainwaves appliance controller works and how it is made.  Feel free to contact me through email ( cosmin.iorga@noisecoupling.com )  if you like to find out more details about schematics, PCB layout, and other aspects of building and using this system.

 

 

Also, I learned that a poll has been setup for voting the most popular project, so if anyone wants to vote for this brainwaves appliance controller project you can follow the link below.

 

 

http://www.element14.com/community/polls/1692

 


I wish everyone Happy Holidays and Happy New Year in 2014!

Cosmin

  • Sign in to reply

Top Comments

  • ciorga
    ciorga over 11 years ago in reply to stanto +1
    Thank you for your nice comments Christopher. Best Wishes, Cosmin
Parents
  • vsluiter
    vsluiter over 11 years ago

    Cosmin,

    Honestly: when I first read your idea I was very skeptical about the feasibility of your plans. Now that I see what you've pulled off I cannot do anything but take my hat off to you, it' s great to see what you've accomplished. It's been very nice to see you starting off on the analog end, and ending in the digital end, conquering obstacles along the way. Congratulations with your results!!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ciorga
    ciorga over 11 years ago in reply to vsluiter

    Thank you Victor for such nice comments about my project.  I really enjoyed working on this brainwaves appliance controller especially because I started it from just one idea without having in mind any solution or plan, and then I moved on step by step, little by little, trying to overcome all obstacles that came up in my way.  I found Cypress PSoC Creator design environment very user friendly (especially for an analog designer like me) and I am happy that I discovered this for future ideas and projects that are currently "incubating" in my mind and which I am planning to implement using Cypress system-on-chip devices.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • ciorga
    ciorga over 11 years ago in reply to vsluiter

    Thank you Victor for such nice comments about my project.  I really enjoyed working on this brainwaves appliance controller especially because I started it from just one idea without having in mind any solution or plan, and then I moved on step by step, little by little, trying to overcome all obstacles that came up in my way.  I found Cypress PSoC Creator design environment very user friendly (especially for an analog designer like me) and I am happy that I discovered this for future ideas and projects that are currently "incubating" in my mind and which I am planning to implement using Cypress system-on-chip devices.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube