AVR469: MC301 Hardware User Guide Features • • • • • • Motor Control device board for ATtiny861 Modular system with 2.54mm pin header connector for power board MC300 Sensor & sensorless modes capabilities Hall sensor header, Potentiometer for motor control ® Headers for Atmel DB101 Display module USB interface for PC connection and usage of Atmel® Motor Control Center software • ISP & debug interface for both ATtiny861 & USB device. • Electric specifications: - Supplied with Power board like MC300 from 3.3V up to 5V • Dimension: 100x100mm 8-bit Microcontrollers Application Note 1 Introduction The MC301 is the device board for ATtiny861 AVR® microcontroller which can be connected to the general-purpose power stage board MC300 for driving brushless DC, brushed DC and stepper motors. 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. Jumpers allow demonstrating sensor or sensorless modes of motor control. Finally, interface like USB or Atmel DB101 Display module is also available. Figure 1-1. MC301 Motor control ATtiny861 processor board. Rev. 8195A-AVR-04/09 2 Hardware overview Please refer to schematics, layout and BOM available at http://www.atmel.com. The MC301 motor control processor board is a ATtiny861 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 sensorless control mode with this particular ATtiny861. A potentiometer enables the user to control the motor: speed & direction in sensor mode and speed only in sensorless mode. 2 A Two Wire serial Interface (TWI) (compatible with Philips' I C protocol) 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: ATtiny861 & AT90USB1287 have their own debug/ISP interface for user’s specific developments. Test points either mounted or not, are also available for instrumentation. 2 AVR469 8195A-AVR-04/09 AVR469 2.1 PCB Layout The MC301 is organized as shown in Figure 2-1. Most signals, important components and jumper information are written on the silk screen. Test points are also available for user instrumentation. For individual component placement refer to the component floor plan. Figure 2-1. MC301 PCB layout. 2 6 3 1 4 4 4 3 5 In Figure 2-1 the following areas are marked: 1. Power board connector. 2. Sensor/sensorless mode configuration jumpers 3. USB bridge 4. Atmel DB101 Display module headers 5. Hall sensors header 6. Potentiometer for manual command 3 8195A-AVR-04/09 2.2 Specifications MC301 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 J19 jumper. 2.3 Connections Figure 2-2. MC301 device board with power board MC300. 2.3.1 Power board connector The MC301 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 Figure 2-2. The device board interface on MC301 connector is split into four eight-pin connectors. Electric schematics and mechanical specifications are shown in 4 AVR469 8195A-AVR-04/09 AVR469 Figure 2-3 and signal description in Table 2-2 Table 2-1. MC301 device board connector signal description. Pin Located Name Direction Description 1 J1p1 GND - 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) 9 J2p1 UH Output Phase U Highside control 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 - System ground (Vin/VCC) Input power Vin (10-20V) Regulated power Vcc (3.3V/5V) Power Factor Corrector Zero Crossing signal 5 8195A-AVR-04/09 Pin Located Name Direction Description 29 J4p13 FAULT Input Fault signal from Power board 30 J4p14 Temp Input Tempeture sensor input 31 J4p15 nc - J4p16 Spare Output/ Input 32 Reserved Figure 2-3. Device board connector: mechanical specification and schematics. 6 AVR469 8195A-AVR-04/09 AVR469 2.3.2 USB connector The board has a USB mini B receptacle (J18) to interface with a PC using the USB cable included in the kit. Figure 2-4. USB Connection. 2.3.3 DB101 Display module connectors The board has three 2.54 mm header to mount the Atmel DB101 Display module: J5, J6 & J7 (respectively UART, SPI, and TWI). The MC301 uses the TWI. Figure 2-5. DB101 Display module. DB101 TWI header DB101 SPI header DB101 UART header 7 8195A-AVR-04/09 See the following description for the DB101 headers: Figure 2-6. DB101 Header. 2.3.4 ISP/Debug connectors The board has two ISP/Debug connector, one populated for interfacing the ATtiny861 (J14), one not populated for the AT90USB1287 (USB bridge) (J20). Figure 2-7. ATtiny861 ISP/ debugWire header ISP/debugWire header for ATtiny861 J9 VL, UH, UL must be open for ISP Closed for application ATtiny861 8 AVR469 8195A-AVR-04/09 AVR469 Figure 2-8. J14- ISP/DebugWire connector for ATtiny861 & J20- JTAG connector for AT90USB1287 TDI GND nc TMS TDO TCK 1 RESET MOSI SCK VCC MISO 2 1 ISP/DW J14 2 GND nc RESET VCC GND JTAG J20 Note that J20 for AT90USB1287 is not mounted Figure 2-9. AT90USB1287 J20 JTAG header. 9 8195A-AVR-04/09 2.4 Jumpers Refer to component floorplan for the location of the jumpers. Table 2-2. Jumpers and their function. Designator Function and settings J8 Selects Speed reference or SCL signal to either measure motor speed or interface with DB101 J8 pin 1 & 2 connected – PA2 (SCL) is connected to DB101 TWI interface thru J7. J8 pin 2 & 3 connected – PA2 (ADC2) is connected to Speed reference coming from potentiometer P1 for speed control (default configuration) J9 Selects half bridge signal from power board or ISP signals for ATtiny861 device J9 pin 1 & 2 connected – PB2 is used to get VL signal from J2.4 from power board. (default configuration) J9 pin 1 & 2 open – PB2 is used as SCK signal in ISP mode. J9 pin 3 & 4 connected – PB1 is used to get UH signal from J2.1 from power board. (default configuration) J9 pin 3 & 4 open – PB1 is used as MISO signal in ISP mode. J9 pin 5 & 6 connected – PB0 is used to get UL signal from J2.2 from power board. (default configuration) J9 pin 5 & 6 open – PB0 is used as MOSI signal in ISP mode. J10 Selects a voltage reference signal or Vm signal (Vmotor filtered) J10 open – None of Vm or voltage reference connected to PA3 (default configuration) J10 pin 1 & 2 connected – PA3 (AREF) is connected to a voltage reference made of R35/R36 voltage bridge. J10 pin 2 & 3 connected – PA3 is connected to Vm’ (Vmotor filtered) coming from J3.2 from the power board. In this case, no divisor is applied on Vm’ so Vm’=Vm coming from MC300. User must be careful as this voltage will be defined as voltage reference of the ADC 10 J11 Selects the positive shunt signal from power board or V neutral in sensorless mode J11 pin 1 & 2 connected – PA6 (ADC5) is connected to the positive shunt signal coming from J3.3 from the board. (default configuration) J11 pin 2 & 3 connected – PA6 is connected to Vn conditioned (Vneutral point in sensorless mode) J12 Selects the negative shunt signal from the power board or the current reference signal in sensorless mode J12 pin 1 & 2 connected – PA7 (ADC6) is connected to the negative shunt signal coming from J3.1 from the board. (default configuration) J12 pin 2 & 3 connected – PA7 is connected to the current reference signal in sensorless mode AVR469 8195A-AVR-04/09 AVR469 Designator Function and settings J13 Selects the overcurrent source signal from the power board or from the sensorless mode J13 pin 1 & 2 connected – PB6 (ADC9) is connected to the overcurrent fault signal coming from J4.13 from the board. (default configuration) J13 pin 2 & 3 connected – PB6 (ADC9) is connected to the overcurrent fault signal in sensorless mode J15-TP24 Selects for U’ (PA1/ADC1) J15 pin 1 & 2 connected – PA1 (ADC1) is connected to the zero crossing U signal in sensorless mode. J15 pin 2 & 3 connected – PA1 (ADC1) is connected to the U conditioned signal in sensorless mode J15 pin 2 & TP24 connected – PA1 (ADC1) is connected to the hall sensor output 1 in sensor mode (default configuration) J16-TP25 Selects for U’ (PA4/ADC3) J16 pin 1 & 2 connected – PA4 (ADC3) is connected to the zero crossing V signal in sensorless mode. J16 pin 2 & 3 connected – PA4 (ADC3) is connected to the V conditioned signal in sensorless mode J16 pin 2 & TP25 connected – PA4 (ADC3) is connected to the hall sensor output 2 in sensor mode (default configuration) J17-TP26 Selects for U’ (PA5/ADC4) J17 pin 1 & 2 connected – PA5 (ADC4) is connected to the zero crossing W signal in sensorless mode. J17 pin 2 & 3 connected – PA5 (ADC4) is connected to the W conditioned signal in sensorless mode J17 pin 2 & TP26 connected – PA5 (ADC4) is connected to the hall sensor output 3 in sensor mode (default configuration) J19 Selects voltage source UVCC (Power supply for USB stage) 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. J19 open – UVCC not connected, USB bridge not usable J19 pin 1 & 2 connected – UVCC connected to Vcc coming from Power board (default configuration) J19 pin 2 & 3 connected – UVCC connected to Vbus coming from USB line (See picture below) 11 8195A-AVR-04/09 Figure 2-10. J19: USB Power supply selection J19 : USB power supply selection 12 AVR469 8195A-AVR-04/09 AVR469 2.5 Headers Table 2-3. MC301 device board J21 Hall sensors header description. Pin Located Name Direction Description J21p1 VCC - Regulated power Vcc (3.3V/5V) coming from power board 2 J21p2 H1 Hall sensor output 1 3 J21p3 H2 Hall sensor output 2 4 J21p4 H3 Hall sensor output 3 5 J21p5 H4 Hall sensor output 4 6 J21p6 GND 1 - System ground (Vin/VCC) Figure 2-11. J21: HALL sensors header J21: HALL sensor header 13 8195A-AVR-04/09 2.6 Schematics, component floorplan and bill of materials The schematics, component floorplan and bill of materials (BOM) for MC301 are found as separate PDF files distributed with this application note. They can be downloaded from http://www.atmel.com. 14 AVR469 8195A-AVR-04/09 AVR469 3 Detailed description 3.1 Sensor mode The MC301 can be configured in sensor mode using the Hall sensors of the motor through the Power board interface (J4). Figure 3-1. Sensor Mode Configuration. J9 VL, UH, UL connected (1-2, 3-4, 5-6) J15, J16 & J17 connected horizontally with H1, H2 & H3 J8 2-3 connected to use the potentiometer All J9, J10, J11, J12, J13 left open. 15 8195A-AVR-04/09 3.2 Sensorless modes The MC301 can be configured in sensorless mode thanks to the comparator circuitry populated on the MC301 board. When using the zero crossing signals output from comparators, short 1-2 on J15, J16, J17 jumpers. This will connect respectively ZC_U, ZC_V & ZC_W to PA1, PA4 & PA5 of the ATtiny861. When using the filtered U, V, W signals coming from the MC300 power board, short 2-3 on J15, J16, J17 jumpers. This will connect respectively U_Conditioned, V_ Conditioned & W_ Conditioned to PA1, PA4 & PA5 of the ATtiny861. Depending of the Sensorless control modes, refer to the appropriate application notes & see specific jumper configuration listed in Chapter 2.3 Jumpers 16 AVR469 8195A-AVR-04/09 AVR469 3.3 Interfacing MC301 with PC through USB Commands & status can be transferred to a PC thru a USB link thanks to the USB bridge on the MC301. 3.3.1 Connection Connect the USB mini B cable to the MC301 board and to a PC. Make sure J19 (power supply of USB bridge) is properly configured. 3.3.2 Communication MC301 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. MC301 is delivered with a native USB CDC firmware in the AT90USB1287. 3.3.3 USB bridge update MC301 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 enumerate 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 Figure 3-2. Entering in bootloader or start the application. Push button to enter into USB bootloader or running USB application 17 8195A-AVR-04/09 3.3.4 Atmel Motor Control Center The Atmel Motor Control Center used with the MC301 is available on the Atmel website: www.atmel.com. Figure 3-3. Motor Control Center User Interface. See Atmel Motor control center user’s guide & the application notes using MC301+MC300 & Atmel Motor Control center for further explanation on this PC software usage. 18 AVR469 8195A-AVR-04/09 AVR469 3.4 Interfacing MC301 with Atmel DB101 Display module The DB101 display module can be added to the MC301 (See application notes 481, 482, and 483 on www.atmel.com). 3.4.1 Connection DB101 connects using 3 headers J5, J6 & J7 (respectively UART, SPI, and TWI). See Figure 3-4. MC301 PCB layout Figure 3-5. DB101 Display Module. 3.4.2 Communication DB101 uses the TWI with ATtiny861 thru J7 header 1-2 of J8 must be connected to use the DB101; in this case the potentiometer is no longer usable. 19 8195A-AVR-04/09 3.5 Upgrading the MC301 Motor control firmware Firmware on the MC301 can be updated through AVR Studio® using Atmel AVRISP mkII or JTAGICE mkII connected to J14 ISP/DW connector and by removing jumpers on J9. Select the ATtiny861 device in the device list. Figure 3-6. Firmware Upgrade Procedure. CAUTION: While updating the firmware, it is recommended to disconnect the motor on the MC300 power board. 20 AVR469 8195A-AVR-04/09 D Headquarters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Atmel Asia Unit 1-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong Tel: (852) 2245-6100 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 http://www.atmel.com/ Literature Request 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. © 2009 Atmel Corporation. All rights reserved. Atmel®, Atmel logo and combinations thereof, AVR®, AVR Studio® and others, are the registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. 8195A-AVR-04/09