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 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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Frederick Vandenbosch's Blog Cypress CY8CKIT-059 PSoC 5LP Prototyping Kit - CapSense Linear Slider
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 2 Jun 2015 11:03 AM Date Created
  • Views 1793 views
  • Likes 4 likes
  • Comments 11 comments
  • RoadTest
  • cy8ckit-059
  • prototyping
  • review
  • guide
  • kit
  • cypress
  • psoc5lp
  • psoc
Related
Recommended

Cypress CY8CKIT-059 PSoC 5LP Prototyping Kit - CapSense Linear Slider

fvan
fvan
2 Jun 2015

I've been experimenting more in the scope of the Cypress CY8CKIT-058 PSoC 5LP Prototyping Kit RoadTest. This time, I experimented with CapSense and created my own linear slider.

 

CapSense

 

There are two parts to the TopView:

  • a PWM signal directly connected to the onboard LED on P2_1
  • a CapSense component

 

The CapSense component can be used for different types of capacitive touch buttons. In this particular case, I opted for the linear slider.

The goal is to control the duty cycle of the PWM signal depending on where the linear slider was touched.

imageimage

 

imageimage

 

The code example was found here: PSoC 4 Pioneer Kit Community Project#02 - CapSense Slider

 

#include <project.h>

#define NO_SLIDE 0xFFFFu

int main()
{
    /* Place your initialization/startup code here (e.g. MyInst_Start()) */
    uint16 SliderPos = NO_SLIDE;
    uint16 LastPos = NO_SLIDE;

    CyGlobalIntEnable;

    CapSense_1_Start();
    CapSense_1_InitializeAllBaselines();

    Clock_1_Start();
    PWM_1_Start();

    for(;;)
    {
        /* Place your application code here. */
        CapSense_1_UpdateEnabledBaselines();
        CapSense_1_ScanEnabledWidgets();

        while(CapSense_1_IsBusy());

        SliderPos = CapSense_1_GetCentroidPos(CapSense_1_LINEARSLIDER0__LS);

        if(SliderPos != NO_SLIDE && SliderPos != LastPos) {
            PWM_1_WriteCompare(SliderPos);
        }
    }
}

 

Linear Slider

 

To create the linear slider, I used a piece of cardboard on which I created some shapes using copper tape. The shapes were then connected to alligator clips using conductive paint. Why paint and not just more copper tape ? Purely because I wanted to experiment with different conductive materials image

 

Finally, the alligator clips were connected to the kit's pins assigned to the CapSense Linear Slider. The copper tape was covered with regular tape, making it easy to slide back and forth without ripping the copper tape.

 

imageimage

 

It is possible to create a longer slider with up to ten electrodes using the same five pins, by configuring and wiring the slider in "diplexed" mode. This allows for a finer granularity of the measured values.

 

Demo


A demo of the PWM signal's duty cycle being changed based on the input of the linear slider:


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

  • Sign in to reply

Top Comments

  • clem57
    clem57 over 9 years ago +1
    In the video, you showed objects. I did not catch the one after the tube of electrical paste. Clem BTW, I loved the project.
  • balearicdynamics
    balearicdynamics over 9 years ago +1
    Nice project but hwy to use a so complex sensor? Take in account that I am totally ignorant about the device you used. I have done in past several capacitive sensors for real life applications with NE655…
  • fvan
    fvan over 9 years ago in reply to balearicdynamics +1
    Mainly learning and testing. As mentioned in the post, this is part of the RoadTest of the PSoC 5LP proto kit. PSoC has a feature called CapSense, with which you can easily create capacitive touch buttons…
Parents
  • balearicdynamics
    balearicdynamics over 9 years ago

    Nice project but hwy to use a so complex sensor? Take in account that I am totally ignorant about the device you used.

    I have done in past several capacitive sensors for real life applications with NE655 and few other components.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 9 years ago in reply to balearicdynamics

    Mainly learning and testing. As mentioned in the post, this is part of the RoadTest of the PSoC 5LP proto kit.

     

    PSoC has a feature called CapSense, with which you can easily create capacitive touch buttons, sliders, etc ... In some kits a PCB slider is available onboard, but not on this specific kit. So I thought I'd try with some copper tape and conductive ink image

     

    Frederick

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to fvan

    Sure it is a good idea image Copper tape saved me too in a lot of cases (including an hand-made RFID antenna) in past.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to fvan

    Sure it is a good idea image Copper tape saved me too in a lot of cases (including an hand-made RFID antenna) in past.

    • 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