Propel Human-Machine Interactions into the Future Challenge
The PSoC™ 4100S Capsense Pioneer Kit demonstrates a touch array with capacitive sensing technology. Remove the outer plastic cover and you will find a typical Arduino header to interface to any custom sensor designs! Being an Arduino user, I am extremely excited to try this capability of the kit.
- CY8CKIT-041-41XX PSoC™ 4100S Pioneer board
- USB Standad-A to Micro-B cable
- Water dropper
- Four press-fit connectors (for Arduino headers)
- Four jumper wires
- Quick Start Guide
My idea for this challenge is to try and use the PSoC™ 4100S CapSense Pioneer Kit in a design for controlling a SSD1306 OLED display. I use the SSD1306 display for many of my embedded IoT projects. I would like to use the kit to control the display. I'd like to be able to scroll through lines that have been displayed on the Display screen. I would also like to have a button to select different output to display on the screen. Using these buttons to select display content categories on the screen. I am sure, once I start experimenting, I will find other display controls to implement.
I'm excited to learn about the USB and Bluetooth capabilities of the kit. For instance, I'd like to learn more about the PSoC 4100s Pioneer Kit Ready-to-Use CapSense™ trackpad. It claims that it can be used as a finished product that implements USB or Bluetooth. Possibly I could design that into one of my future IoT embedded projects and control the lines sent from firmware running on another MCU, with an OLED, LCD or TFT display attached. The trackpad would be separate MCU controlling the components through Bluetooth or USB. Much like a remote control. Here is a list of possible MCU's that I have used in my other projects
- PSoC 62S2 + AIROC Wi-Fi/Bluetooth Pioneer Kit. Part# CY8CKIT-062S2-43012 already has CAPSENSE capabilities and uses ModusToolbox as a development environment
- NXP i.MX RT1170 High End Processor Evaluation Kit (has a TFT screen)
I'm going to try to keep it simple for now and connect the kit directly to the SSD1306 OLED display using I2C. There is an example on GitHub SSD1306 OLED I2C driver that implements an I2C driver for SSD1306 OLED displays including graphics library. The project as is runs on the PSOC pioneer kit. I stumbled on to it on the Challenge Discussion Board. at this Thread. I also attached my Arduino Grove Base Shield to the Kit using the Four press-fit connectors (for Arduino headers).
I received my kit on December 10, 2022 and started this project page the next day on December 11, 2022 A few weeks before the Christmas holiday season. The unboxing was to me, the same as Alex Glows. unboxing video at The future of HMI with Infineon's CAPSENSE // Unboxing .
The takeaway from this video was that Alex bypassed the opening of the kit and went directly to the PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide, which was contrary to step 4 described in the CY8CKIT-041-41XX QUICK START GUIDE included in the kit. The link to this guide was found on the challenge page, under the judges section, in the Resource section, for those who are interested.
I was happy to see in the design guide that Modus Toolbox is supported with the PSoC™ 4100S
I have used Modus Toolbox before for developing on the PSoC 62S2 + AIROC Wi-Fi/Bluetooth Pioneer Kit. But it seems like the examples I'm finding are referring to PSoC creator? I have not experienced this development environment yet, but I've made the decision to go with PSoC creator for now. It will be a learning curve for me, but the abundance of examples is critical in learning to program this kit. Which further emphasizes going with using PSoC Creator instead of ModusToolbox, since all the code examples use it. Also I've read that PSoC Creator only runs on Window, which is my embedded OS of choice.
CY8CKIT-041-41XX QUICK START GUIDEI began my education with the kit by following this card that came in the package.
I followed steps 1, 2, and 3 to run the preinstalled Firmware demo. Very Cool.
Next I went to step 4 on the quick card
In step 4, I download and installed the PSoC Creator IDE and CY8CKIT-041-41XX PSoC 4100S Pioneer Kit code examples, on the PSoC™ 4100S Capsense Pioneer Kit page from the Design Support section.
I downloaded the full version of the setup kit "DOWNLOAD - CY8CKIT04141XXSetup_RevSA.exe and downloaded the zip file "CY8CKIT-041-41XX Example Projects".
I also viewed and saved the links to documents from PSoC™ 4100S Capsense Pioneer Kit In the User Manual section
To install the tools and PSoC Creator, I went to the Release Notes CY8CKIT-041-41XX PSoC® 4100S Pioneer Kit document in section 2
Turns out I did not need to install the Examples, since they were already install with the install I just did. I followed the steps in section 4 of the guide to locate the Trackball example.
I located the preinstalled firmware
I loaded it
I tried to debug it and It would not debug and generated an error..
I loaded another example
and it worked great. It stopped at main() and I was able to step thru it.
Next I'll try to do a PSoC tutorial
on the help menu I selected the PSoC Creator User Guide
I found a Blinky tutorial on page 10
I started to follow this tutorial, but noticed it was supporting another Kit, so I abandoned it.
Than next I'll perform steps 5 and 6.
Step 5 was a success.
Step 6 was a little tricky, but I was able to get the board out of the case. The quick card does not have a step to Disconnect the Flex PCB from the main board. I found a description in the User manual in section 3.1.2 on page 27
It turns out that I did not need to perform step 6. I originally thought I would need to remove the board to attach the Four press-fit connectors (for Arduino headers) onto the board. There is no instructions to attach them on the quick card nor the User Guide. I was able to attach them by snapping them into the Arduino compatible power and I/O headers (J1, J2, J3 and J4) that is presented on the last page of the quick start guide shown in figure 1
I'll be using an example I found through on the challenge discussion page.
https://github.com/derkst/Cypress-PSOC-OLED
Clone to zip. After unzipping with in PSoC Creator load the project selecting Project>Open|Project>Workplace and go to File OLED.cyprj to select.
Here are some Valuable threads, that I saved describing how to build the project.
When you update using the Project>Update Component (OLED) keep all the selected options and go through the screen and DO Not change anything for 128x6 1306
I had a hard time finding out what MCU to use in the device selector and ending up comparing project from the examples I loaded previously.
Select MCU as indicated above and click the OK button. Now build the project by Selecting the menu option Build > Clean and Build OLED If it builds OK, hook up the OLED to the Arduino Headers as described below.
So what is PSoC?
PSoC (programmable system on a chip) is a family of microcontroller integrated circuits by Cypress Semiconductor. These chips include a CPU core and mixed-signal arrays of configurable integrated analog and digital peripherals.
What exactly is PSoC Creator?
PSoC™ Creator is an IDE that enables concurrent hardware and firmware editing, compiling and debugging of PSoC™ systems. Applications are created using schematic capture and over 150 pre-verified, production-ready peripheral components. Hardware components can be programmed to design requirements, firmware can be tested, and tradeoffs explored. The programmable aspects of the PSoC allows designers to modify system components without requiring boards to be redone for design modification.
I worked through some examples to learn how to use PSoC Creator. The IDE can be compared to other Firmware development environments like Eclipse and Visual Basic.
I followed the
That is available on the Infineon website here PSoC Creator User Guide. I will be using this Guide to implement my idea in the following section.
My Project DesignThis section contains my design and implementation for my idea for this design challenge.
INTRODUCTION
My idea for this challenge is to try and use the PSoC™ 4100S CapSense Pioneer Kit in a design for controlling a SSD1306 OLED display. I use the SSD1306 display for many of my embedded IoT projects. I would like to use the kit to control the display.
- Have the CapSense Buttons control the brightness of the Screen.
- Have the CapSense Trackpad Draw on the Display
- I'd like to be able to scroll through lines that have been displayed on the Display screen.
- I would also like to have a button to select different output to display on the screen.
- Using these buttons to select display content categories on the screen. I am sure, once I start experimenting,
I will find other display controls to implement.
HARDWARE DESIGN
I attached the Grove Base Shield from my Grove Starter Kit to the PSoC 4100S via the four press-fit connectors (for Arduino headers).
Grove Base Shield V2.0 for Arduino
Build Diagram
Here is a photo of the connections described in the diagram from above
SOFTWARE DESIGN
Using the OLED example code mentioned above and the "CE214025 Trackpad With Color Gamut" example code as a guide, I crated a project with the following Capsense and the I2C components pictured below.
I named the project "TEST1". I then, made a copy of the trackpad example and added and configured the I2C component I kept the 2 main() copies of each (capsense main and OLED main) example to swap in and out to test each functionality. I also had to disable the EZi2c component to use the general I2C component that the OLED example is using.
TESTING
My test program did not operate the OLED?
What is the Problem? Is it The Component configuration of I2C?, The Grove shield?, The Jumpers?, the OLED? the press-fit connectors?
To diagnose the Problem, I went back to the to my initial example on connecting the OLED. It was no longer working? Why?
I started at the press fit connectors, maybe they, where kind of lose, so I adjusted the pins so they would make a better contact. Still not working. I tried Different jumper wire and after replacing the jumpers it began to work. I did notice that I had to jiggle the jumpers a bit to get it working though, probably attributed to the loosely fitted press-fit connectors?
Next I attached Grove Shield as described above and ran the test again. It took a lot of tries but finally the OLED started working.
I did try to connect to the I2C connector on the Grove Shield, but it didn't work so I abandoned that experiment.
Back to the test1 project
Now the example is running really slow with the OLED main example code? Why?
It stuck in the code for more then 1000 millisectons?
Commented out the line and ran again
The results were the same.
IMPLENMANTAION
I had the design working with the build described above. But then the OLED example stopped working? I'm not sure why? But this stopped me from implementing my design and getting CAPSENSE PCB trackpad working with the OLED?
At this point I am abandoning my idea of getting the Capsense Trackpad to control the OLED.
New DirectionSince I am having trouble as a beginner trying to get the Capsense working with the OLED, I desided to devote some of my time following a project Infineon Technologies CAPSENSE™ using PSoC4 CYCKIT-041-41XX by the Infineon Team, an Evaluation of the demonstration kit.
I followed every section in the project I was very informative. I did takeaway a lot of knowledge that made me more aware of the Hardware of the kit, the usage of PSoC creator and debugging. The only real problem I had was with updating to KitProg3, but with the help of the Infenion team, I was able to get back to KitProg2. This worked for me with this version of PSoC creator.
First , I'd like to describe my environment
What follows are the section of the Project I followed and some of my commentary on my progress.
Getting started with PSoC Creator and CY8CKIT-041-41XX
I followed the instructions and found a different way to load the example, but ran into a problem at the following Paragraph:
Connect the kit with the Micro-USB cable and [ Program ] the project. In case no programmer (KitProg) is found and/or an update is required then you need to open (see windows start menu) the external tool PSoC Programmer -> Utilities -> Upgrade Firmware.
after upgrading to KitProg3 using the external tool PSoC Programmer -> Utilities -> Upgrade Firmware, I experienced the following dialog box? when I try to program or debug? the following dialog box comes up and I select the only line in the list and press ok, and nothing happens.
What have I done wrong? why is nothing working now? Should I have NOT upgraded to Kitprog3?
the Infineon team had a solution. The following comments is the conversation with the team on the hackster project page I am trying to follow.
I could not get debug working with KitProg3, but was able to debug again by using KitProg2. S0 first I Installed KitProg3 using fw-loader using the following links
documentation page: https://github.com/Infineon/Firmware-loader
and
Release Page: https://github.com/Infineon/Firmware-loader/releases
I needed to load a list of devices to get the device name.
Then I ran the KitProg3 loader
From the (also attached) documentation you can see on page 7 how it works:
fw-loader –-update-kp2
Still not able to debug but get a different error
So now I tried to update to KitProg2, Here's the output
And here is the select debug target dialog The only question is why it wants the user to upgrade to KitProg3 , (see the highlighted text in the following screenshot)? But the problem is solved. I am now able to debug!! I could not get kitProg3 to work? don't know why?
Success... Here is the output And it now stops at Main.c like it's suppose to.
Continue with the project . The results was to use KitProg2 and NOT KitProg3 for the debug target. This was a week of going back and forth with the Infineon Team, But they lead me to the right outcome and got me back on track
NEXT -- I completed the next 4 Sections of the Project At this point I have 15 days left to finish.
CapSense Technology inside the Box
A nice overview of the kit. I did takeaway some more knowledge on the kit and PSoC creator.
Let's try CapSense from the scratch - My First CapSense Button
I completed this example with not Problems. I did keep the board in the Flex PCB and used the headers supplied with the kit instead of soldering a coinj4-pin8. Instead, I used a paperclip and fasten a washer to one end and attached the other end to the removeable header .
This worked fine as seen in the following video. Since I still had the Flex PCB attached, I had to not make contact with the TrackPad, because the LED would initially light up, but it would eventually go off. And at this point I could touch the washer and the LED would light.
Sorry for the video error, I produced a YouTube video and I cannot, for some strange reason attach them in this story? I don't know why? I tried everything! another Mind Sync.
I followed this example and here are my results.
Problem1:
An error occurs after pressing start and Touching the washer.
The tutorial is using KitProg3? Why is this problem Happening? Where is the error happening? The firmware does work on its own? What is causing the error reading data from device?
It's a wrap thank you
Published November 30, 2022
ConclusionsThis concludes my project blog on the PSoC™ 4100S Capsense Pioneer Kit. I have only touched the surface of experimenting with this kit. I'll get to know it even better and use it for capsense enabled embedded projects that I design in the future.
I was unable to reach some of my goals that I had in mind at the beginning of this project, like:
- Using the Capsense trackpad to control the OLED display,
- Using the Groove Stater kit to attach to the Arduino headers.
- Using other PSoC kits that I have acquired.
But, this was great fun and I'm looking forward to seeing what the other challengers come up with at the end of this competition. Feel free to send me your comments on this project
Comments