设为首页 网站地图 加入收藏


[原创] Cypress PSoC 4马达控制解决方案

关键词:Arm Cortex-M0+ MCU PSoC 容式触摸感应系统(CapSense) 马达控制

时间:2019-10-28 13:30:53       来源:中电网

cypress公司的PSoC®4是一款可扩展和可重新配置的平台架构,适用于Arm®Cortex®-M0+ CPU的可编程嵌入式系统控制器系列.它将可编程和可重配置的模拟和数字模块与灵活的自动布线相结合.PSoC 4100PS是PSoC 4平台架构的成员.它结合了具有标准通信和时序外设的微控制器,具有业内最佳性能的电容式触摸感应系统(CapSense),可编程通用连续时间和开关电容模拟模块以及可编程连接.PSoC 4100PS包括在硬件和软件上广泛支持的编程,测试,调试和跟踪.可编程模拟区块包括有两个专用的ADC和12位ASR ADC和一个10位单斜率ADC,四个运放,两个低功耗比较器,以及用来创建定制模拟前端(AFE)的确灵活的38路模拟复接器,两个13位电压ADC,两个用于通用或电容检测的7位电流DAC(IDAC).32位信号处理引擎包括工作频率高达48MHz的ARM Cortex-M0+ CPU,多达具有读加速器的32KB闪存,多达4KB SRAM,八路基于描述符的DMA控制器,工作电压1.71V-5.5V,主要用在永磁同步马达(PMSM),步进马达和无刷DC电机(BLDC).本文介绍了PSoC 4100PS主要特性,框图和PSoC马达控制评估板CY8CKIT-037主要特性,框图,几种马达控制代码样本框图,电路图,材料清单和PCB设计图.

Cypress’PSoC® 4 is a scalable and reconfigurable platform architecture for a family of programmable embedded system controllerswith an Arm® Cortex™-M0+ CPU. It combines programmable and reconfigurable analog and digital blocks with flexible automaticrouting. PSoC 4100PS is a member of the PSoC 4 platform architecture. It is a combination of a microcontroller with standardcommunication and timing peripherals, a capacitive touch-sensing system (CapSense) with best-in-class performance, programmablegeneral-purpose continuous-time and switched-capacitor analog blocks, and programmable connectivity.PSoC 4100PS devices include extensive support forprogramming, testing, debugging, and tracing both hardwareand firmware.

The ARM Serial-Wire Debug (SWD) interface supports allprogramming and debug features of the device.Complete debug-on-chip functionality enables full-devicedebugging in the final system using the standard productiondevice. It does not require special interfaces, debugging pods,simulators, or emulators. Only the standard programmingconnections are required to fully support debug.

The PSoC Creator IDE provides fully integrated programmingand debug support for the PSoC 4100PS devices. The SWDinterface is fully compatible with industry-standard third-partytools. The PSoC 4100PS family provides a level of security notpossible with multi-chip application solutions or withmicrocontrollers. It has the following advantages:

■ Allows disabling of debug features
■ Robust flash protection
■ Allows customer-proprietary functionality to be implemented inon-chip programmable blocks

The debug circuits are enabled by default and can be disabledin firmware. If they are not enabled, the only way to re-enablethem is to erase the entire device, clear flash protection, andreprogram the device with new firmware that enables debugging.

Thus firmware control of debugging cannot be over-riddenwithout erasing the firmware thus providing security.

Additionally, all device interfaces can be permanently disabled(device security) for applications concerned about phishingattacks due to a maliciously reprogrammed device or attempts todefeat security by starting and interrupting flash programmingsequences. All programming, debug, and test interfaces aredisabled when maximum device security is enabled. Therefore,PSoC 4100PS, with device security enabled, may not bereturned for failure analysis. This is a trade-off the PSoC 4100PSallows the customer to make.

PSoC 4100PS主要特性:

