Embedded Artists LPCXpresso User manual

LPCXpresso Motor Control Kit - User’s Guide
Copyright 2011 © Embedded Artists AB
EA2-USG-1101 Rev A
LPCXpresso Motor Control Kit
User’s Guide
Get Up-and-Running Quickly and
Start Developing Your Application On Day 1!

LPCXpresso Motor Control Kit - User’s Guide
Page 2
Copyright 2011 © Embedded Artists AB
Embedded Artists AB
Södra Promenaden 51
211 38 Malmö
Sweden
info@EmbeddedArtists.com
http://www.EmbeddedArtists.com
Copyright 2011 © Embedded Artists AB. All rights reserved.
No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or
translated into any language or computer language, in any form or by any means, electronic,
mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of
Embedded Artists AB.
Disclaimer
Embedded Artists AB makes no representation or warranties with respect to the contents hereof and
specifically disclaim any implied warranties or merchantability or fitness for any particular purpose.
Information in this publication is subject to change without notice and does not represent a
commitment on the part of Embedded Artists AB.
Feedback
We appreciate any feedback you may have for improvements on this document. Please send your
comments to support@EmbeddedArtists.com.
Trademarks
All brand and product names mentioned herein are trademarks, services marks, registered
trademarks, or registered service marks of their respective owners and should be treated as such.

LPCXpresso Motor Control Kit - User’s Guide
Page 3
Copyright 2011 © Embedded Artists AB
Table of Contents
1Document Revision History 5
2Introduction 6
2.1 Features 6
2.2 ESD Precaution 7
2.3 General Handling Care 7
2.4 Code Read Protection 7
2.5 Other Products from Embedded Artists 8
2.5.1 Design and Production Services 8
2.5.2 OEM / Education / QuickStart Boards and Kits 8
3Introduction 9
3.1 Board Structure 9
3.2 Motor Control Overview 9
3.3 Usage of CPU Pins 10
3.3.1 Notes about LPC1114 control 12
3.3.2 Notes about LPC11C24 control 12
3.3.3 Notes about LPC1343 control 13
3.3.4 Notes about LPC176x control 13
4LPCXpresso Motor Control Board Design 14
4.1 Phase Control 15
4.2 Phase Measurement 15
4.3 Input Stage and Break Functionality 15
4.4 Power Supply 16
4.5 Sensor Inputs 16
4.6 Controlling MCU, Expansion connector (J8) and JP6 16
4.6.1 LPCXpresso LPC1114 16
4.6.2 LPCXpresso LPC176x 16
4.6.3 Other controlling MCUs 16
4.7 Communication Interfaces 16
4.7.1 USB-to-UART Bridge Interface 17
4.7.2 USB Interface 18
4.7.3 CAN Interface 18
4.7.4 RS422/RS485 Interface 18
4.7.5 Ethernet Interface 18
4.8 HMI 18
4.9 Debug 19
4.10 Known Board Design Issues 19
4.11 Default Jumpers Positions 20
5Getting Started 21
5.1 Kit Content and Preparation 21

LPCXpresso Motor Control Kit - User’s Guide
Page 4
Copyright 2011 © Embedded Artists AB
5.1.1 Step 1: Mount LPCXpresso LPC1114 board 21
5.1.2 Step 2: BLDC Motor Preparation 22
5.1.3 Step 3: Connect Power Supply 23
5.1.4 Step 4: Loading the Demo Application 23
5.2 Installing USB Driver 27
5.3 Demo Application 28
5.4 Compiling the Demo Application 28
5.5 Things to Note/Known Issues 30
5.5.1 Evaluation Platform –Not for End-products 30
5.5.2 Power Supply 30
5.5.3 Board Errata 30
5.5.4 Screw Connectors 31
6Troubleshooting 32
6.1 Powering 32
6.2 Download Demo Application to LPCXpresso Board 33
6.3 Connect LPCXpresso Board 33
6.4 Power Electronics and BLDC Motor 34
7Further Information 35

LPCXpresso Motor Control Kit - User’s Guide
Page 5
Copyright 2011 © Embedded Artists AB
1 Document Revision History
Revision
Date
Description
PA1
2011-02-01
First (incomplete) version
PA2
2011-02-09
Second (more complete) version
PA3
2011-02-14
Preliminary version
PA4
2011-02-26
Corrected some smaller errors in text (demo application is not
preloaded) and text in Fig 20.

