The project can be tested on the CY8CKIT-040 PSoC 4000 Pioneer Development Kit with Trackpad shield. In addition to it you need terminal on PC to observe the touch co-ordinates. Also you can observe the particular sensor triggering in Tuner.
DescriptionThis project uses self and mutual capacitive sensing on 5X5 matrix buttons. The trackpad is used as matrix buttons. As this is 5X5 matrix there are 25 mutual cap sensors and each column of matrix is one self-cap sensor. Thus if user touches the trackpad at a particular point, mutual cap triggers the particular sensor and self-cap triggers the respective column number. The project displays respective self-cap sensor number and mutual-cap co-ordinates on the UART Terminal when user touches the trackpad. The result can also be observed on Tuner.
Hardware Changes:
- Remove CMOD on P0_4 and replace with 470pf capacitor
- Place 470pf capacitor on P0_2.
- Remove R30 near RGB LED
- Remove the resistor on P0_3 and put 2.2nf
- At least 0.5 mm overlay on trackpad shield for mutual cap.
Connection
Place the trackpad shield on top of CY8CKIT040 as shown in following picture:
Build the project and program it to the CY8CKIT040 Kit. Check the comport number for Kitprog USB-UART in Device manager. Open the terminal in PC, select the respective com port and set the baud rate to 115200. Place the finger on the trackpacd and observe the result.
To observe the results on tuner right click on CapSense module in PSoC Creator and select lauch tuner as shown below:
Once tuner is launched go to the toolsàTuner Communication Setup. Select the Kitprog I2C and select the I2C speed as 100kHz, I2C address as 8 and Sub-Address as 2 bytes, as per below figure:
Click on ‘OK’. Click on ‘Connect’ and then click on ‘Start’ at the Left hand top. Check the following figure for reference:
Observations on Terminal:
Refer the following screen shot from Teraterm:
In above M stands for mutual and S stands for self. The two bytes in front of M represent the co-ordinates (Rx, Tx) of the finger touch. And the byte in front of S is the self-cap sensor number. In above case the Mutual Cap co-ordinates are (0,0) and self-cap sensor active is Sensor no 0.
Observations when the finger touches multiple co-ordinates and multiple self cap sensors:
Observations on Tuner:
The tuner displays 5x5 matrix and each column of the martix as one button sensor. When the user places finger on the trackpad the particular sensor/sensors on matrix is triggered and shown the tuner. Also the respective column is triggered as buttons.
In the above screen shot the finger is placed between two mutual cap co-ordinates, thus two sensors are triggered on the matrix. At the same time the last column is triggered as Button5.
Comments
Please log in or sign up to comment.