Infineon PSoC™ 6 Artificial Intelligence Evaluation Kit
The PSoC™ 6 AI Evaluation Kit is a hardware platform focused on Machine Learning (ML), that allows you to evaluate DEEPCRAFT™ Studio, Ready Models (opens in a new tab), pre-trained models from the Starter projects, and other software products. This kit features a PSoC™ 6 MCU, a CYW43439 Wi-Fi/Bluetooth® combo module, a 512-Mb NOR flash, an onboard programmer/debugger (KitProg3), PDM-PCM digital microphone interface, Full-Speed USB device, two user LEDs, and one user button. The board supports operating voltages from 1.8 V to 3.3 V for the PSoC™ 6 MCU. The kit provides various sensors such as 6-axis motion sensor (BMI270), magnetometer (BMM350), barometric pressure sensor (DPS368), and RADAR sensor (BGT60TR13C) for data collection and creating the machine learning models. For more information, refer to CY8CKIT-062S2-AI (opens in a new tab).
Kit contents
The kit includes the following:
- PSoC™ 6 AI Evaluation Board (CY8CKIT-062S2-AI)
- Inlay card (a printed QR code points to a getting started webpage)
Requirements
Following softwares are required for getting started:
- ModusToolbox™ Software (opens in a new tab) version 3.1 or later (for developing PSoC™ 6 MCU based applications)
- DEEPCRAFT™ Studio (for developing machine learning models)
- UART terminal software such as Tera Term or Minicom
Out-of-box application
The kit is pre-programmed with mtb-example-imagimob-streaming-protocol (opens in a new tab) code example, that demonstrates sensor data collection from the USB port into DEEPCRAFT™ Studio for labeling and machine learning model creation. It is designed to collect data from the motion sensor (BMX160 or BMI160 or BMI270) at 50 Hz sample rate, magnetometer sensor (BMM350) at 50 Hz sample rate, pressure sensor (DPS368) at 50 Hz sample rate, radar sensor (BGT60TR13C) at 100000 Hz sample rate, and PDM/PCM audio data at 16 kHz. Implementation details are available in README (opens in a new tab).
Testing OOB application with DEEPCRAFT™ Studio
Creating project in DEEPCRAFT™ Studio
-
Open DEEPCRAFT™ Studio and select File> New Project. The New Project window appears.
-
Under Graph UX > Generic, select Empty Project.
-
In New Project Name, enter the name of the project.
-
In Location, specify the location where you want to create the workspace and the project directory.
-
Click OK to create the project. The project directory is downloaded to the workspace in Studio.
Connecting and setting up Serial Capture and Predefined Labels units
DEEPCRAFT™ Studio provides the functionality to collect and label the real-time data simultaneously. Let’s set up the Serial Capture unit for collecting data and Predefined unit for labeling data on the canvas.
Setting up the Serial Capture
-
Connect the board to the laptop or PC through PSoC™ 6 USB connector (J2) using a Type-C USB cable.
-
Expand EmptyProject directory and double-click the Main.imunit to open the canvas.
-
Expand Library > Devices and drag and drop the Serial Capture unit onto the canvas.
-
Expand Visualization and drag and drop the Data Track unit onto the canvas.
-
Goto Serial Capture > Properties and select USB Serial Device port. To check the COM port at which the board is connected, open Device Manager > Ports and look for USB Serial Device.
-
Click on the red icon in the Serial Capture node and drag over to the gray icon in the Data Track node. This creates a connection between the two nodes.
- The microphone collects data at a sampling rate of 16000 and an accelerometer collects data at a sampling rate of 50.
- The connection might not establish if the COM port is already in use in DEEPCRAFT™ Studio or another tool.
After setting up the Serial Capture, you can utilize the same graph to label the real-time data, by adding a Predefined Labels unit onto the canvas. Define the classes in the Predefined Labels node for one time and utilize the defined classes to label the data on a click of button.
Setting up the Predefined Labels
-
Expand Project and drag and drop the Predefined Labels unit onto the canvas. The Predefined Labels unit displays the default classes.
-
Define the classes in Predefined Labels node by entering every class in a new line.
After defining the classes, start collecting and labeling data simultaneously.
Real-time data collection and data labeling
-
Navigate to the toolbar and click the Start button to open the session file (main.imsession). An empty session file opens displaying the pre-defined classes in the Labels bar.
-
Click the Record button to start capturing the real-time data.
-
In the Labels bar, select a class to start adding labels to the streaming data.
-
Deselect the same class to stop adding the labels. Similarly, you can enable or disable the other classes and label the data.
-
Click the Record button to stop collecting the data.
-
Select File > Save to save the session file, data track and label track. The Save New Session window appears.
-
In Location, click the three dot and select the desired location to save the files.
-
In Session Name, enter the name of the session file.
-
Under Track Options, set the following:
- In Wave Format Encoding, select the encoding format for the audio tracks
- In Track Name, double-click the column to edit the track name, if required
- In File Name, double-click the columns to edit the track name, if required
-
Select the save checkbox corresponding to the tracks you want to save.
-
Click OK to save the files.
-
Repeat the instructions from step 2 to collect and save data in multiple session files.
After collecting the data, add data to the required classification project and start with the machine learning workflow in Studio. Refer to Create Classification project and Add data to project to know more.
Testing OOB application with serial terminal
-
Connect the board to the PC through PSoC™ 6 USB connector (J2) using a Type-C USB cable. This enables a serial port for sensor data collection.
-
Ensure that the power LED (D1) turns ON, indicating the board is powered.
-
In the terminal application, open the serial connection to the device. It should present itself as USB serial device. Connect to this port with the following settings:
- Baud rate: 115200
- Data: 8 bit
- Parity: None
- Stop bit: 1 bit
- Flow control: None
-
Set the terminal settings as follows:
- Newlines should be transmitted as CR+LF
- Enable local echo
-
Type config? and press Enter key (to send CR+LF) and verify that the device responds with a JSON structure describing the protocol configuration.
-
Type subscribe,1,16000 and verify that the device streams audio data. Notice that sample collection stops after 5 seconds. The garbled text on the terminal is the audio data.
-
Type subscribe,2,50 and verify that the device streams IMU data. Notice that sample collection stops after 5 seconds. The garbled text on the terminal is the IMU data.
Currently backspace is not supported in terminal commands. If you encounter issues such as being unable to see commands on the terminal or receiving unknown command errors, follow the steps below:
- Reset the terminal and clear the buffer.
- Reset board to ensure a fresh execution.