LPCXpresso Motor Control Kit - User’s Guide
Page 6
Copyright 2011 © Embedded Artists AB
2 Introduction
Thank you for buying Embedded Artists’ LPCXpresso Motor Control Kit based on NXP’s motor control
solutions. The board has been developed in close cooperation with NXP. The kit contains an
LPCXpresso board with LPC1114 target, which has a Cortex-M0 core, as motor controller. Several
other NXP MCUs can also be used with the board to demonstrate motor control.
This document is a User’s Guide that describes the combination of the LPCXpresso Motor Control
Board and the LPCXpresso LPC1114, together forming the LPCXpresso Motor Control Kit.
2.1 Features
Embedded Artists’ LPCXpresso Motor Control Kit makes it possible for you to get started with motor
control prototyping immediately. It is a universal platform for low voltage motor control based on NXP’s
MCUs. With this platform it is possible to control BLDC, BLAC, stepper and dual brushed DC motors.
The board has been designed for evaluation and is not designed for final integration into end-products
performing motor control.
Controller MCU
Socket for LPCXpresso LPC1114, LPC11C24 and LPC1343
Socket for LPCXpresso LPC176x
Socket for LPC1xxx in PLCC44
Expansion connector for control by LPC1800/LPC4000/LPC2900 families, or other
Phase Control
4 phases (based on NXP PMSN2R6-40YS NMOSFET), accessed via screw terminals
Phase control support 100% duty cycle
Voltage measurement (on three phases and virtual ground)
Current measurement (in-phase on three phases and common low-side)
Input current measurement, including over-current trip
Break functionality
Hall & QEI sensor inputs, connected via screw terminals
Temperature sensor
12-30V input voltage, 17A max current (max 300W output)
On-board 15W power supply (+11V, +5V, +3.3V)
Communication Interfaces
USB interface (must be supported by controlling MCU)
Ethernet interface (must be supported by controlling MCU)
CAN interface (must be supported by controlling MCU)
RS422/485 interface
UART-to-USB interface
User Interface
5-key joystick switch

LPCXpresso Motor Control Kit - User’s Guide
Page 7
Copyright 2011 © Embedded Artists AB
96x64 pixel OLED
Other
Reset pushbutton
I2C-E2PROM
SWD/JTAG connector
Dimensions
200 x 150 mm
Power Supply Input
2.1mm input jack, or via screw terminals
12-30V, 17A max
2.2 ESD Precaution
Please note that the LPCXpresso Motor Control Board and the LPCXpresso
LPC1114 Board come without any case/box and all components are exposed for
finger touches –and therefore extra attention must be paid to ESD (electrostatic
discharge) precaution.
Make it a habit always to first touch the metal surface of one of the USB or
Ethernet connectors for a few seconds with both hands before touching
any other parts of the boards. That way, you will have the same potential as
the board and therefore minimize the risk for ESD.
Note that Embedded Artists does not replace boards that have been damaged by ESD.
2.3 General Handling Care
Handle the LPCXpresso Motor Control Board and the LPCXpresso LPC1114 Board with care. The
boards are not mounted in a protective case/box and are not designed for rough physical handling.
Connectors can ware out after excessive use. The boards are designed for evaluation and prototyping
use, and not for integration into end-products.
The LPCXpresso Motor Control Board has an OLED display. Do not exercise pressure on the display
glass area or the flex cable connecting the display to the pcb. That will damage the display.
Note that Embedded Artists does not replace boards where the OLED has been improperly
handled.
Some components on the LPCXpresso Motor Control Board can become very hot during normal
operation. The BLDC motor is powerful and can cause damage of improperly used.
Be careful when working with the board and BLDC motor. Pay extra attention to safety
precaution.
2.4 Code Read Protection
The LPC1114 has a Code Read Protection function (specifically CRP3, see LPC1114 datasheet/user’s
manual for details) that, if enabled, will make the LPC1114 impossible to reprogram (unless the user
program has implemented such functionality).
Note that Embedded Artists does not replace LPCXpresso LPC1114 boards where the LPC1114
has CRP3 enabled. It’s the user’s responsibility to not invoke this mode by accident.

LPCXpresso Motor Control Kit - User’s Guide
Page 8
Copyright 2011 © Embedded Artists AB
2.5 Other Products from Embedded Artists
Embedded Artists have a broad range of LPC1000/2000/3000/4000 based boards that are very low
cost and developed for prototyping / development as well as for OEM applications. Modifications for
OEM applications can be done easily, even for modest production volumes. Contact Embedded Artists
for further information about design and production services.
2.5.1 Design and Production Services
Embedded Artists provide design services for custom designs, either completely new or modification to
existing boards. Specific peripherals and I/O can be added easily to different designs, for example,
communication interfaces, specific analog or digital I/O, and power supplies. Embedded Artists has a
broad, and long, experience in designing industrial electronics in general and with NXP’s
LPC1000/2000/3000/4000 microcontroller families in specific. Our competence also includes wireless
and wired communication for embedded systems. For example IEEE802.11b/g (WLAN), Bluetooth™,
ZigBee™, ISM RF, Ethernet, CAN, RS485, and Fieldbuses.
2.5.2 OEM / Education / QuickStart Boards and Kits
Visit Embedded Artists’ home page, www.EmbeddedArtists.com, for information about other OEM /
Education / QuickStart boards / kits or contact your local distributor.

LPCXpresso Motor Control Kit - User’s Guide
Page 9
Copyright 2011 © Embedded Artists AB
3 Introduction
The LPCXpresso Motor Control Kit is a universal platform for low voltage motor control based on
NXP’s MCUs. It is possible to control BLDC, BLAC, stepper and dual brushed DC motors. The platform
directly supports control via the LPCXpresso LPC1114 (included in kit), LPCXpresso LPC11C24 ,
LPCXpresso LPC1343 and LPCXpresso LPC176x boards. Note that mbed is not directly supported.
Other controlling MCUs can however be used via the expansion connector.
There is a 5 minute multimedia overview presentation of the board on the product’s web page. This
chapter also gives an overview of the board.
3.1 Board Structure
The LPCXpresso Motor Control Board has a structure as outlined in the picture below. The right side
contains the power electronics for driving the motor phases. The left side is the controlling side with
sockets for different LPCXpresso boards as well as a PLCC44 socket for LPC1xxx processor control.
The left side also contains an OLED and a joystick that can serve as a user interface to the system.
In between the two sides, an expansion connector is placed and there is also a special connector that
can disconnect the left side from controlling the right side (power electronic side). By disconnecting the
left side, the expansion connector can be used to let an arbitrary MCU control the board.
Figure 1 –LPCXpresso Motor Control Board Overview
3.2 Motor Control Overview
The LPCXpresso Motor Control Board has four phases that can be controlled. Voltage and in-phase
current can be measured on three of these phases. Common virtual ground and common DC-link
Communication Interfaces
Motor and Power Supply Connectors
HMI –User Interface (OLED + Joystick)
Control Side
Power Electronic Side

LPCXpresso Motor Control Kit - User’s Guide
Page 10
Copyright 2011 © Embedded Artists AB
current can also be measured. For rotor position measurement there are three hall sensor inputs and
optional quadrature sensor inputs. These control and measurement possibilities give great flexibility in
controlling different kinds of motors.
BLDC –Brushless DC motor
BLAC –Brushless AC motor
Stepper
Dual brushed DC motor
For a detailed description bout about motor control principles, please read the different Application
Notes from NXP.
3.3 Usage of CPU Pins
The table below lists which MCU pins that are used for controlling the different parts of the
LPCXpresso Motor Control board.
Signal
LPC1114/1343
pins in 3-phase
setup
Default
LPC1114/1343
pins in 4-phase
setup
LPC11C24 pins
in 3-phase setup
LPC11C24 pins
in 4-phase setup
LPC176x pins in
PWM mode
LPC176x pins in
Motor Control IP
block mode
PWM:
PHA-
High
PIO0_1 / CLKOUT
/ CT32B0_MAT2 /
USB_FTOGGLE
PIO0_1 / CLKOUT
/ CT32B0_MAT2 /
USB_FTOGGLE
PIO0_1 /
CLKOUT /
CT32B0_MAT2 /
USB_FTOGGLE
PIO0_1 /
CLKOUT /
CT32B0_MAT2 /
USB_FTOGGLE
P2.0 / PWM1.1 /
TXD1
P1.19 / MCOA0 /
USB_PPWR /
CAP1.1
PWM:
PHA-Low
PIO0_11 / AD0 /
CT32B0_MAT3
PIO0_11 / AD0 /
CT32B0_MAT3
PIO0_11 / AD0 /
CT32B0_MAT3
PIO0_11 / AD0 /
CT32B0_MAT3
P0.9 / I2STX_SDA /
MOSI1 / MAT2.3
P1.22 / MCOB0 /
USB_PWRD /
MAT1.0
PWM:
PHB-
High
PIO0_8 / MISO/
CT16B_MAT0
PIO0_8 / MISO/
CT16B_MAT0
PIO0_8 / MISO/
CT16B_MAT0
PIO0_8 / MISO/
CT16B_MAT0
P2.1 / PWM1.2 /
RXD1
P1.25 / MCOA1 /
MAT1.1
PWM:
PHB-Low
PIO0_9 / MOSI /
CT16B0_MAT1 /
SWO
PIO0_9 / MOSI /
CT16B0_MAT1 /
SWO
PIO0_9/ MOSI /
CT16B0_MAT1 /
SWO
PIO0_9/ MOSI /
CT16B0_MAT1 /
SWO
P0.8 / I2STX_WS /
MISO1 / MAT2.2
P1.26 / MCOB1 /
PWM1.6 / CAP0.0
PWM:
PHC-
High
PIO1_1 / AD2 /
CT32B1_MAT0
PIO1_1 / AD2 /
CT32B1_MAT0
PIO1_1 / AD2 /
CT32B1_MAT0
PIO1_1 / AD2 /
CT32B1_MAT0
P2.2 / PWM1.3 /
CTS1
P1.28 / MCOA2 /
PCAP1.0 / MAT0.0
PWM:
PHC-
Low
PIO1_2 / AD3 /
CT32B1_MAT1
PIO1_2 / AD3 /
CT32B1_MAT1
PIO1_2 / AD3 /
CT32B1_MAT1
PIO1_2 / AD3 /
CT32B1_MAT1
P0.7 / I2STX_CLK /
SCK1 / MAT2.1
P1.29 / MCOB2 /
PCAP1.1 / MAT0.1
PWM:
PHD-
High
Not available
PIO1_9 /
CT16B1_MAT0
Not available
PIO3_3
P2.3 / PWM1.4 /
DCD1
P2.3 / PWM1.4 /
DCD1
PWM:
PHD-
Low
Not available
PIO1_10 / AD6 /
CT16B1_MAT1
Not available
PIO1_10 / AD6 /
CT16B1_MAT1
P0.6 / I2SRX_SDA
/ SSEL1 / MAT2.0
P0.6 / I2SRX_SDA
/ SSEL1 / MAT2.0
Hall-A
PIO2_0 / DTR
PIO2_0 / DTR
PIO2_0 / DTR
PIO2_0 / DTR
P1.20 / MCI0 /
PWM1.2 / SCK0
P1.20 / MCI0 /
PWM1.2 / SCK0
Hall-B
PIO2_1 / DSR
PIO2_1 / DSR
PIO2_1 / DSR
PIO2_1 / DSR
P1.23 / MCI1 /
PWM1.4 / MISO0
P1.23 / MCI1 /
PWM1.4 / MISO0
Hall-C
PIO2_2 / DCD
PIO2_2 / DCD
PIO2_2 / DCD
PIO2_2 / DCD
P1.24 / MCI2 /
PWM1.5 / MOSI0
P1.24 / MCI2 /
PWM1.5 / MOSI0
QEI-PHA
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector

LPCXpresso Motor Control Kit - User’s Guide
Page 11
Copyright 2011 © Embedded Artists AB
QEI-PHB
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
QEI-
Index
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Only available at
expansion
connector
Analog:
BEMFA
PIO1_4 / AD5 /
CT32B1_MAT3 /
WAKEUP
PIO1_4 / AD5 /
CT32B1_MAT3 /
WAKEUP
PIO1_4 / AD5 /
CT32B1_MAT3 /
WAKEUP
PIO1_4 / AD5 /
CT32B1_MAT3 /
WAKEUP
P0.23 / AD0.0 /
I2SRX_CLK /
CAP3.0
P0.23 / AD0.0 /
I2SRX_CLK /
CAP3.0
Analog:
BEMFB
PIO1_10 / AD6 /
CT16B1_MAT1
Not available
PIO1_10 / AD6 /
CT16B1_MAT1
Not available
P0.25 / AD0.2 /
I2SRX_SDA /
TXD3
P0.25 / AD0.2 /
I2SRX_SDA /
TXD3
Analog:
BEMFC
PIO1_11 / AD7
PIO1_11 / AD7
PIO1_11 / AD7
PIO1_11 / AD7
P1.30 / VBUS /
AD0.4
P1.30 / VBUS /
AD0.4
Analog:
VZERO
Not available
Not available
Not available
Not available
P0.2 / TXD0 /
AD0.7
P0.2 / TXD0 /
AD0.7
Analog:
PHA-curr
Not available
Not available
Not available
Not available
P0.24 / AD0.1 /
I2SRX_WS /
CAP3.1
P0.24 / AD0.1 /
I2SRX_WS /
CAP3.1
Analog:
PHB-curr
Not available
Not available
Not available
Not available
P0.26 / AD0.3 /
AOUT / RXD3
P0.26 / AD0.3 /
AOUT / RXD3
Analog:
PHC-curr
Not available
Not available
Not available
Not available
P1.31 / SCK1 /
AD0.5
P1.31 / SCK1 /
AD0.5
Analog:
Current,
either
DC-curr.
or Input-
curr.
PIO1_0 / AD1 /
CT32B1_CAP0
PIO1_0 / AD1 /
CT32B1_CAP0
PIO1_0 / AD1 /
CT32B1_CAP0
PIO1_0 / AD1 /
CT32B1_CAP0
P0.3 / RXD0 /
AD0.6
P0.3 / RXD0 /
AD0.6
Analog
mux-ctrl
PIO1_8 /
CT16B1_CAP0
PIO1_8 /
CT16B1_CAP0
PIO1_8 /
CT16B1_CAP0
PIO1_8 /
CT16B1_CAP0
P0.28 / SCL0 /
USB_SCL
P0.28 / SCL0 /
USB_SCL
Break:
status0
PIO2_11 / SCK
PIO2_11 / SCK
PIO2_11 / SCK
PIO2_11 / SCK
P1.27 / CLKOUT /
USB_OVRCR /
CAP0.1
P1.27 / CLKOUT /
USB_OVRCR /
CAP0.1
Break:
status1
PIO0_2 / SSEL /
CT16B0_CAP0
PIO0_2 / SSEL /
CT16B0_CAP0
PIO0_2 / SSEL /
CT16B0_CAP0
PIO0_2 / SSEL /
CT16B0_CAP0
P2.5 / PWM1.6 /
DTR1
P2.5 / PWM1.6 /
DTR1
Break:
ctrl
PIO1_9 /
CT16B1_MAT0
Not available
PIO3_3
Not available
P3.25 / MAT0.0 /
PWM1.2
P3.25 / MAT0.0 /
PWM1.2
Input
current
trip
PIO0_7 / CTS
PIO0_7 / CTS
PIO0_7 / CTS
PIO0_7 / CTS
P2.12 / EINT2 /
I2STX_WS
P1.21 / MCABORT
/ PWM1.3 / SSEL0
P2.12 / EINT2 /
I2STX_WS
P1.21 / MCABORT
/ PWM1.3 / SSEL0
Input
current
reset
PIO3_5 (or
PIO2_5 on
LPC1343)
PIO3_5 (or
PIO2_5 on
LPC1343)
Not available
Not available
P0.18 / DCD1 /
MOSI0 / MOSI
P0.18 / DCD1 /
MOSI0 / MOSI
UART-
TXD
PIO1_7 / TXD /
CT32B0_MAT1
PIO1_7 / TXD /
CT32B0_MAT1
PIO1_7 / TXD /
CT32B0_MAT1
PIO1_7 / TXD /
CT32B0_MAT1
P0.15 / TXD1 /
SCK0 / SCK
P0.15 / TXD1 /
SCK0 / SCK
UART-
RXD
PIO1_6 / RXD /
CT32B0_MAT0
PIO1_6 / RXD /
CT32B0_MAT0
PIO1_6 / RXD /
CT32B0_MAT0
PIO1_6 / RXD /
CT32B0_MAT0
P0.16 / RXD1 /
SSEL0 / SSEL
P0.16 / RXD1 /
SSEL0 / SSEL
UART-
mux ctrl
PIO3_4 (or
PIO2_4 on
LPC1343)
PIO3_4 (or
PIO2_4 on
LPC1343)
PIO2_6
PIO2_6
P0.27 / SDA0 /
USB_SDA
P0.27 / SDA0 /
USB_SDA
RS485-
PIO1_5 / RTS /
PIO1_5 / RTS /
PIO1_5 / RTS /
PIO1_5 / RTS /
P0.22 / RTS1 / TD1
P0.22 / RTS1 / TD1

LPCXpresso Motor Control Kit - User’s Guide
Page 12
Copyright 2011 © Embedded Artists AB
3.3.1 Notes about LPC1114 control
The LPC1114 is limited in the number of available pins. All features of the LPCXpresso Motor Control
Board cannot be used on the board.
The default setup is to control three (of the four) phases. It is illustrated in the grayed column in the
table above. All four phases can however the controlled. The trade-off is to lose the back EMF analog
signal for phase B and the break control signal.
In-phase current measurement and virtual-ground voltage measurement analog signals are not
available for the processor.
The USB, CAN and Ethernet communication interfaces are not available simply because the LPC1114
does not support these interfaces on-chip.
The QEI interface is not connected to the LPC1114. This interface is only available via the expansion
connector.
3.3.2 Notes about LPC11C24 control
The limitations for LPC11C24 are the same as for the LPC1114, as described above. The only
differences are (pin numbering refers to the 2x27 pos edge connector of the LPCXpresso board):
The LPC11C24 has a CAN interface, which the LPC1114 does not have.
Pin PIO1_9 is not available (was pin 42). Instead pin PIO3_3 is connected to pin 42. This
affects the break control signal and PhD-H signal.
PIO3_3 moved (from pin 53) to pin 42 (see above).
PIO2_6 moved (from pin 48) to pin 46. This makes it impossible to read the joystick right key.
Pin PIO3_4 is not available (was pin 46). This affects the uart-mux signal, signal PIO2_6 shall
be used instead.
Pin PIO3_5 is not available (was pin 47). This makes it impossible to reset the input over-
current trip.
Pin PIO2_9 is not available (was pin 51). This makes it impossible to read the joystick center
key.
ctrl
CT32B0_CAP0
CT32B0_CAP0
CT32B0_CAP0
CT32B0_CAP0
Joystick-
up
PIO2_7
PIO2_7
PIO2_7
PIO2_7
P2.7 / RD2 / RTS1
P2.7 / RD2 / RTS1
Joystick-
down
PIO2_8
PIO2_8
PIO2_8
PIO2_8
P2.8 / TD2 / TXD2
P2.8 / TD2 / TXD2
Joystick-
right
PIO2_9
PIO2_9
Not available
Not available
P2.10 / EINT0 /
NMI
P2.10 / EINT0 /
NMI
Joystick-
left
PIO2_10
PIO2_10
PIO2_10
PIO2_10
P2.11 / EINT1 /
I2STX_CLK
P2.11 / EINT1 /
I2STX_CLK
Joystick-
center
PIO2_6
PIO2_6
Not available
Not available
RDP2.6
/ PCAP1.0 / RI1
RDP2.6
/ PCAP1.0 / RI1
OLED
Volt-EN
PIO2_3 / RI
PIO2_3 / RI
PIO2_3 / RI
PIO2_3 / RI
DP0.21
/ RI1 / RD1
DP0.21
/ RI1 / RD1
I2C-SDA
PIO0_5 / SDA
PIO0_5 / SDA
PIO0_5 / SDA
PIO0_5 / SDA
P0.10 / TXD2 /
SDA2 / MAT3.0
P0.10 / TXD2 /
SDA2 / MAT3.0
I2C-SCL
PIO0_4 / SCL
PIO0_4 / SCL
PIO0_4 / SCL
PIO0_4 / SCL
P0.11 / RXD2 /
SCL2 / MAT3.1
P0.15 / TXD1 /
SCK0 / SCK

LPCXpresso Motor Control Kit - User’s Guide
Page 13
Copyright 2011 © Embedded Artists AB
3.3.3 Notes about LPC1343 control
The limitations for LPC1343 are the same as for the LPC1114, as described above. The only
difference is that the LPC1343 has an USB interface, which the LPC1114 does not have.
3.3.4 Notes about LPC176x control
The LPC176x has more pins and can measure the same analog signals as the LPC1114/1343 plus
virtual ground (voltage) and in-chase current for phase A, B and C.
The LPC176x can control all four phases simultaneous without any trade-off. The PWM signals can be
generated in two different ways; either via the PWM peripheral block or via the motor control peripheral
block. The signals for these two different blocks are connected together, so the block that is inactive
must set the associated pins in input mode (so there is no interference with the block that is generating
the phase control signals).
The QEI interface is not connected to the LPC176x. This interface is only available via the expansion
connector.

LPCXpresso Motor Control Kit - User’s Guide
Page 14
Copyright 2011 © Embedded Artists AB
4 LPCXpresso Motor Control Board Design
This chapter contains information about the general design of the LPCXpresso Motor Control Board
and how to set the few jumpers on the board. The schematic can be downloaded in PDF from the
support page, and is recommended to have printed out while reading this chapter.
The datasheets for specific components must be read in order to obtain detailed and specific
information for different functions.
The following of this chapter is a walkthrough of the design from a functionality perspective. The
picture below gives an overview of where the different functions are located on the board.
Figure 2 –LPCXpresso Motor Control Board Detailed Overview
Break
control
SWD/JTAG
interface
Local power supply
(+11V/+5V/+3.3V)
Ethernet interface
Expansion
Connector
USB connector
for USB-to-
UART Bridge
Motor
winding
connector
Power
supply
input
CAN and RS485
interface
Voltage indicator
LEDs
Reset-LED and
push-button
LPCXpresso
Sockets
QEI
interface
Hall sensor
interface
USB interface
LPC1xxx
LPCC44
socket
OLED and
Joystick
JP6 –separation of
control and power
sides
Phase voltage
and current
measurements
Temperature
sensor
J13 –
access
motor
signals
4 phases
with gate
drivers
Inout current
measurements
nad trip. DC-
ink current
measurement

LPCXpresso Motor Control Kit - User’s Guide
Page 15
Copyright 2011 © Embedded Artists AB
4.1 Phase Control
There are four phases with full control. The gate drivers are based on the chip HIP4081AIBZ from
Intersil. This chip supports 100% duty cycle. See the datasheet for details.
As phase transistors, the N-channel MOSFET PSMN2R6-40YS from NXP is used. This MOSFET has
the following rating: 40V/100A and Rds on 2.8 mOhm.
4.2 Phase Measurement
It is possible to measure voltage and current individually on three of the four phases. In situation where
the fourth phase is used, there is no need for voltage and current measurement on the fourth phase.
Phase voltages are measures with 1/12 division and is low-pass filtered (). An extra capacitor can be
enabled by inserting jumpers on JP11-JP13, respectively, to further low-pass filter the voltage
measurement signals.
In-phase currents are measures via 5milli-ohm series resistors and AD8210 (U17-U19). The chip offers
x20 amplification of the current measurement signal and is bidirectional. When zero current the output
will be VREF/2 = 3.3/2 = 1.65V. Increasing voltage reflect current out from the board.
There is also a common virtual ground voltage measurement signal, which is used in some motor
control algorithms.
All voltage and current sense signals are available on J14 along with +5V supply voltage. It is possible
to create custom voltage and current measurement solutions via J14. SJ1-SJ7 can switch from the
standard measurement solution to the custom solution.
It is possible to measure phase A output signal via an adjustable comparator (U16 and R93). This can
be used to measure the gate driver delay (and to calibrate the motor control algorithm).
To simplify connection to an oscilloscope, all motor winding signals along with input voltage, VBUS and
shunt are available on J13 (just beside the screw connector J12).
4.3 Input Stage and Break Functionality
There are two input connectors for the power supply; either the 2.1mm power jack or via screw
connector J12. The power supply included in the kit has a 2.1mm power jack connector with positive
center. The voltage input (on both connectors) is reverse polarity protected via D34.
The reverse polarity protection diode (D34) also functions as part of the break functionality. If the motor
is spinning in generator mode (and is hence generating current) the motor voltage (schematic signal
net VBUS) will increase to a point where it will damage the electronics. D34 is used to measure the
voltage increase and if above a threshold, Q12 will connect the three power dissipation resistors
(R113, R118 and R120) to VBUS. This will quickly consume power and slow down the spinning motor
(i.e., function as a break).
R112 is used to measure the input current via U21 (a high-side current-shunt monitor). This chip has
x20 amplification so 10A will generate a 2V measurement signal. It also has a comparator which
makes it possible to set a trip point for over-current protection. The comparator output is directly
connected to the gate drivers and will disable these in case of an over-current situation. The over-
current trip point is adjustable between 3A and 18A with trimming potentiometer R127.
The input current measurement signal is connected to an analog input on the LPCXpresso target
boards, via analog multiplexor U1. Signal AIN-CTRL shall be high to measure the input current. If low,
the DC-link current measurement signal is instead connected (the common low-side current of the
phase drivers).
The board contains five big reservoir capacitors (5000uF, C65-C69). These capacitors will handle the
current spikes from the PWM control of the motor. They also make the input power supply requirement
less stringent in supplying large currents spikes. There is however a trade-off; there will be a high

LPCXpresso Motor Control Kit - User’s Guide
Page 16
Copyright 2011 © Embedded Artists AB
current spike when the power supply is connected. Some power supplies might go into over-current
protection because of this startup current spike.
4.4 Power Supply
The power supply input voltage is taken from the motor supply. It is in the range from 12-30V minus
one diode drop (D34). Three voltages are generated; +11V, +5V and +3.3V. A switching regulator,
U26 - LM5085MYE, is used to generate +11V/1.5A. The converter is designed for 15W. The +11V is
needed for the gate drivers and the OLED display. The +11V voltage us also used to generate +5V
and +3.3V via simple linear voltage regulators (U24 and U25). +5V is used to power external Hall
sensors and the current measurement circuits. The +3.3V is used to power the rest of the board.
4.5 Sensor Inputs
There are two main sensor input connectors, J9 and J10. J9, that is normally used, can either interface
Hall sensors or a quadrature sensor. There are three jumpers (JP7-JP9) to enable optional pullup or
pulldown resistors. Normally these jumpers are set to enable the pullup resistors since the kit contains
a BLDC motor with Hall sensors.
There is also J10 that is a quadrature sensor input. The signals from this connector are only available
on the expansion connector since no LPCXpresso board has enough pins to handle these signals.
The board also contains an i2c temperature sensor (LM75A). It is supposed to measure the
temperature on the power electronics, but due to position on board and general mounting of the board,
the temperature measured is not precise. It is included for completeness in demo applications since
real motor control applications must monitor the temperature of the controller.
All sensor input signals are available on J11 to simplify connection to an oscilloscope or logic analyzer.
4.6 Controlling MCU, Expansion connector (J8) and JP6
The LPCXpresso Motor Control Board has been designed for direct interface to a number of
LPCXpresso boards; LPC1114, LPC11C24, LPC1343 and LPC176x. There is also a PLCC44 socket
for LPC11xx processors.
Section 3.3 contains a description of which pins to interface the LPCXpresso Motor Control board are
used on different LPCXpresso boards.
4.6.1 LPCXpresso LPC1114
This is the default configuration and is what is delivered with the LPCXpresso Motor Control Kit.
4.6.2 LPCXpresso LPC176x
Note that in case an LPCXpresso LPC176x board shall be used, pin-lists for the two 27 pos edge
connectors must also be soldered. Also the 19 signal positions in between the edge connectors must
have pin-lists soldered.
4.6.3 Other controlling MCUs
There is also an expansion connector (J8, see schematic page 6) where all relevant signals for the
power electronic side are available. Other MCUs can be used to control the LPCXpresso Motor Control
Board, like the LPC2900, LPC1800 and LPC4300 families.
The control side of the board can be disconnected, if needed, by removing the solder bumps in JP6.
4.7 Communication Interfaces
There are multiple communication interfaces on the LPCXpresso Motor Control Board. The picture
below gives a detailed overview of the interfaces and the following sub-sections explain each interface
in more detail.

LPCXpresso Motor Control Kit - User’s Guide
Page 17
Copyright 2011 © Embedded Artists AB
Figure 3 –LPCXpresso Motor Control Board Communication Interfaces
4.7.1 USB-to-UART Bridge Interface
There is a UART-to-USB bridge on the board. This is to simplify connection to a PC because serial
ports are not so common any more, especially not on laptops. It is the controlling MCU’s UART that is
connected to the USB channel. This UART can for example be used as the console channel for
applications. Printf() output is typically directed to this UART channel.
The UART-to-USB bridge is based on the chip FT232RL from FTDI. A driver is typically needed to be
installed on the PC side. The driver creates a virtual COM port on the PC that represents the UART
channel. Any program on the PC can connect to this COM port for communication with the controlling
MCU on the board. There are two LEDs (Transmit –LED2 and Receive –LED1) that signal
communication activity.
Note that signal UART_RS485 must be high in order to connect the UART signals to the USB-to-UART
bridge. The signal UART_RS485 controls a multiplexor (U7/U8) for the UART_TXD/UART_RXD
Ethernet interface
connector (J4)
USB connector (J6)
for USB-to-UART
Bridge
CAN and RS422/485
interface connector (J7)
From top to bottom:
8: CAN-H
7: CAN-L
6: GND
5: RS422 RX+
4: RS422 RX-
3: RS422 TX+
2: RS422 TX-
1: GND
USB interface
connector (J5)
LEDs for signaling
UART communication
activity (LED1-LED2)
Termination Resistors
Control (JP5)
Jumper 1-2 inserted by
default
RS422/485 Select (JP4)
Both jumpers inserted by
default,

LPCXpresso Motor Control Kit - User’s Guide
Page 18
Copyright 2011 © Embedded Artists AB
signals. The MCU UART can be connected to either to the USB-to-UART bridge or the RS422/485
interface.
4.7.2 USB Interface
The USB interface (J5 on schematic page 4) is currently only supported by the LPCXpresso LPC1343
and LPC176x boards. The controlling MCU must have an on-chip USB interface.
The interface is very straight forward and consists of a mini-B USB connector, ESD protection, VBUS
sense and DP pull-up resistor control.
4.7.3 CAN Interface
There is a CAN interface on the board that is based on the NXP chip TJF1051T/3. The interface is
straight forward consisting of a CAN transceiver, ESD protection and connector.
The CAN interface (part of connector J7 on schematic page 4) is currently only supported by the
LPCXpresso LPC176x board. The controlling MCU must have an on-chip CAN interface.
Note that there are no termination resistors in the CAN interface. If needed, such termination resistors
must be connected externally.
Note that the LPCXpresso LPC11C24 has an on-chip CAN-transceiver. The interface connector to this
is located on the LPCXpresso LPC11C24 board. The CAN interface and associated connector on the
LPCXpresso Motor Control board is in this case not used.
4.7.4 RS422/RS485 Interface
There is a RS422/485 interface on the board based on SN65HVD35. RS422 has individual transmit
and receive pairs, while RS485 share the same signal pair (and is hence half-duplex). By inserting
both jumpers in JP4, the two signal pairs are connected and a RS485 interface is created. By removing
the jumpers in JP4 a RS422 interface is created. Via JP5 it is also possible to add termination
resistors, if needed. Note the different orientation for jumpers in JP4 and JP5.
The transceiver (U6 on schematic page 4) has built-in ESD protection.
Communication direction over the RS485 interface is controlled via signal RS485-RTS and is by
default half-duplex (i.e., no simultaneous transmit and receive). A high level enables the transmitter
while a low level enables the receiver. It is possible to remove R30 in order to always enable the
receiver. The transmitter is still controlled by the signal RS485-RTS.
Note that signal UART_RS485 must be low in order to connect the UART signals to the RS422/485
interface. The signal UART_RS485 controls a multiplexor (U7/U8) for the UART_TXD/UART_RXD
signals. The MCU UART can be connected to either to the USB-to-UART bridge or the RS422/485
interface.
4.7.5 Ethernet Interface
The Ethernet interface (J4 on schematic page 4) is currently only supported by the LPCXpresso
LPC176x board. The interface is actually just a RJ45 connector with integrated magnetics. The
Ethernet-PHY interface is on the LPCXpresso board.
4.8 HMI
The board contains an OLED display and a joystick that can be used as Human-Machine Interface to
the motor control application. These components can be found on schematic page 5. The OLED is
interfaces via the I2C bus and communication speed is limited to the 400kHz limit of the I2C
specification. The OLED requires an external +11V supply. This voltage must be controlled in a timely
manner. See the sample driver code from the support page for details and/or read the datasheet for
the display.
The 5-key joystick is connected to the controlling MCU via direct digital signals.

