element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 6
  • 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: 2 Dec 2013 3:36 AM Date Created
  • Views 425 views
  • Likes 0 likes
  • Comments 2 comments
  • smarter_life_challenge
  • brainwave_controller
  • smarter_life
Related
Recommended

Smarter Life Challenge - Brainwaves based appliance controller - Update 6

ciorga
ciorga
2 Dec 2013

Thank you DAB and Victor for your comments on my previous blog post.  This weekend I focused on further processing the electric signals associated to eye movements, which so far I was able to measure using electrodes placed on forehead, amplify, and bring to a window comparator made out of the two op-amps inside the PSoC4 chip.

 

The first step, I replaced the debouncers blocks that I used for low-pass filtering with glitch filter blocks.  The glitch filter blocks provide me a better way of measuring the length of pulses in clock period units.  I then sent the output pulses to the CPU for further processing.  These output pulses are of two types: 1. Corresponding to eyes movement to the left, and 2. Corresponding to eyes movement to the right.

 

The program that runs in the CPU receives the left/right (eye movement) pulses, stores them in memory, and then encodes them using a Manchester encoding format.  The encoded pulses are then loaded into a shift register, after which they are modulating a 38kHz signal and driven out to an infrared LED.

 

This encoded signal is compatible with infrared remote control signals, so it can be received and decoded by appliances that have infrared remote control receivers.

 

Here is a screenshot of the entire system as implemented into the PSoC4 chip on the Pioneer kit:

 

image

 

The long chain of flip-flops is my shift register since I ran out of UDBs ( 2 hold the glitch filters, and the other two the registers).  So after being a little disappointed when I've got the error message pointing to my PSoC4 shift register block resource availability I then tried to "trick" the chip by creating a "home made" shift register and I was happy to see that it worked.

 

And below I am showing a few examples of data encoding.  The picture below shows the Manchester encoding four signals corresponding to sequential eyes movement four times to the left (and back to the center).  The encoded signal as stored in a register inside the CPU can be seen on the LED bar graph (on the breadboard).  Then the modulated signal transmitted serially through one pin of PSoC4 chip is captured by the oscilloscope (upper trace).  The lower trace shows the clock that controls the shift register.  In these experiments below I used a much lower frequency for validation/troubleshooting purposes.  There is a start bit and an end bit, and in between there are the four Manchester encoded bits corresponding to the eyes movement described above:

 

image

 

The following picture shows the same type of example but this time for a sequence of eye movement: right -> center -> right -> center -> left -> center -> left -> center

 

image

 

And one more example for a sequence of eye movement: left -> center -> right -> center -> right -> center -> left -> center.

 

image

This is where I am now with the project; next step I will add an infrared LED and to try to transmit a code to a receiver.  In the mean time I will be designing the PCB that holds the front-end amplifier circuit (which looks now like a mess of wires and prototype breadboards hanging on my forehead, as you could see in the video I posted last week).   I’ll post more updates as I get more work done.

Best Wishes,

Cosmin

  • Sign in to reply
Parents
  • DAB
    DAB over 12 years ago

    Nice update and an interesting solution to the signal identification problem.

     

    I think there might be a way to do the pulse duration determination with the programmable counters in the PSOC, but I would have to double check the documentation and do a harder review of your signals, but as long as your current design works, I say your solution is good enough.

     

    I assume you are just doing standard IR protocol for your link, so you should have plenty examples to get a good setup.

     

    Cool,

    DAB


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 12 years ago

    Nice update and an interesting solution to the signal identification problem.

     

    I think there might be a way to do the pulse duration determination with the programmable counters in the PSOC, but I would have to double check the documentation and do a harder review of your signals, but as long as your current design works, I say your solution is good enough.

     

    I assume you are just doing standard IR protocol for your link, so you should have plenty examples to get a good setup.

     

    Cool,

    DAB


    • 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