Cypress Semiconductor CY8CKIT-037 Manual

Cypress Semiconductor CY8CKIT-037 Manual

Psoc 4 motor control evaluation kit
Table of Contents

Advertisement

Quick Links

CY8CKIT-037
®
PSoC
4 Motor Control Evaluation Kit Guide
Doc. No. 001-92562 Rev. *C
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134 USA
www.cypress.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CY8CKIT-037 and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress Semiconductor CY8CKIT-037

  • Page 1 CY8CKIT-037 ® PSoC 4 Motor Control Evaluation Kit Guide Doc. No. 001-92562 Rev. *C Cypress Semiconductor 198 Champion Court San Jose, CA 95134 USA www.cypress.com...
  • Page 2 Copyrights © Cypress Semiconductor Corporation, 2015-2018. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC (“Cypress”). This document, including any software or firmware included or referenced in this document (“Software”), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide.
  • Page 3: Table Of Contents

    Software Installation ............................10 Before You Begin ..............................10 Install Kit Software ............................... 10 Uninstall Software ..............................13 Kit Operation ..............................14 CY8CKIT-037 Evaluation Kit Overview ....................... 14 Kit Operation and Configuration Guide ........................ 15 3.2.1 DC Power Supply Connector ........................15 3.2.2 Motor Winding Connectors ........................
  • Page 4 A.1. Board Schematics, Board Layout, and BOM ....................... 87 A.2. Bill of Materials ..............................96 A.3. No Load Components ............................99 A.4. Special Installation Instructions ......................... 100 A.5. Label .................................. 100 ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 5: Safety Information

    Handling Boards CY8CKIT-037 boards are sensitive to ESD. Hold the board only by its edges. After removing the board from its box, place it on a grounded, static-free surface. Use a conductive foam pad if available. Do not slide the board over any surface.
  • Page 6: Introduction

    (FOC), and stepper motor microstepping control. It also introduces the Bridge Control Panel (BCP) as a debugging tool in the motor control development process. 1.1 Kit Contents The CY8CKIT-037 PSoC 4 Motor Control EVK includes the following: • CY8CKIT-037 Motor Control Evaluation Board •...
  • Page 7: Getting Started

    1.2 Getting Started To learn the solution quickly and apply it to your design, refer to the CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Quick Start Guide inside the kit box or in the installation directory. The default location for the kit documents is: <Install_Directory>\CY8CKIT-037 Motor Control EVK\<version>\Documentation...
  • Page 8: Additional Learning Resources

    PSoC Creator. Learning from Peers: Visit www.cypress.com/forums to meet enthusiastic PSoC developers discussing the next generation embedded systems on Cypress Developer Community Forums ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 9: Technical Support

    IPMSM Interior Permanent Magnet Synchronous Motor Interrupt Service Routine PMSM Permanent Magnet Synchronous Motor SPMSM Surface Permanent Magnet Synchronous Motor SVPWM Space Vector Pulse Width Modulation ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 10: Software Installation

    2. Software Installation This chapter describes the steps to install the software tools and packages on a PC for using the CY8CKIT-037 PSoC 4 Motor Control EVK. 2.1 Before You Begin All Cypress software installations require administrator privileges, but these are not required to run the software after it is installed.
  • Page 11 2-2. Figure 2-2. Kit Installer Startup Screen Select the folder where you want to install the files related to the CY8CKIT-037 PSoC 4 Motor Control EVK. Choose the directory and click Next. Note: When you click the Next button, the CY8CKIT-037 installer automatically installs the required software, if it is not present on your computer.
  • Page 12 When the installation begins, a list of packages appears on the installation page. A green check mark appears next to each package after successful installation. Enter your contact information or select the option Continue without Contact Information. Click Finish to complete the CY8CKIT-037 kit installation. After installation...
  • Page 13: Uninstall Software

    Go to Start > All Programs > Cypress > Cypress Update Manager and select the Uninstall button next to the product that needs to be uninstalled. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 14: Kit Operation

    3. Kit Operation This chapter introduces you to the features of the CY8CKIT-037 EVK. It describes the connectors of the board and the usage of these connectors. 3.1 CY8CKIT-037 Evaluation Kit Overview The motor control system can be separated into two parts: the driver board and the controller board. The CY8CKIT-037 Motor Control EVK is the driver board, which contains the DC/DC power circuit, dual H-bridge circuit, motor current and bus voltage sampling and processing circuit, protection circuit, user configuration circuit, and connectors to the controller board.
  • Page 15: Kit Operation And Configuration Guide

    Input Protection Circuit. CY8CKIT-042 gets 12 V from the DC/DC converter on CY8CKIT-037. The LDO on CY8CKIT-042 generates the 3.3 V supply for the PSoC device if the VDD on CY8CKIT-042 is configured as 3.3 V. If the VDD on CY8CKIT-042 is configured as 5 V, CY8CKIT-042 needs 5 V from the USB cable.
  • Page 16: Hall Sensors Interface Connector

    CY8CKIT-042 board through these connectors. For schematic details, refer to Connectors. Note: Pin connectors J1, J2, J3, and J4 may bend when plugging the EVK board into CY8CKIT-042. Figure 3-5. Connectors to CY8CKIT-042 Board ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 17: Usb Connector

    J11 connector, as shown in Figure 3-6. For schematic details of the USB-to-UART bridge circuit part, refer USB-to-UART Bridge Controller Circuit. Figure 3-6. USB-to-UART Bridge Controller Circuit ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 18: Hardware

    4. Hardware 4.1 Block Diagram Overview Figure 4-1 illustrates the CY8CKIT-037 hardware block diagram. The major features are as follows: • Input protection circuit • DC/DC switching regulator • MOSFET dual H-bridge and dual H-bridge PWM drivers • Phase current detecting and processing circuit •...
  • Page 19: Input Protection Circuit

    2.7 V to 5.5 V, needed by the other circuits and chips on the EVK board is provided from the controller board through the Arduino headers. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 20: Mosfet Dual H-Bridge And Dual H-Bridge Pwm Drivers

    Considering the compatibility for different motor control types, the population of components J19, J20, and J21 needs to be adjusted to fit different motor type applications. Figure 4-5. MOSFET Dual H-Bridge ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 21: Phase Current Detecting And Processing Circuit

    IDAC. The comparator output is routed to the PWM kill terminal to shut down the PWM output, forcing the winding current to follow the IDAC current reference. Figure 4-7. Two-Phase Winding Current Comparing Circuit ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 22: Hall Sensors And Bemf Sensing Circuit

    J13, J14, and J15, as shown in Figure 4-11. Users can select sensored or sensorless configuration via the three jumpers. Figure 4-10. Sensorless BLDC BEMF Detecting Circuit ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 23: Usb-To-Uart Bridge Controller Circuit

    DC power supply. The input current of both connectors can be as high as 2 A. Figure 4-13. Input Power Supply Connectors ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 24: Test Points

    Figure 4-16. Test Points CAUTION Do not power the kit through these test points to avoid damage to the board. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 25: Code Examples

    Follow the steps below to use the installed code examples. Launch PSoC Creator from Start > All Programs > Cypress > PSoC Creator<version> > PSoC Creator <version>. On the Start page, click CY8CKIT-037 Motor Control EVK under Start > Kits. The code examples shipped with the kit appear (see Figure 5-1).
  • Page 26 If the device is yet to be acquired, the Select Debug Target window will appear. Select KitProg/<serial_number> and click Port Acquire, as shown in Figure 5-3. Figure 5-3. Acquire Device from PSoC Creator ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 27 After the device is acquired, it is shown in a tree structure below the KitProg/<serial_number>. Now, click the Connect button. Figure 5-4. Connect Device from PSoC Creator Click OK to exit the window and start programming. Figure 5-5. Program Device from PSoC Creator ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 28: Configuration Jumpers For Different Motor Types

    5.2 Configuration Jumpers for Different Motor Types CY8CKIT-037 supports three motor types: BLDC, PMSM, and stepper. When switching between different motor types or algorithms, the EVK board needs to be reconfigured via jumpers J13–J24. The jumper configuration table is printed on the...
  • Page 29: Sensored Bldc Motor Control Code Example Overview

    PWM signals to the high side of the MOSFET driver (three digital output pins) • PWM signals to the low side of the MOSFET driver (three digital output pins) ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 30: Control Schematic Overview

    “Speed Measurement” schematic. “Counter_Spd” uses one Hall signal to measure the RPM of the Figure 5-11 motor. It can work as real-time feedback of the closed-loop speed control. Figure 5-11. Speed Measurement Schematic ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 31: Flow Chart

    So, the firmware processes only the closed-loop speed control, button detecting, and protective action. Figure 5-13. Main Loop Function Flow Chart ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 32: Running The Sensored Bldc Motor Control Code Example

    Configure the board via jumpers J13–J24 for the Sensored BLDC Motor Control code example (“HALL SENSOR BLDC” row in Figure 5-6). The CY8CKIT-037 is configured for sensored BLDC control by default. If you have not made any Step 3 – Plug CY8CKIT-037 into changes since receiving it from Cypress, bypass this step and go to CY8CKIT-042.
  • Page 33 Connector Hall Sensors Interface for instructions. Connect a 24 V power adapter to J7 on CY8CKIT-037. Connect a USB cable to CY8CKIT-042 at connector J10; connect the other end of the USB cable to the PC. LED1 glows, indicating that the kit is powered. If it is not glowing, the fuse F2 may be broken. Replace F2 with the backup fuse provided with the kit.
  • Page 34 Figure 5-19. Buttons and Status LED Reset LED2 Do not remove jumpers while the kit is powered. This may damage the kit. CAUTION ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 35: Adapting The Code Example To Another Motor

    If you want to use your own motor and have different functional requirements such as RPM or direction, change the initializing value in this function. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 36: Sensorless Bldc Motor Control Code Example

    Vbus to get the zero-crossing point of the non-energized winding. • Start/stop control: A digital input connected to a switch to start and stop rotation of the motor (one digital input pin). ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 37: Control Schematic Overview

    “BEMF_Comp” generates a pulse when “BEMF_Comp” toggles its output so that PSoC 4 can get a pulse at each zero-crossing point. The pulse triggers an interrupt, and the relevant code is executed in its ISR. Figure 5-22. BEMF Checking Schematic ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 38: Firmware Introduction

    BLDC must stop and wait for the next round of the free-running stage. Figure 5-24 shows the starting sequence. Figure 5-24. Starting Sequence for Sensorless BLDC Motor ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 39: Running The Sensorless Bldc Motor Control Code Example

    Pioneer Kit because the Pioneer Kit does not provide a 5 V converter. It gets 5 V power directly from the USB port of the PC. Figure 5-14 shows the configuration. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 40 EVK board configured for the Sensorless BLDC Motor Control code example. Figure 5-26. EVK Board Configuration for Sensorless BLDC Motor Control Code Example 5.4.5.3 Step 3 – Plug CY8CKIT-037 into CY8CKIT-042 Plug the EVK board into the Pioneer Kit via connectors J1–J4, as shown in Figure 5-16.
  • Page 41 Then, press the Reset button and press the SW2 button again. If LED2 still blinks, there must be a problem in the hardware or software. To debug this problem, contact Cypress for technical support. CAUTION Do not remove jumpers while the kit is powered. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 42: Adapting The Code Example To Another Motor

    *-------------------------------------------------------------*/ uint8 polePairNumber; /*-------------------------------------------------------------* * general parameters *-------------------------------------------------------------*/ Direction_T direction; uint16 initSpeedRefRpm; /*-------------------------------------------------------------* * PID parameters *-------------------------------------------------------------*/ Uint32 Uint32 /*-------------------------------------------------------------* * preposition parameters *-------------------------------------------------------------*/ uint16 prepositionTime; ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 43 C, real-time updating of the parameters in the “BLDC_Config” variables is possible. Note that the code as RS232, SPI, or I example included with the kit does not include this kind of debugging code. Kit users must develop it themselves. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 44 RPM, the output of the PID control, and so on. This structure is updated in real time during motor rotation. Monitoring these values is helpful in understanding system performance and troubleshooting. The following code illustrates the members of the “BLDC_Control_T” structure. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 45 BLDC_Control.sector = 1;\ BLDC_Control.checkFallingEdge = FALSE;\ BLDC_Control.inNormalRun = FALSE;\ BLDC_Control.speedMeasuredRpm = 0;\ BLDC_Control.speedRefRpm = 0;\ BLDC_Control.speedGivenRpm = 0;\ BLDC_Control.commutateStamp = 0;\ BLDC_Control.zeroCrossStamp = 0;\ BLDC_Control.zeroCrossPeriod = 0;\ ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 46 PREPOSITION is executed. A larger “prepositionTime” value lengthens the duration of the PREPOSITION stage. “prepositionDuty” is the duty cycle for stage PREPOSITION. A larger “prepositionDuty” value generates a larger preposition torque. uint16 prepositionTime; uint16 prepositionDuty; ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 47 This waiting time is specified by “speedCloseLoopWait”. It is a threshold for an internal counter that counts how many times position closed-loop mode is executed. A larger “speedCloseLoopWait” value lengthens the duration of position closed-loop mode. uint8 speedCloseLoopWait; ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 48 LED is turned off. When an error occurs, the status LED flashes. The number of flash times indicates the error code. For example, if the status LED flashes three times, the UV_ERROR has occurred. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 49: Sensorless Foc Motor Control Code Example

    IPMSM optimizes performance by the specific placement of magnets. “PMSM” refers to “SPMSM” in the remainder of this guide, unless otherwise specified. Figure 5-31. SPMSM and IPMSM Structural Differences ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 50 Where, Equivalence inductance of stator Mutual equivalence inductance of stator Amplitude of rotor flux linkages ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 51 5-34). The current vectors in the (d, q) frame are: Figure 5-34. Reference Frame Conversion Using Park Transformation Now the voltage in the d-q frame can be calculated by ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 52 When an upper transistor is switched on, the corresponding lower transistor is switched off. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 53 Figure 5-37. Voltage Vector in Sector I Then, the can be expressed as: ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 54 The “*” here indicates it is a value estimated is given as , an estimated current value by algorithm and not directly measured. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 55: Sensorless Foc Motor Control Code Example Overview

    PWM signals to the low side of the MOSFET driver (three digital output pins) • Overcurrent limit voltage set by the internal IDAC and an outside resistor Figure 5-38. Sensorless FOC Motor Control Code Example Block Diagram ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 56: Control Schematic Overview

    PWM design in the Sensorless FOC Motor Control code example schematic. The three TCPWM Components generate three couples of the center-aligned and complemented SVPWM signal according to the FOC algorithm. Figure 5-39. PWM Schematic ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 57 Over Current Protection design in the Sensorless FOC Motor Control code example schematic. IDAC_IbusPt connects to a resistance and generates a reference voltage to LPComp. Figure 5-41. Over Current Protection Schematic ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 58: Firmware Introduction

    Get 4 Channels Data Get 4 Channels Data Clark,Park Clark,Park Position Estimate Position Estimate Speed Loop Speed Loop Current Loop Current Loop InvPark InvPark SVPWM SVPWM Output Output ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 59 Initialization for PWM start and stop, PWM configuration • Interrupt entrance • Motor running parameters set and so on. • Definition of sample channel, ADC reference and clock frequency ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 60: Running The Sensorless Foc Motor Control Code Example

    Figure 5-45 shows the EVK board configured for the Sensorless FOC Motor Control code example. Figure 5-45. CY8CKIT-037 Configuration for Sensorless FOC Motor Control Code Example 5.5.5.3 Step 3 – Plug CY8CKIT-037 into CY8CKIT-042 Plug the EVK board into the Pioneer Kit via connectors J1–J4, as shown in Figure 5-16.
  • Page 61 During the debugging process, if you modify the code in the firmware, make sure that the CAUTION changes do not turn on both the high-side and low-side MOSFETs. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 62: Adapting The Code Example To Another Motor

    Low speed PI regulator integral float32_t Motor_f32LowSpdKi 0.005f constant Low speed PI regulator proportion float32_t Motor_f32LowSpdKp 0.25f constant High speed PI regulator integral float32_t Motor_f32Ski 0.005f constant ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 63: Single Shunt Foc Motor Control Code Example

    Figure 5-48 shows the current measurement by the single shunt. Figure 5-48. Single-Shunt FOC Current Measurement ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 64 So, if you sample bus current twice in one PWM period in a different PWM state, you can get two-phase currents. Then you can reconstruct the third one. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 65: Single Shunt Foc Motor Control Code Example Overview

    Overcurrent limit voltage set by the internal IDAC and an outside resistor Figure 5-50. SingleShunt Sensorless FOC Motor Control Code Example Block Diagram PMSM Inverter Motor Current GPIO GPIO GPIO GPIO GPIO SVPWM IDAC PSoC 4 ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 66: Control Schematic Overview

    “PWM_UPDATE” on both the OV and UN events. The PWM compare value will be updated twice in one period. The PWM ISR should also be triggered twice on the OV and UN events. Figure 5-52. ADC Trigger Timing ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 67: Firmware Introduction

    Sensorless FOC Motor Control code example. Refer to Firmware Introduction to learn about the firmware of the Single Shunt FOC Motor Control code example. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 68: Running The Single Shunt Foc Motor Control Code Example

    Figure 5-56 shows the EVK board configured for the SingleShunt FOC Motor Control code example. Figure 5-56. CY8CKIT-037 Configuration for SingleShunt Foc Motor Control Code Example 5.6.5.3 Step 3 – Plug CY8CKIT-037 into CY8CKIT-042 Plug the EVK board into the Pioneer Kit via connectors J1–J4, as shown in Figure 5-16.
  • Page 69: Adapting The Code Example To Another Motor

    Do not remove jumpers while the kit is powered. CAUTION 5.6.6 Adapting the Code Example to another Motor Refer to Adapting the Code Example to another Motor. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 70: Stepper Motor Control Code Example

    5.7 Stepper Motor Control Code Example CY8CKIT-037 does not provide a stepper motor in the kit package. However, the kit does support a stepper motor controlled with microstep from hardware and firmware. A Stepper Motor Control code example is included in the kit installation directory.
  • Page 71: Stepper Motor Control Code Example Overview

    GPIO GPIO State Machine State Machine ( Commutate ) ( Commutate ) Iref B IDAC Microstep Iref A Generator Generator Timer IDAC Speed Command PSoC 4 ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 72: Control Schematic Overview

    When the motor phase current is more than the sinusoidal reference current level, the comparator will output a high level. Figure 5-62. Current Chopping Schematic ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 73: Firmware Introduction

    PSoC 4, and then the main loop detects the user’s start-stop command and RPM reference. Figure 5-64. Main Loop Function Flow Chart The microstep drive algorithm is processed in the timer overflow ISR in which the microstep length was set. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 74: Running The Stepper Motor Control Code Example

    Figure 5-6). Figure 5-66 shows the EVK board configured for the Stepper Motor Control code example. Figure 5-66. CY8CKIT-037 Configuration for Stepper Motor Control Code Example ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 75 Then connect the 24-V adapter to J7. LED1 glows indicating that the kit is powered. If it is not glowing, the fuse F2 may be broken. Replace F2 with the backup fuse provided with the kit. Note: The CY8CKIT-037 PSoC 4 Motor Control EVK package does not include a stepper motor. Cypress recommends that you use a 42-mm (diameter or side length) stepper motor: CAUTION 42BYGH403AA (with 1.8-degree step angle and 1.65-A phase current).
  • Page 76 Reset button and press the SW2 button again. If LED2 still blinks, there must be a problem in the hardware or software. Contact Cypress for technical support. Do not remove jumpers while the kit is powered. CAUTION ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 77: Adapting The Code Example To Another Motor

    “UI_Data.microStepPace = 1, 2, 4, 8, 16, or 32” to enable the microstep algorithm to make the motor run more stably and smoothly. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 78: Bridge Control Panel Monitor Tool Guide

    The first step in monitoring data on the BCP is to set up the hardware and install the driver program for the USB-to-UART bridge controller (CY7C65213) on CY8CKIT-037. Connect the USB cable to CY8CKIT-037 at connector J11. Then, configure the hardware for the Sensored BLDC Motor Control code example following step1 to step 5 in Running the Sensored BLDC Motor Control Code Example.
  • Page 79 CY7C65213 USB-to-UART Bridge Controller is finished. Do not press switch SW2 on the CY8CKIT-037 board during the installation process because the controller board (CY8CKIT-042) is unable to send any data to the USB-to-UART Bridge Controller (CY7C65213) during the installation process.
  • Page 80: Upper Terminal Configuration Guide

    Then, click the Load button to import the variables.ini file into the Sensored BLDC Motor Control code example, as Figure 5-74 shows. Click the OK button to finish. Figure 5-74. Import variables .ini File ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 81 “SpeedRef” shows the reference motor speed. You can change or add monitoring variables by changing the command statement in the Editor window and keeping the Variable Settings window updated synchronously. Figure 5-76. Bridge Control Panel Editor ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 82 All five code examples use this command format: H = 0x55 and T =0XAA. Variables are 16 bits and always in “MSB-LSB” format. You can define your own commands by following these rules: Keep the default configuration, Press SW2 on CY8CKIT-037 to start the motor. You can see the real-time data in the Chart window, as Figure 5-77 shows.
  • Page 83 5-76), ensure that switch SW2 on CY8CKIT-037 is not pressed. If you press it, you will not see data display on the BCP Chart window. However, if you do press SW2, press SW1 on CY8CKIT-037 to reset the motor, and then complete all the configuration steps shown in...
  • Page 84: Lower Terminal Configuration Guide

    = (uint8)(UI_Data.speedRpm & 0x00FF); /* speed reference */ bcpTxBuffer[index++] = (uint8)((UI_Data.speedRpmRef & 0xFF00) >> 8); bcpTxBuffer[index++] = (uint8)(UI_Data.speedRpmRef & 0x00FF); /* package tail */ bcpTxBuffer[index++] = 0xAA; UART_BCP_SpiUartPutArray(bcpTxBuffer, index); ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 85: Reading The Motor Speed Using Bcp Commands

    Example. Program the HEX file. Connect a USB cable at the J11 port of CY8CKIT-037 to enable the motor speed to be viewed in the BCP. (Wait until driver enumeration is complete.) Open the BCP and import the UART commands related to the Sensored BLDC project. Refer the...
  • Page 86 Code Examples Figure 5-82. Motor Speed in Editor Window Figure 5-83. Motor Speed in Chart Window ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 87: Board Schematics, Board Layout, And Bom

    A. Appendix A.1. Board Schematics, Board Layout, and BOM Figure A-1. Board Schematics ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 88 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 89 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 90 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 91 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 92 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 93 Appendix ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 94 Appendix Figure A-2. Board Layout (Top Layer) ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 95 Appendix Figure A-3. Board Layout (Bottom Layer) ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 96: Bill Of Materials

    60R250XMR KINKAMO J1, J4 2.54mm PITCH SINGLE ROW 8POS PROTECTRON P9101-08-D32-1 HEADER, 13mm MATING LENGTH 2.54mm PITCH DUAL ROW 18POS PROTECTRON P9103-18-D32-1 HEADER, 13mm MATING LENGTH ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 97 RES 1.00K OHM 1/8W 1% SMD 0603 Vishay Beyschlag MCT06030C1001FP500 RES 590 OHM 1/10W 1% 0603 SMD Vishay Dale CRCW0603590RFKEA RES, 5.49K OHM, 1%, 1/10W, 0603, Panasonic-ECG ERJ-3EKF5491V ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 98 IC COMPARATOR DUAL 0.8MA 8-SOIC Rohm LM393DR Semiconductor U3, U4, U5, U6 IC DRIVER HIGH/LOW SIDE 8SOIC International IR2101STRPBF Rectifier IC OPAMP GP 8.4MHZ RRO SOT23-5 Analog Devices AD8601ARTZ-R2 ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 99: No Load Components

    Cypress CY7C65213-32LTXI BYTE FLASH, QFN-32 Semiconductor VARISTOR 67V 250A 1210 Littelfuse Inc V60MLA1210H CY8CKIT-037 MOTOR CONTROL SHIELD PCB (Size: 3.8 inch x 2.44 inch No of Layers: 2 Surface Finish: ENIG Solder Mask color: Red Board thickness: 1.6mm) A.3. No Load Components Table A-2.
  • Page 100: Special Installation Instructions

    Cypress Semiconductor Datecode, Serial Number CY8CKIT-037 Motor Control EVK Rev**(YYWWVVXXXXX) LBL, Assembly Adhesive Label, Manufacturing ID Cypress Semiconductor LBL, QR Code, CY8CKIT-037 Printed Circuit Cypress Semiconductor Assembly, 13mm X 13mm ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 101 Revision History Document History ® Document Title: CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide Document Number: 001-92562 Revision Orig. of Submission Description of Change Change Date 4784695 ROWA 06/02/2015 New document. 5761068 AESATMP9 06/02/2017 Updated logo and copyright. 5926483...
  • Page 102 Step 5 – Build the Project and Program PSoC Updated Updated description. Step 6 – Press the SW2 Button to Start Motor Updated Rotation: Updated description. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 103 Overview: Updated description. Updated Figure 5-63. Updated Running the Stepper Motor Control Code Example: Step 4 – Connect the Power Supply and Updated Motor: Updated description. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...
  • Page 104 Updated Bill of Materials: Updated Table A-1. Updated No Load Components: Updated Table A-2. Updated Special Installation Instructions: Updated Table A-3. Updated Label: Updated Table A-4. Completing Sunset Review. ® CY8CKIT-037 PSoC 4 Motor Control Evaluation Kit Guide, Doc. No. 001-92562 Rev. *C...

Table of Contents