This is update number nine of my brainwaves appliance controller project.  To summarize this work, first I want to mention that I started this project as part of Element14’s PSoC4 Smarter Life Challenge.  After the challenge ended I continued to work on the project by first porting the design from Cypress PSoC4 to a PSoC5LP chip.  The PSoC5LP has more analog resources than PSoC4, which allows me to simplify the front end electrodes amplifier circuits.   In the first three blog posts in this series I showed how I built the brainwaves appliance controller in a PSoC5LP chip part of a Schmartboard prototype board.  During this work I bumped into various issues but I was able to find solutions to them, so that by my third update I had a working brainwaves appliance controller.  Here is a picture of the brainwaves appliance controller implemented in the Schmartboard:

 

update9_Schmartboard.JPG

 

However, this was only a prototype that proved the concept since all the infrared remote control codes were “manually” preloaded. To do this I measured the electric signal driving the infrared LED of the remote control with an oscilloscope and I “manually” decoded it.  Then I embedded the code in the PSoC Creator code for PSoC5LP chip.  My next step was to make this system able to learn any infrared remote control code.  This would allow users to “program” the brainwaves appliance controller to specific tasks mapped to various sequences of eye movements.  For example, turning a TV On and Off  can be mapped to moving the eyes in a certain sequence like left -> right -> left.  Similarly, changing the channel Up or Down can be mapped to an eye movement sequence like left -> right -> right.  So in my next series of five blog posts I showed how I developed a code learner system in a PSoC5LP chip.  First I tried to add the infrared code learner to the brainwaves appliance controller implemented in the Schmartboard PSoC5LP chip, but this approach failed. The main problem was lack of visibility of what happens inside PSoC5LP chip during program execution and the lack of debugging access. So I moved my work to a Cypress CY8CKIT-001 evaluation kit with the plan that when I am confident that the program works to port it back to the Schmartboard. 

 

The CY8CKIT-001 evaluation kit includes a motherboard and three modules, one with a PSoC1 chip, one with a PSoC3 chip, and one with a PSoC5LP chip, and it came with a MiniProg3 programmer and debugger.  It has also an LCD display with two rows of 16 characters each, which I used to "communicate" with my program running in the PSoC5LP chip, and set up various messages that informed me where the program is in the sequence of instructions execution. This work of developing the infrared remote code learner turned out to be very difficult and it took me a lot more time and effort than I originally thought.  As I worked on it I posted periodic blog post updates, so this was covered in updates four to eight in this series.  After all this time and effort I got my infrared remote code learner to work and in my last blog post I was able to demonstrate how I controlled a satellite receiver connected to a TV monitor.  Here is a picture of that code learner system implemented on a Cypress CY8CKIT-001 evaluation kit:

 

update9_cy8kit001.JPG

 

Well, now since the infrared code learner works and the brainwaves appliance controller works the only thing I need to do is to put them together.  This should be easy; however, my problem is that the code learner is implemented on the Cypress CY8CKIT-001 evaluation kit while the brainwaves appliance controller is on the Schmartboard.  So my first attempt was to bring the code learned to the brainwaves appliance controller on the Schmartboard.  To do this I had to add the 7-segment LED module, the two infrared sensors, and three buttons.  I started by looking at the schematic to see if I have fifteen available ports, and I was able to find them.  Next I looked at the Schmartboard system.  The system is implemented on two boards connected together, one is the Schmartboard with the Cypress PsoC5LP chip and the second is a breadboard that I built myself.  Here is a picture of my breadboard:

 

update9_my_pcb.JPG

 

This board is pretty crowded with components and wires, and after all my efforts to find space for the additional components I just gave up.  There was no way I can fit all the code learner components on this board.  So another solution would be to add a third prototype board somehow hanging on these two boards, which I thought was somehow doable.  However, then I had a second thought: if the system works the first time it would be great, but if it doesn’t and I need to debug the circuits and replace components it will very hard if not impossible.  So I decided it is not a good idea to add the code learner to the Schmartboard, and instead I would build a custom printed circuit board (PCB) for the combined brainwaves appliance controller with the infrared remote code learner. 

 

But before jumping into the design of this PCB I took an intermediate step and I implemented the brainwaves appliance controller together with the infrared code learner on the Cypress CY8CKIT-001 evaluation kit.  Here is a picture of the combined system.

 

update9_integrated_system.JPG

 

I actually knew from the beginning that this implementation of the brainwaves appliance controller will not function well in this setup because of the long wire routings from the PSoC5LP module through connectors and all the way to the sides of the solder-less prototype board in the middle.  These routings capture too much noise from the switching signals and from the environment through electromagnetic interference.  To reduce the coupled noise I have built a shield around the analog circuits on the breadboard, as it can be seen in the picture above, but this was only part of the problem and the remaining coupled noise was still enough to cover the active signals.  The reason I built the brainwaves appliance controller on the CY8CKIT-001 evaluation kit was not to see it working (I knew it can work from the Schmartboard).  I actually wanted to make sure that I am able to configure all the inputs and output ports of the PSoC5LP chip the way I wanted.  I also wanted to make sure that the code fits in the memory, and to make sure there is no conflict between the resources used by the code learner and by the brainwaves appliance controller.   Even though it does not work with the signals from electrodes, this system should work with emulated signals that reassemble the electrodes functionality at larger signal amplitudes that are not so sensitive to noise.

 

So now I am verifying the functionality of the brainwaves appliance controller with the infrared remote code learner and I am trying to optimize internal resources and pin allocation to further simplify the custom PCB that I will design.

 

This is where I am so far with developing the brainwaves appliance controller.  Next step will be to design a printed circuit board and think of an enclosure for this project. 

 

That’s it for now; I will come back with a new update as I get more work done.

 

Best Wishes,

Cosmin