8-bit PIC® Microcontrollers for Motor Control Precision Control with Integrated Feedback Summary Designers of motor control applications constantly face the challenge of increasing efficiency and control, while reducing system cost and components. Finding a balance within these constraints can be accomplished by employing preferred techniques such as Peak Current Mode Control (PCMC). To optimize the efficiency of any system, precise control over switch timing and maintaining constant feedback is crucial. Using a PIC MCU with switch drive capability and feedback components integrated into one chip can help you simplify your system design and reduce costs. Levels of Motor Control Within the motor control market, there are different levels of integration and intelligence. Each increase provides more precision and control as well as system efficiency. The most commonly used levels are described below: ■■ Level 1: Limited intelligence is required; the MCU is used for basic control and supervisory functions. The controller handles on/off control, temperature monitoring, automatic shutdown and watchdog fault detection. ■■ Level 2: This level of integration utilizes an MCU with PWMs for motor drive and to interface with analog components for feedback control. The controller is now able to adjust the motor speed depending on application needs, overcurrent or thermal shutdown conditions. Communication can be found in remote applications for improved system control. Advanced systems may require special features to ensure safe motor operation in accordance with government regulations. ■■ Level 3: The last level adds increased intelligence for improved efficiency. The controller provides control over motor waveforms and commutation, which allows the use of advanced algorithms to optimize control and efficiency. Increased system flexibility is needed to reconfigure control loops on the fly as needed for the application. 8-bit PIC MCUs for Motor Control Products within the 8-bit PIC MCU families offer performance up to 16 MIPS, with many different options that can handle each level of integration. Core Independent Peripherals (CIP) optimized for controlling 1/2 bridge, H-bridge and 3 phase motors, coupled with Intelligent Analog for Peak Current Mode Control (PCMC) and software PID controller creation, as well as communication peripherals, provide the integration needed to reduce system cost while increasing efficiency and control. From the simplicity of the PIC10F family to the hardware multiplier of the PIC18F, the 8-bit PIC MCU product line has the right solution for your system design. Integrated Peripherals Intelligent Analog and Control ■■ Math Accelerator (MathACC) • Multiply, add and accumulate 8-/16-bit values with 35-bit results • Calculates a 16-bit PID function based on configurable K p, K i and K d constants with a 34-bit result ■■ Hardware Multiplier (MULT) • Multiply 8-bit values with 16-bit resolution ■■ Angular Timer (AngTMR) • Phase angle timer for measurement and control of rotational and periodic events ■■ Zero Cross Detect (ZCD) • AC high-voltage zero crossing detection for simplifying TRIAC control, synchronized switching control and timing ■■ 24-bit Signal Measurement Timer (SMT) • Accurate measurement of any digital signal including period, duty cycle, time of flight and instantaneous vs. average measurements • General-purpose 24-bit timer/counter ■■ Hardware Limit Timer (HLT) • Hardware monitoring for missed periodic events and fault detection • General-purpose 8-bit timer/counter with external reset capabilities ■■ Configurable Logic Cell (CLC) • Integrated combinational and sequential logic • Custom interconnection and re-routing of digital peripherals ■■ Operational Amplifier (OPA) • General purpose op amp for internal and external signal source conditioning ■■ High Speed Comparator (HSComp) • General purpose rail-to-rail comparator with < 50 ns response time Integrated Peripherals (Continued) ■■ Pulse Width Modulation (PWM) • General-purpose 10-bit PWM ■■ (Enhanced) Capture Compare PWM (CCP/ECCP) • 10-bit PWM control with 16-bit capture, compare and auto shutdown ■■ Complementary Output Generator (COG) • Automated complementary output with programmable rising/falling edge events, auto shutdown, polarity, phase, precision deadband and blanking control ■■ Complementary Waveform Generator (CWG) • Automated complementary output with auto shutdown and deadband control ■■ Numerically Controlled Oscillator (NCO) • Precision linear frequency generator (PWM @ 50% duty cycle) with 0.0001% step size of source input clock frequency • General-purpose 20-bit timer/counter Intelligent Analog and Control (Continued) ■■ Digital to Analog Converter (DAC ) • Programmable voltage reference with multiple internal and external connections ■■ Analog to Digital Converter (ADC) • General purpose 8-/10-/12-bit ADC with stable voltage reference Signal Generation ■■ Programmable Switch Mode Controller (PSMC) • 16-bit PWMs with dedicated 64 MHz clock • Automated complementary output with programmable rising/falling edge events, auto shutdown, polarity, phase, deadband and blanking control • General-purpose 16-bit timer/counter ■■ 16-bit PWM • 16-bit PWM with edge and center aligned modes • General-purpose 16-bit timer/counter COG/CWG CLC HLT SMT I2C/SPI – – – – – – 1 – 1 0/1 1 – – – – – – – 1/0/0 1 – 3 – – 0/1 – – – – 1 PIC12F1612 3.5K 256 HEF* 6 0/4/0 – – – 0/1/0 1 2/0 – – – 0/1 – 3 2 – – PIC16F1615 14K 1K HEF* 12 0/8/0 – 1/0 1 0/1/0 2 2/0 2 – – 0/1 4 3 2 1 1 1 SRAM (B) EUSART NCO 3/0/0 0/4/0 PWM 4 6 AngTMR – HEF* Op Amp 64 256 A/D (Ch) 8/10/12b 896 3.5K I/O Pins PIC10F322 PIC12F1572 Device EEPROM PSMC CCP/ECCP Comparator DAC 5/8/9b MathACC/ MULT Program Memory (B) Select 8-bit MCUs for Motor Control PIC16F1829 14K 1K 256 18 0/12/0 – – – 1/0/0 2 2/2 – – – – – – – 1 PIC16F1709 14K 1K HEF* 18 0/12/0 2 – – 0/1/0 2 2/0 2 – – 1/0 3 – – 1 1 PIC16F1619 14K 1K HEF* 18 0/12/0 – 1/0 1 0/1/0 2 2/0 2 – – 0/1 4 4 2 1 1 PIC18F24K22 16K 512 256 18 0/12/0 – 0/1 – – 2 0/1 – – – – – – – 1 1 PIC16F1789 28K 2K 256 36 0/0/14 3 – – 3/1/0 4 3/0 – 4 – – – – – 1 1 PICkit™ 3 In-Circuit Debugger (PG164130) MPLAB® ICD 3 In-Circuit Debugger (DV164035) PICDEM™ Lab Development Kit (DM163045) MPLAB PM3 Universal Device Programmer (DV007004) MPLAB Starter Kit for PIC18F MCU (DM180021) ■■ ■■ ■■ ■■ ■■ ■■ *HEF = 128B of High-Endurance Flash Development Tools ■■ ■■ ■■ ■■ ■■ PICDEM PIC18 Explorer Board (DM183032) F1 LV Evaluation Platform (DM164130-5) F1 BLCD Motor Add-On (DM164130-2) F1 BDC Motor Add-On (DM164130-6) F1 Bipolar Motor Add-On (DM164130-7) F1 Unipolar Motor Add-On (DM164130-8) www.microchip.com/8bit Visit our web site for additional product information and to locate your local sales office. Microchip Technology Inc. • 2355 W. Chandler Blvd. • Chandler, AZ 85224-6199 Information subject to change. The Microchip name and logo, the Microchip logo, MPLAB and PIC are registered trademarks and PICDEM and PICkit are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks mentioned herein are property of their respective companies. © 2015, Microchip Technology Incorporated. All Rights Reserved. Printed in the U.S.A. 8/15 DS30010025C