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
      •  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#034 – Resistive Touch Panel Example
  • 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 4 replies
  • Subscribers 27 subscribers
  • Views 2594 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#034 – Resistive Touch Panel Example

cy.wbz
cy.wbz over 12 years ago

Hello!

 

Hello today we are going to go through a resistive touch example using the PSoC 4 pioneer kit. This example will interface custom hardware with the Pioneer kit. The pressure sensitive touch screen uses resistive force sensors distributed below the ‘Glass’ to measure applied force, which is analyzed to determine the press location.

 


image

 

image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • UART
  • Sar Sequencer
  • ISR
  • PWM
  • CyPins
  • CyClock

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

Force measurement can be very simple or very difficult depending on the constraints of your system. Were this an example for a cell phone, the sensors would need to be very small, screen printable, and cheap. Suitable technology for low cost sensors exists, but we chose to use a similar but more convenient force sensor.

 

Eight Flexiforce A301 sensors are placed underneath the ‘glass’, such that they support the weight.  This ensures that no force escapes, and that the calculation made with this data will be accurate.  A large source of error in these sorts of calculations is unplanned translational forces getting into the measurements, augmenting the location and force of the touch.

 

image

 

These force sensors, being essentially variable resistors, are measured with a half-bridge configuration.  This configuration removes common mode noise, which is a significant portion of the noise in the measured signals. 10 kOhm resistors are used, as they were about the resistance of the sensor under the target loading.  The middle of each bridge connection is connected to pins on the PSoC4 for measurement, through the Pioneer Kit’s J2 connector.  The PSoC4 simply measures these signals with a sequencing SAR, with the bridge reference tied to the SAR’s reference input.

 

Calculation of the touch location is done using the SAR sequencer measurements and the known sensor locations.  The following equations define the location of a single force applied to the screen. Yp is the vertical location of the touch, and Xp is the horizontal location of the touch.

 


image

 

These equations are implemented in C, relying primarily on multiply-accumulates, and one divide.  PSoC4’s CM0 core handles these calculations easily.  The code for calculating touch location is shown below.

 

image

 

Also as part of this touch example we have provided a python GUI script that will display the XY position of the touches on your desk top. We have attached the script to this example. There is a video demonstration below that shows the touch panel in action. You will need a Python emulation environment to run this script. As a general note you may need to update this python script to point to the correct COM port created by the PSoC 5LP.

 

Hardware Connections:

 

The following schematic view capture provides the user the layout and values for the system. Please connect the breadboard or touch system to your PSoC 4 Pioneer kit.

 

image


Also connect the PSoC 4 UART connections to the PSoC 5LP device so the UART positioning can be relayed up to the host.

 

PSoC 4 P4[1] -> P5LP P12[6]

PSoC 4 P4[0] -> P5LP P12[7]

 

Test Your Project:

 

Program the Pioneer kit and then touch the resistive touch panel you’ve created. Run the python script on your PC to read and display the values from the Pioneer kit. Please see an example of the system in action below.

 

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

 

I hope this example can help you in your design.

Best,

Matt

Attachments:
17225.Project Images.zip
touch_plot_single.py.zip
p4_res_touch.cywrk.Archive02.zip
  • Sign in to reply
  • Cancel
Parents
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    Hello Matt.

    great project to explore  and make applications with tocuh panels tecnologies.

     

    best regards,

     

    Jesus antonio.

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

    Hello Matt.

    great project to explore  and make applications with tocuh panels tecnologies.

     

    best regards,

     

    Jesus antonio.

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