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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#16 - Proximity Theremin
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 19 replies
  • Subscribers 30 subscribers
  • Views 4477 views
  • Users 0 members are here
  • theremin
  • 100projects
  • proximity
  • capsense
  • 4
  • psoc
Related

PSoC 4 Pioneer Kit Community Project#16 - Proximity Theremin

cy.gul
cy.gul over 12 years ago

Hello folks!

 

Today's project is a personal favorite of mine because it got the amateur/wannabe musician inside me very excited. Building on yesterday's example of how to do proximity sensing with the CapSense Component, today we're going to use that concept in an application. This example project implements a Theremin, a 1920s electronic musical instrument played without physical contact.

 

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

 

The project uses two proximity sensors - one for Pitch and another for Volume. The proximity sensing itself is done using wires that act as antennas, input to the PSoC 4 using the CapSense block.

The theremin has 2 modes - discrete and continuous notes, toggled by using the pushbutton (SW2) on the board. Pitch information is indicated by the color of the LED, while Volume information is indicated by the brightness of the same LED.

The Cortex-M0 CPU takes the analog input from the CapSense proximity sensors and send a parameter indicating distance to the hardware PWMs, that in-turn modulate the LED. The CPU also sends data to the 2 other PWMs that are used to drive the a Buzzer that creates the musical notes.

The project also includes a UART Component so you can read the CapSense proximity sensor data over hyperterminal.

 

image

 

What's cool about this project?

- It uses 5 (five!) hardware 16-bit PWMs - 3 of which are implemented on the TCPWM block (modulating the RGB LEDs), wheres 2 more implemented using UDBs (to drive the buzzer).

- It implements distance sensing using CapSense proximity

- It lets you make music in the air! Check out the demo video above.

 


Hardware Connections:

 

image

 

The RGB LED and the pushbutton switch are on the board. In addition to the PSoC 4 Pioneer Kit, you're going to need -

- an 18 ohm Speaker/Buzzer (P2[0])

- 2 resistors, 2 capacitors

- hanful of jumper wires

 

image

 

 

The project is attached below, its all ready to go. Just build and program on to your PSoC 4 Pioneer Kit, and wire up a small buzzer.

Have fun making music!

 

 

 

 





 



Attachments:
KIT042_Theremin.Bundle01.zip
  • Sign in to reply
  • Cancel

Top Replies

  • jesusantoniocar
    jesusantoniocar over 12 years ago +1
    Hello Gagan. Thanks for give us this amazing project, great design with few elements to build. i will buy some elements that need to make a full test. best regards, jesus antonio.
  • Former Member
    Former Member over 12 years ago in reply to greatunclebulgaria +1
    Hey David, Great question. Actually, you need just one 100ohm resistor and one 8ohm/0.1W speaker (see image below). You could use a speaker with a different rating as well - for this application, it doesn…
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to jesusantoniocar +1
    Hello. It is a new video with the last file project.. best regards, Jesus Antonio. players.brightcove.net/.../index.html
Parents
  • greatunclebulgaria
    greatunclebulgaria over 12 years ago

    Good morning Gagan/Antonio,

     

    I will definitely be building this project!

     

    I haven't installed the development environment yet, I suspect my question would be answered if I had, but what are the component values? Also I could not find an 18 Ohm speaker, 16 Ohm (or maybe 1.8KOhm?). I should imagine this would be ok?

     

    Thanks in advance

     

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to greatunclebulgaria

    Hey David,

    Great question.

    Actually, you need just one 100ohm resistor and one 8ohm/0.1W speaker (see image below). You could use a speaker with a different rating as well - for this application, it doesn't matter too much. I have tested it out with speakers with different ratings, and get similar results.

    Makes sense?

    Thanks for the question,

    Antonio

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello Antonio.

    great project.

    Today i tested this .

     

    thanks,

     

    Jesus Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to jesusantoniocar

    Wow!

    Thanks for the video.

     

    Did you try it in discrete mode as well ? (By pressing the SW2 on the board)

     

    Also, feel free to play around with the code as I mentioned in Post 2. and see the results you get.

     

    Super work, J. Antonio!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Hello, all,

     

    This just in:

    By implementing some of the Theremin functions in UDBs, I have written a much more efficient Theremin.

    1. Instead of two 16-bit UDB PWMs (4 UDBs) for Tone generation, there is now a single 16-bit DualPWM that does the job in 2 UDBs

    2. Instead of 3 TCPWMs for RGB LED Control, there is a single 8-bit triple-compare PWM.

     

    This new project thus saves you 3 TCPWMs and a UDB over the previous example!

     

    Here's the new schematic:

    image

    The project can be found in the Cypress Community Component forum: http://www.cypress.com/?app=forum&id=2492&rID=82045

     

    Have fun with this.

     

    And by the way: Sneak preview of another cool project to come - PSoC 4 driving an LED Matrix like this one: http://www.adafruit.com/products/420

     

    Toodleoo,

    Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello Antonio.

    Thanks for update this project, and thanks too for the link of adafruit i did not know this women and her company. amazing women. so the display with the you will work is excellent , i will buy this and stay tune with you.

     

    best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello Antonio.

    Thanks for update this project, and thanks too for the link of adafruit i did not know this women and her company. amazing women. so the display with the you will work is excellent , i will buy this and stay tune with you.

     

    best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to jesusantoniocar

    Hello.

    It is a new video with the last file project..

     

    best regards,

     

    Jesus Antonio.

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

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to jesusantoniocar

    Excellent work, J. Antonio!

    Thanks for the video,

    Antonio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
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