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:
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.
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:
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:
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:
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:
And below I have inserted some screenshots of part of the code that runs into the ARM Cortex MCU.
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
Top Comments