Programmable Analog Blocks
■ Two dedicated analog-to-digital converters (ADC) including a12-bit SAR ADC and a 10-bit single-slope ADC
■ Fouropamps, two low-power comparators, and a flexible38-channel analog mux to create custom Analog Front Ends(AFE)
■ Two 13-bit Voltage DACs
■ Two 7-bit Current DACs (IDACs) for general-purpose or capacitivesensing applications on any pin
CapSense® Capacitive Sensing
■ Cypress’s fourth-generation CapSense Sigma-Delta (CSD)providing best-in-class signal-to-noise ratio (SNR) and watertolerance
■ Cypress-supplied software component makes capacitivesensing design easy
■ Automatic hardware tuning (SmartSense™)
Segment LCD Drive
■ LCD drive supported on all pins (common or segment)
■ Operates in Deep-Sleep mode with four bits per pin memory
Programmable Digital Peripherals
■ Three independent serial communication blocks (SCBs) thatare run-time configurable as I2C, SPI or UART
■ Eight 16-bit timer/counter/pulse-width modulator (TCPWM)blocks with center-aligned, edge, and pseudo-random modes
32-bit Signal Processing Engine
■ ARM Cortex-M0+ CPU up to 48 MHz
■ Up to 32 KB of flash with read accelerator
■ Up to 4 KB of SRAM
■ Eight-channel descriptor-based DMA controller
Low-Power Operation
■ 1.71-V to 5.5-V operation
■ Deep-Sleep mode with operational analog and 2.5-μA digitalsystem current
■ Watch Crystal Oscillator (WCO)
Programmable GPIO Pins
■ Up to 38 GPIOs that can be used for analog, digital, CapSense,or LCD functions with programmable drive modes, strength andslew rates
■ Includes eight Smart I/Os to implement pin-level Booleanoperations on input and output signals
■ 48-pin QFN, 48-pin TQFP, 28-pin SSOP, and 45-ball WLCSPpackages
PSoC Creator Design Environment
■ Integrated Design Environment (IDE) providesschematic-capture design entry and build (with automaticrouting of analog and digital signals) and concurrent firmwaredevelopment with an ARM-SWD debugger
■ GUI-based configurable PSoC Components with fullyengineered embedded initialization, calibration and correctionalgorithms
■ Application Programming Interfaces (API) for all fixed-functionand programmable peripherals
Industry-Standard Tool Compatibility
■ After schematic-capture, firmware development can be donewith ARM-based industry-standard development tools

图1.PSoC 4100PS框图


Thanks for your interest in the CY8CKIT-037 PSoC® 4 Motor Control Evaluation Kit (EVK). This kit enables engineers to evaluate Cypress’ PSoC 4 family of devices for motor control applications. Based on this kit, customers can create control solutions for three major motor types: Permanent Magnet Synchronous Motor (PMSM), stepper, and Brushless DC (BLDC).

The Cypress PSoC family of devices integrates abundant internal resources for motor control applications, such as Timer Counter Pulse Width Modulator (TCPWM), SAR ADC, comparators, opamps, and universal digital blocks (UDBs). In addition, an Arm® Cortex® core enables high-performance motor control solutions on PSoC devices. Headers provided on the EVK board allow you to connect it to the CY8CKIT-042 PSoC 4 Pioneer Kit board to create a complete motor control system.

This kit guide provides the circuit structure of the Motor Control EVK board and explains how to configure it to create a solution for different motor types. It provides five code examples that cover sensored and sensorless BLDC control, PMSM sensorless field-oriented control (FOC), and stepper motor microstepping control. It also introduces the Bridge Control Panel (BCP) as a debugging tool in the motor control development process.

The CY8CKIT-037 PSoC® 4 Motor Control Evaluation Kit is intended for use as a motor control development platform for hardware or software in a laboratory environment. The board is an open-system design, which does not include a shielded enclosure. Therefore, the board may cause interference with other electrical or electronic devices in close proximity. In a domestic environment, this product may cause radio interference. In such cases, the user may be required to take adequate preventive measures. Also, this board should not be used near any medical equipment or RF devices.

Attaching additional wiring to this product or modifying the product operation from the factory default may affect its performance and cause interference with other apparatus in the immediate vicinity. If such interference is detected, suitable mitigating measures should be taken.

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. The controller board receives the signals, implements the proper algorithm to process them, and then generates control signals to the driver board to run the motor. Figure 3-1 shows the EVK board and its general description. CY8CKIT-037 EVK is the driver board; the CY8CKIT-042 kit works as the controller board. They are interfaced with Arduino-compatible connectors.

The CY8CKIT-037 PSoC 4 Motor Control EVK includes the following:

• CY8CKIT-037 Motor Control Evaluation Board
• 24-V/2.1-A AC-DC Adapter
• BLDC motor (BLY172S-24V-4000) with sinusoidal back electromotive force
• USB Standard-A to Mini-B cable
• Configuration Jumpers
• Fuse
• Screwdriver
• Quick Start Guide



图4.评估板CY8CKIT-037插入CY8CKIT-042 Pioneer板中外形图图












图16.马达控制评估板CY8CKIT-037 PCB布局图(顶层)

图17.马达控制评估板CY8CKIT-037 PCB布局图(底层)

图18.马达控制评估板CY8CKIT-037 PCB设计图(1)

图19.马达控制评估板CY8CKIT-037 PCB设计图(2)

图20.马达控制评估板CY8CKIT-037 PCB设计图(3)

图21.马达控制评估板CY8CKIT-037 PCB设计图(4)

CY8CKIT-037 Board Design

  • 分享到: