AVR470: MC310 Hardware User Guide

AVR470: MC310 Hardware User Guide
Features
•
•
•
•
•
•
•
•
•
•
Motor Control device board for Atmel ATmega32M1
Modular system with 2,54mm pin header connectors for power board MC300
Sensor & sensorless modes capabilities for DC motors
Hall sensor header
Potentiometer for motor control
Networking interfaces : LIN, CAN
Headers for Atmel DB101 Display module
USB interface for PC connection
Works with Atmel Motor Control Center software
Electric specifications:
– Supplied with Power board like MC300 from 3.3V up to 5V
8-bit
Microcontroller
Application Note
1. Introduction
The MC310 is the device board for ATmega32M1 AVR® microcontroller. Connected to
the power stage board MC300, it enables to drive brushless DC, brushed DC and
stepper motors.
The ATmega32M1 is the first AVR ® microcontroller of a new family dedicated to
advanced motor-control applications.
The MC310 board can be used to start development of applications which need to
drive motors in sensor or sensorless mode with accurate control of speed and torque.
These can be in the following automotive domain:
• Body Electronics:
– sliding doors, Window lift with anti-pitch, Seat adjuster, Sun Roof, Power
trunk, Ventilation/FAN control
• Chassis:
– Steering wheel Assistance, Synchronized adjustable pedals
• Powertrain Control
– Braking assistance, Throttle Valve actuator, Engine Cooling
• In-vehicle Networking
– Local Interconnect network (LIN), Controller Area Network (CAN)
7802A–AVR–07/08
This board is also designed to be connected on any other driver board which could share the
same interface. Power and all signals needed for a power stage board are available on the right
side of the board. Interfaces like USB or Atmel DB101 Display module are also available for
enhanced human interface.
Figure 1-1.
MC310 Motor control ATmega32M1 processor board
2. Hardware overview
Please refer to schematics, layout and BOM available at http://www.atmel.com.
The MC310 motor control processor board is a ATmega32M1 AVR® microcontroller solution connected to a power stage board intended for driving DC motors (Brushless or brushed). All
signals coming from the power stage board are connected to the microcontroller either directly
or through jumpers for sensorless or sensor configuration. External comparators present on the
board allow for the sensorless control mode with this particular ATmega32M1.
A potentiometer can control speed and rotation direction of the motor.
A UART to USB bridge is available to transfer motor control status & commands to a PC software interface: Atmel Motor Control Center.
Three 2,54mm headers are available to add the Atmel DB101 Display module in order to
enhance visualization of motor control data & commands.
Three 8-pin & one 16-pin 2,54mm (100mil) horizontal male pin headers on the right side of the
board form a system connector for the power boards like MC300.
Both microcontrollers: ATmega32M1 & AT90USB1287 have their own debug/ISP interface for
user’s specific developments.
Test points either mounted or not, are also available for instrumentation.
AVR470
2
7802A–AVR–07/08
AVR470
2.1
PCB Layout
The MC310 is organized as shown in 2-1. Most signals, important components and jumper information are written on the silk screen. For individual component placement refer to the
component floorplan.
Figure 2-1.
MC310 PCB layout
8
10
9
7
4
2
1
5
3
5
5
6
In 2-1 the following areas are marked:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Power board connector.
Sensor/sensorless mode configuration jumpers
USB bridge
Communication interface selection (ISP, LIN, UART, USB, Potentiometer)
Atmel DB101 Display module headers
Hall sensors header
Potentiometer for manual command
LIN interface and connection
CAN interface and connection
RS232 interface and connection
3
7802A–AVR–07/08
2.2
Specifications
MC310 maximum ratings with components as delivered:
Input:
• Vin: 10 – 20VDC coming from the Power board
• Vm: 0 – 40VDC, Immax = 6A
• UVcc : 3.3v to 5V
Output ratings:
• Vcc = 3.3/5V, Imax = 0.5A
• Vha = 5V, Imax = 0.1A
When working at Vcc 2.7V-3.3V, the user can keep USB functional by selecting power supply for
USB coming from VBUS rather than from Vcc. The selection is made on the J28 jumper.
2.3
Connections
Figure 2-2.
MC310 device board with power board MC300
AVR470
4
7802A–AVR–07/08
AVR470
2.3.1
Power board connector
The MC310 processor board can connect directly to a driver board (typically the MC300 power
board). This is accomplished by a horizontal male pin header connectors located on the right
side of the board, shown in .
The device board interface on MC310 connector is split into four eight-pin connectors. Electric
schematics and mechanical specifications are shown in and signal description in Table 2-1
Table 2-1.
Pin
MC310 device board connector signal description.
Located
Name
Direction
1
J1p1
GND
-
Description
2
J1p2
GND
-
3
J1p3
GND
-
4
J1p4
Vin
Input
5
J1p5
VCC
Input
6
J1p6
VCC
Input
7
J1p7
VCC
Input
8
J1p8
GND
-
System ground (Vin/VCC)
Phase U Highside control output
System ground (Vin/VCC)
Input power Vin (10-20V)
Regulated power Vcc (3.3V/5V)
9
J2p1
UH
Output
10
J2p2
UL
Output
Phase U Lowside control output
11
J2p3
VH
Output
Phase V Highside control output
12
J2p4
VL
Output
Phase V Lowside control output
13
J2p5
WH
Output
Phase W Highside control output
14
J2p6
WL
Output
Phase W Lowside control output
15
J2p7
XH
Output
Phase X Highside control output
16
J2p8
XL
Output
Phase X Lowside control output
17
J3p1
GNDm
-
Motor ground (Vmotor)
18
J3p2
Vmotor’
Input
Vmotor filtered/divided
19
J3p3
ShCom’
Input
Voltage over ShCom filtered/divided
20
J3p4
ShU’
Input
Voltage over ShU filtered/divided
21
J3p5
U’
Input
BackEMF phase U filtered/divided
22
J3p6
ShV’
Input
Voltage over ShV filtered/divided
23
J3p7
V’
Input
BackEMF phase V filtered/divided
24
J3p8
ShW’
Input
Voltage over ShW filtered/divided
25
J4p1
W’
Input
BackEMF phase W filtered/divided
26
J4p2
ShX’
Input
Voltage over ShX filtered/divided
27
J4p3
X’
Input
BackEMF phase X filtered/divided
28
J4p4
GND
-
System ground (Vin/VCC)
29
J4p5
H1
Input
Hall sensor 1 signal
30
J4p6
H2
Input
Hall sensor 2 signal
31
J4p7
H3
Input
Hall sensor 3 signal
32
J4p8
Vn’
Input
Vn (neutral point) filtered/divided
25
J4p9
PFC_OC
Input
Power Factor Corrector Over Current signal
26
J4p10
nc
-
27
J4p11
PFC_ZC
Input
28
J4p12
nc
-
29
J4p13
FAULT
Input
Fault signal from Power board
30
J4p14
Temp
Input
Tempeture sensor input
31
J4p15
nc
-
32
J4p16
Spare
Output/
Input
Power Factor Corrector Zero Crossing signal
Reserved
5
7802A–AVR–07/08
Figure 2-3.
Device board connector: mechanical specification and schematics
AVR470
6
7802A–AVR–07/08
AVR470
2.3.2
USB connector
The board has a USB mini B receptacle (J27) to interface with a PC using the USB cable
included in the kit.
Figure 2-4.
2.3.3
USB connector for PC interface
DB101 Display module connectors
The board has three 2.54 mm header to mount the Atmel DB101 Display module: J17, J19 &
J20 (respectively UART, SPI, TWI). The MC310 uses the UART.
Figure 2-5.
DB101 headers
DB101 TWI
header
DB1010 SPI
header
DB101 UART
header
7
7802A–AVR–07/08
See the following description for the DB101 headers:
2.3.4
LIN connector
The MC310 processor board can be connected to a LIN network and will behave as a LIN slave.
The connection is made using the LIN connector J14.
Figure 2-6.
LIN connector
(ISRC) GND LIN Bat
ATA6661Atmel
LIN transceiver
Configure TxDLIN &
RxDLIN on J12, J13 (3-4
connected only)
AVR470
8
7802A–AVR–07/08
AVR470
Figure 2-7.
LIN configuration
See the following description for the LIN signals:
2.3.5
CAN connector
The MC310 processor board can be connected to a CAN network. The connection is made
using the CAN DB9 connector J16.
Figure 2-8.
CAN connector
CAN Male
DB9
Terminal CAN
resistor
ATA6660 Atmel CAN
transceiver
Mount J7 jumper between RxCAN
& PC3 to use CAN communication
8 MHz crystal for CAN
communication
J7 must be closed between RxCAN & PC3 and a terminal resistor can be added by closing the
CAN Res jumper (J15).
An external 8 MHz crystal is mounted between XTAL1 & XTAL2 of ATmega32M1 to achieve
proper CAN baudrates.
9
7802A–AVR–07/08
See the following description for the CAN signals:
2.3.6
RS232 connector
The MC310 processor board can be connected to a PC through a DB9 RS232 connector. The
connection is made using the RS232 connector J18.
Figure 2-9.
RS232 connector & configuration
RS232 female DB9
J13 5-6 closed
(RxD selection)
J12 5-6 closed
(TxD selection)
RS232 tranceiver
AVR470
10
7802A–AVR–07/08
AVR470
See the following description for the RS232 signals:
2.3.7
ISP/Debug connectors
The board has two ISP/Debug connectors, one populated for interfacing the ATmega32M1
(J10), one not populated for the AT90USB1287 (USB bridge) (J29).
Figure 2-10. ATmega32M1 ISP/debugWire header
ISP/debugWire
header for
ATmega32M1
ATmega32M1
J13 1-2 closed
(SCK selection)
J12 1-2 closed
(MOSI selection)
11
7802A–AVR–07/08
Figure 2-11. J10- ISP/DebugWire connector for ATmega32M1 & J29- JTAG connector for
AT90USB1287:
TDI
GND
nc
TMS TDO TCK
1
RESET
MOSI
SCK
VCC
MISO
2
1
ISP/DW
J10
2
GND
nc RESET VCC GND
JTAG
J29
Note that J29 for AT90USB1287 is not mounted
Figure 2-12. Figure 2-10. Connecting AVRISP mkII to the ISP J10 connector:
AVR470
12
7802A–AVR–07/08
AVR470
2.4
Jumpers
Refer to component floorplan for the location of jumpers. In brackets the application targeted on
each configuration.
Table 2-2.
Designator
Jumpers and their function.
Function and settings
Selects a voltage reference signal or Vm’ signal (Vmotor filtered)
J5
J5 pin 1 & 2 connected – PB4 is connected to Shunt U ShU voltage coming from J3.4 from
the power board (Field Oriented Control mode)
J5 pin 2 & 3 connected – PB4 is connected to Vm’ (Vmotor filtered) coming from J3.2 from
the power board, (sensor mode)
Selects the overcurrent source signal
J6
J6 pin 1 & 2 connected – PB3 is connected to common shunt ShCo voltage coming from
J3.3 from the power board (Field Oriented Control mode)
J6 pin 2 & 3 connected – PB3 is connected to the power factor corrector overcurrent signal
in sensorless mode coming from J4.9 from the power board. A (Sensorless mode)
Selects CAN receive line or PFC zero crossing detection signal
J7
J8 pin 1 & 2 connected – PC3 is connected to RxCAN signal from the CAN interface
J8 pin 2 & 3 connected – PC3 is connected to Power Factor corrector Zero crossing
signal, output on J4.11 of the power board. (Sensorless mode)
Selects a voltage reference signal or Vm’ signal (Vmotor filtered)
J8
J8 pin 1 & 2 connected – PC5 is connected to Shunt V ShV voltage coming from J3.6 from
the power board (Field Oriented Control mode)
J8 pin 2 & 3 connected – PC5 is connected to common shunt ShCo voltage coming from
J3.3 from the power board, (Sensor mode)
Selects the common shunt signal or ground reference for motor
J9
J9 pin 1 & 2 connected – PC4 is connected to common shunt ShCo voltage coming from
J3.3 from the power board (Field Oriented Control mode)
J9 pin 2 & 3 connected – PC4 is connected to GNDm signal coming from J3.1 from the
power board, (Sensor mode)
Selects the communication interface for motor control commands & status for PD3 signal
J12 pin 1 & 2 connected – PD3 configured as MOSI_A for ISP
J12
J12 pin 3 & 4 connected – PD3 configured as TxDLIN
J12 pin 5 & 6 connected – PD3 connected to TxD for RS232 & DB101 interface
J12 pin 7 & 8 connected – PD3 connected to RxD1 (or RxDUSB on silk screen) for USB
interface
Selects the communication interface for motor control commands & status for PD4 signal
J13 pin 1 & 2 connected – PD4 configured as SCK for ISP
J13 pin 3 & 4 connected – PD4 configured as RxDLIN
J13
J13 pin 5 & 6 connected – PD4 connected to RxD for RS232 interface
J13 pin 7 & 8 connected – PD4 connected to TxD1 (or TxDUSB on silk screen) for USB
interface
J13 pin 9 & 10 connected – PD4 connected to RxD2 for DB101 interface
J15
Add a termination resistor to the CAN network when set
J21
J21 pin 1 & 2 connected – PB2 (ACMN0) is connected to the Vneutral point in sensorless
mode : filtered Vn_motor signal.
Selects for PB2 (Analog Comparator Negative Input 0) (Sensorless mode)
J21 pin 2 & 3 connected – PB2 (ACMN0) is connected to the filtered U_motor signal in
sensorless mode.
13
7802A–AVR–07/08
Designator
Function and settings
Selects PD7 (Analog Comparator Positive Input 0)
J22
J22 pin 1 & 2 connected – PD7 (ACMP0) is connected to the hall sensor output 1. (default
configuration) (Sensor mode)
J22 pin 2 & 3 connected – PD7 (ACMP0) is connected to the filtered U_motor signal.
(Sensorless mode)
Selects PB5 (Analog Comparator Negative Input 1) ) (Sensorless mode)
J23
J23 pin 1 & 2 connected – PB5 (ACMN1) is connected to the Vneutral point in sensorless
mode : filtered Vn_motor signal.
J23 pin 2 & 3 connected – PB5 (ACMN1) is connected to the filtered V_motor signal in
sensorless mode.
Selects PC6 (Analog Comparator Positive Input 1)
J24
J24 pin 1 & 2 connected – PD7 (ACMP1) is connected to the hall sensor output 2. (default
configuration) (Sensor mode)
J24 pin 2 & 3 connected – PD7 (ACMP1) is connected to the filtered V_motor signal.
(Sensorless mode)
Selects PD6 (Analog Comparator Negative Input 2)
J25
J25 pin 1 & 2 connected – PD6 (ACMN2) is connected to the Vneutral point: filtered
Vn_motor signal. (Field Oriented Control mode)
J25 pin 2 & 3 connected – PD6 (ACMN2) is connected to the filtered W_motor signal.
(Sensorless mode)
Selects PD5 (Analog Comparator Positive Input 2)
J26
J26 pin 1 & 2 connected – PD5 (ACMP2) is connected to the hall sensor output 3 (default
configuration) (Sensor mode)
J26 pin 2 & 3 connected – PD5 (ACMP2) is connected to the filtered W_motor signal.
(Sensorless mode)
Selects voltage source UVCC (Power supply for USB stage)
When working at Vcc 2.7V-3.3V, the user can keep the USB functional by selecting power
supply for USB coming from VBUS rather than from Vcc.
J28
J28 open
– UVCC not connected, USB bridge not usable
J28 pin 1 & 2 connected – UVCC connected to Vcc coming from Power board (Default
configuration)
J28 pin 2 & 3 connected – UVCC connected to Vbus coming from USB line
Figure 2-13. J28: USB Power supply selection:
J28: USB power
supply selection
AVR470
14
7802A–AVR–07/08
AVR470
2.5
Headers
Table 2-3.
Pin
MC310 device board J11 Hall sensors header description
Located
Name
Direction
Description
1
J11p1
VCC
-
Regulated power Vcc (3.3V/5V) coming from power board
2
J11p2
H1
Hall sensor output 1
3
J11p3
H2
Hall sensor output 2
4
J11p4
H3
Hall sensor output 3
5
J11p5
H4
Hall sensor output 4
6
J11p6
GND
-
System ground (Vin/VCC)
Figure 2-14. J11: HALL sensors header:
J11 : HALL sensor
header
2.6
Schematics, component floorplan and bill of materials
The schematics, component floorplan and bill of materials (BOM) for MC310 are found as separate PDF files distributed with this application note. They can be downloaded from
http://www.atmel.com.
3. Detailed description
3.1
Sensor mode
The MC310 can be configured in sensor mode using the Hall sensors of the motor through the
Power board interface (J4).
15
7802A–AVR–07/08
J22-J24-J26:
1-2 connected, Hall
selection
3.2
Sensorless modes
The MC310 can be configured in sensorless mode thanks to the comparator circuitry of the
ATmega32M1 device.
Depending of the Sensorless control modes, refer to the appropriate application notes &
see specific jumper configuration listed in Chapter 2.3 Jumpers
3.3
Application LED
A green color LED D4 is available for general purpose on ATmega32M1 PC7 (DAC_out signal).
AVR470
16
7802A–AVR–07/08
AVR470
3.4
Using the potentiometer
Potentiometer P1 is connected to the AREF (ISRC) signal of ATmega32M1 to control the speed
of the motor.
3.5
Interfacing MC310 with PC through USB
Commands & status can be transferred to a PC using a USB link thanks to the USB bridge on
the MC310.
3.5.1
Connection
Connect the USB mini B cable to the MC310 board and to a PC. Make sure J28 (power supply
of USB bridge) is properly configured.
3.5.2
Communication
MC310 USB interface uses USB CDC class for communication. As the Atmel Motor Control
Center software uses the RS232 interface, CDC class fits perfectly with the needs of this software. MC310 is delivered with a native USB CDC firmware in the AT90USB1287.
3.5.3
USB bridge update
MC310 USB bridge can be updated thanks to the Atmel Bootloader in the AT90USB1287. Press
Program Push button then Reset the USB device by pressing the Reset Push button.
AT90USB1278 will then enumerates in DFU class (Device Firmware Upgrade class). See Atmel
FLIP user’s guide for upgrading the AT90USB1287 device on Atmel web site : www.atmel.com
Push button to enter into
USB bootloader or running
USB application
17
7802A–AVR–07/08
3.5.4
Atmel Motor Control Center
The Atmel Motor Control Center used with the MC310 is available on the Atmel website:
www.atmel.com.
See Atmel Motor control center user’s guide & the application notes using MC310+MC300 &
Atmel Motor Control center for further explanation on this PC software usage..
3.6
Interfacing MC310 with Atmel DB101 Display module
The DB101 display module can be added to the MC310 (See application notes 481, 482, 483 on
www.atmel.com).
3.6.1
Connection
DB101 connects using 3 headers J17, J19 & J20 (respectively UART, SPI, TWI). See Figure 31.
AVR470
18
7802A–AVR–07/08
AVR470
Figure 3-1.
3.6.2
MC310 PCB layout
Communication
DB101 uses the UART with ATmega32M1 thru J17 header. See DB101 Display module
connectors.
5-6 of J12 & 9-10 of J13 must be connected to use the DB101. In this case, the USB, UART, LIN
interfaces are no longer usable.
3.7
Upgrading the MC310 Motor control firmware
Firmware on the MC310 can be updated through AVR Studio using Atmel AVRISP mkII or
JTAGICE mkII connected to J10 ISP/DW connector and by removing jumpers on J9.
Select the ATmega32M1 device in the device list in AVR Studio.
CAUTION:
While updating the firmware, it is recommended to disconnect the motor on the MC300 power
board.
19
7802A–AVR–07/08
isclaime
Headquarters
International
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Atmel Asia
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Atmel Europe
Le Krebs
8, Rue Jean-Pierre Timbaud
BP 309
78054 Saint-Quentin-enYvelines Cedex
France
Tel: (33) 1-30-60-70-00
Fax: (33) 1-30-60-71-11
Atmel Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Technical Support
[email protected]
Sales Contact
www.atmel.com/contacts
Product Contact
Web Site
www.atmel.com
Literature Requests
www.atmel.com/literature
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided
otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use
as components in applications intended to support or sustain life.
© 2008 Atmel Corporation. All rights reserved. Atmel ®, logo and combinations thereof, and others are registered trademarks or trademarks of
Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.
7802A–AVR–07/08