LPCXpresso Motor Control Kit - User’s Guide
Page 19
Copyright 2011 © Embedded Artists AB
4.9 Debug
There is a SWD/JTAG connector interface (J3 on schematic page 3) that is normally used for the
LPC1xxx MCU in the PLCC44 socket. J3 is the new and smaller footprint standard ARM debug
connector. It has 2x5 pins in 50 mil pitch. The connector supports both the SWD and JTAG interfaces,
but LPC11xx/13xx processors only support SWD. Note that not all, and in particular older, JTAG debug
probes do not support the SWD interface standard.
When an LPCXpresso boards is used to control the board, the LPC-LINK is typically used to download
program code and debugging via the SWD/JTAG interface. In this case there is no need to use J3.
Note that in case J3 is used with an LPCXpresso board, the LPC-LINK side of the LPCXpresso board
must be disconnected. Else there will be two drivers of the SWD/JTAG interface.
4.10 Known Board Design Issues
This section lists a couple of known design issues that is good to know when using the board for motor
control evaluation.
1. The powering and reset structure of the USB-to-UART chip (FT232RL, U5 on schematic page
4) is not optimal in some situations. If a USB cable is not connected, the TX and RX LEDs are
on since the chip is not powered. It is no problem with this other than an irritating light from
the two LEDs. When using the USB channel to send UART communication to a PC, i.e.,
when a USB cable is actually connected, the chip will be reset when the internal reset signal
is active (for example by the reset push-button). This will cause a new USB enumeration in
the PC and it will take a few seconds to complete. During this time, no UART communication
will be forwarded over the USB channel. A workaround for this USB enumeration delay is to
add a 5 second delay in the application code before the UART is actually used.
2. The three LEDs (LED5-LED7 on schematic page 10) that indicate voltage presence (VBUS,
+11V and +3.3V) are quite bright and can get somewhat hot. In case the bright light is
irritating, the LEDs can be removed from the board or covered. Note that (de-)soldering on
the board voids any warranty.
3. The I2C-temperature sensor (U12 on schematic page 12) is mounted on the board in a way
that is inappropriate for real applications. It does not measure the true temperature on the
phase driver stages. The temperature sensor is only included for completeness of
sample/demo motor control applications. It is suitable to set the temperature trip level to a
very low value, i.e., just above room temperature. 40-45 degrees Celsius is a suitable trip
level. The voltage indicator LEDs actually heats the temperature sensor somewhat (typically
5-10 degrees Celsius).
4. The five input capacitors have a combined capacitance of 5000uF (C65-C69 on schematic
page 10). The high capacitance is needed to smooth the current pulses from the PWM control
of the motor. It reduces the requirements on the external power supply.
A (negative) consequence of the high input capacitance is a high inrush current when an
external power supply is connected. The over-current protection on some power supplies
might be triggered by this. The power supply must be able to handle the high inrush current.
5. The CAN interface does not have any termination resistor. If needed, such termination
resistor must be added externally.

LPCXpresso Motor Control Kit - User’s Guide
Page 20
Copyright 2011 © Embedded Artists AB
4.11 Default Jumpers Positions
Figure 4 illustrates the default jumper positions as mounted when the board is delivered from
Embedded Artists.
Figure 4 –Default jumper positions
Other manuals for LPCXpresso
2
Table of contents
Popular Controllers manuals by other brands

Tyro
Tyro Fornax Basic manual

Toro
Toro DXi-TWICE-EXP installation guide

POSEIDON
POSEIDON Triton/Octopus instructions

Star Solar
Star Solar MPPT-05 Installation and operation manual

Technische Alternative
Technische Alternative uvr1611 manual

Eaton
Eaton AMPGARD Installation, operation and maintenance instructions

WAREMA
WAREMA KNX secure Series installation instructions

Zendure
Zendure Smart PV Hub 1200 Controller user manual

Dresser
Dresser RB 4000 DN100 instruction manual

Scott Fetzer
Scott Fetzer WESTERN CGA-200 quick start guide

FSIP
FSIP IC3645SR4A403E1 Installation and operation manual

Elan
Elan V883 Specifications