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
Project14
  • Challenges & Projects
  • More
Project14
Blog PSoC®︎ 6 WiFi-BT Pioneer Kit - CapSense Tuner using Cypress PSoC Creator
  • Blog
  • Forum
  • Documents
  • Theme Suggestions
  • Polls
  • Members
  • More
  • Cancel
  • New
Join Project14 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mahmood.hassan
  • Date Created: 29 Jun 2019 8:42 PM Date Created
  • Views 1102 views
  • Likes 2 likes
  • Comments 0 comments
  • RoadTest
  • cypress psoc6 wi-fi bt pioneer kit
  • psoc6
  • cypress
Related
Recommended

PSoC®︎ 6 WiFi-BT Pioneer Kit - CapSense Tuner using Cypress PSoC Creator

mahmood.hassan
mahmood.hassan
29 Jun 2019

This blog post is also the Part of PSoCRegistered 6 WiFi-BT Pioneer Kit (CY8CKIT-062-WIFI-BT) - Review Product LinkProduct Link (Figure 1). This post is also related to previous ones so for better understanding kindly take a look at those too.

 

image

Figure 1: PSoC6 WiFi-BT Pioneer Kit (details)

 

In the previous posts we have learn how to successfully build and test the Hello World project based on UART_printf example and then modified it to read the ADC value to get data from onboard ambient light sensor. And also created a new project of Blinky LED without using any pre-built examples. Now we will built learn how to read ADC of PSoC6 MCU.

CapSense Tuner (PSoC Creator Tuner)

CapSense is easy to use and advance touch sensor module of PSoC6 MCU (figure 2). PSoC Creator has builtin GUI based CapSense tuner tool. CapSense tuner can work over USB to I2C, SPI or UART bridge interface. It provide graphical view of touch inputs in real time and allow user to adjust the threshold value for various touch inputs and later these values can be incorporated into project. Therefore it enable us to adjust all the parameters of touch input by only one time programming the PSoC6. All the steps required to enable the CapSense tuning and then using the Tuner in real time to obtain the optimal threshold values and how to update the original values, testing and results are shown below. (Here I am assuming that you are already familiar with creating new project, building and programming the PSoC6 using PSoC Creator) You will get an error on building this example code but solution of this error is also given below.

image

Figure 2: Different CapSense Inputs Available on PSoC6 pioneer board

 

Create a new CapSense Tuner UART project from examples

image

Rename or change the project location and click Finish to create a new project

image

After successful new project creation you will this this view in PSoC Creator IDE

image

Build the Project and You can get this Error and building will fail. Double click the error and it will open the Error Location in code as shown above.

image

Right Click on Error struct and Go to Definition to further investigate the reason behind this error.

image

As you can see there is no integer member named "mode" of this structure. We got this error because we are using integer member named "mode" in switch statement in "static cy_en_syspm_status_t CapSense_SwitchPowerModeCallback(cy_stc_syspm_callback_params_t *callbackParams)" function inside CapSense_Control.c file

image

To solve this Error, modify the Structure definition by adding a new member "mode" of "int" datatype as shown.

image

Build the program after modification of structure definition and now build will succeed without any error

image

Program the PSoC6 (CM4) to run the CapSense Tuner UART

image

After successful programming the PSoC6 we can now launch the CapSense Tuner.

image

We can also launch the CapSense Tuner from TopDesign schematic by right clicking the CapSense component in selecting the "Launch Tuner"

image

After selecting either of the above option we will see this during PSoC Creator Tuner launching

image

PSoC Creator CapSense Tuner - Main Interface

image

Launch tuner communication setup to choose and setup the appropriate communication protocol

image

Select the "UART" port and change the port configuration such that it become same as the UART configuration of PSoC6 MCU

image

Connect the PSoC CapSense Tuner tool with PSoC6

image

Successful connection is established with hardware

image

Start the PSoC Tuner tool to receive the CapSense touch input data in real time. You can see the ongoing communication rate in bottom bar.

image

By touch the CapSense Slider and Button on actual hardware we can see the input values in chart and also the touch detection or not in Center widget. CapSense Slider is working normally but buttons is not detected even though there is some touch value from "Button0". The reason behind this problem is high touch parameter values as compared to actual values.

image

We can also view all the data in graphical form. Go to "Graph View" tab to view CapSense Touch Input Values and Touch Detection Status in graphs.

image

Select "Button 0" in Widget Explorer and Change its parameters as shown in the image. Initially the Finger threshold value was 120 and we will change to (50) that value which is below the normal touch value. Noise Threshold value should be less than the difference of Finger Threshold value and Hysteresis value. In Graph Setup Select the Button0CSX FT from threshold drop down menu. this will draw a line on Sensor Signals graph at previous and new Finger threshold value. This will help us in finding the optimal values for CapSense Button 0. Similarly we will change the value of Button 1. Now every time we touch any of these two buttons the sensor signal value should be more than Finger threshold value.

image

Original (Left side) and New (Right Side) parameter values for CapSense touch buttons.

image

After updating the values for both buttons we can transfer these changes to the project.

image

We also manually configure the CapSense Parameter Values by right clicking the CapSense component and selecting the Configure or by simply double left clicking it.

image

To manually update the values of Both CapSense touch buttons using CapSense configure dialog, go to Advanced tab and then select Widget Details. Under widget details we can update the parameter values for both buttons as shown in the image.

image

After finding the optimal CapSense parameter values we can build, program and verify the results in PSoC Tuner. Now we can clearly see the change in status of Button 0 and Button 1 of PSoC6 CapSense module.

image

We have successfully built and tested the CapSense Tuner program. Then learn how to use PSoC Creator Tuner tool to fine tune the threshold values for CapSense inputs. After adjusting the threshold values we tested and verified the result through PSoC Creator tuner tool.

  • Sign in to reply
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