austriamicrosystems AG is now ams AG The technical content of this austriamicrosystems application note is still valid. Contact information: Headquarters: ams AG Tobelbaderstrasse 30 8141 Unterpremstaetten, Austria Tel: +43 (0) 3136 500 0 e-Mail: [email protected] Please visit our website at www.ams.com AS5043 / AS5143 Demoboard OPERATION MANUAL Application note 1 General Overview al id The AS5x43 is a contactless magnetic angle encoder for accurate measurement up to 360°. It is a system-on-chip, combining integrated Hall elements, analog front end and digital signal processing in a single device. The AS5x43 provides a digital 10-bit as well as a programmable analog output that is directly proportional to the angle of a magnet, rotating over the chip. The analog output can be configured in many ways, including user programmable angular range, adjustable output voltage range, voltage or current output, etc. An internal voltage regulator allows operation of the AS5x43 from 3.3V or 5.0V supplies. 2 The AS5x43 Demoboard am lc s on A te G nt st il lv The AS5x43 demoboard is a complete rotary encoder system with built-in microcontroller, USB interface, graphical LCD display and Vout output LED. The board is USB powered or externally supplied with a 9V battery for standalone operation. LCD display (for standalone mode) 9V battery connector (standalone only) Knob with D5x2.5mm diametral magnet, 2mm over the AS5X4X SiLabs C8051F320 microcontroller J6: External Encoder SSI Connector USB cable to the PC Onboard AS5x43 output signals connector and indicators: ca External (left) – Onboard (right) encoder selection switch SW1 ni Figure 1: AS5x43 Demoboard hardware with mounted magnet knob ch 3 Operating the AS5x43 Demoboard Te The AS5x43 demoboard can be used in several ways: • As standalone unit supplied by a 9V battery Connect a 9V battery to the battery connector on the top right side of the board. No other connections are required. • As standalone unit supplied by an USB port Connect the demoboard to a PC using a USB/USB cable (included in demoboard shipment). The board is supplied by the 5V supply of the USB port. No other connections are required. • As input device for the AS5000 Programmer GUI software This configuration uses the same USB hardware connection as above, but additionally the AS5000 Programmer GUI software is running. The LCD display will be turned off and the Angle/Multiturn/AGC will be displayed on the PC screen. Some extra features as pole pair, zero position or AGC programming can be achieved. The parameters will not be permanently programmed. All the parameters will be lost when the demoboard is shut down. For a permanent device programming, the “AS5000 Programmer” hardware should be used. Revision 1.0, 17.June 2009 Page 1 of 12 www.austriamicrosystems.com AS5x43 Demoboard OPERATIONAL MANUAL 3.1 3.1.1 Hardware Indicators and Connectors Graphic LCD display The LCD display shows the realtime absolute angle position of the magnet with a resolution of 0.35° = 1024 positions per revolution (AS5x43) and the absolute value of the angle. Turning the knob clockwise will increase the angle value until 359.6 then 0. al id The magnet status indicator is related to the magnet position. If the magnet is too close to the encoder, “Magnet too close” will be displayed. If the magnet is too far away from the encoder, “Magnet out of range” will be displayed. Absolute angle value 10 bit resolution: From 0 to 1023 lv Magnet indicator: - OK (distance OK) - Magnet out of range Bargraph representation of the angle:(0° to 359.6°) am lc s on A te G nt st il Magnet angle value: From 0° to 359.6° Figure 2: LCD display in standalone mode (9V battery or USB powered without GUI) 3.1.2 Vout LED This LED is connected to the Vout output of the AS5x43 device. Vout is the analog output pin, which provides a DC voltage radiometric to the supply voltage of the device or an external voltage source. This DC voltage is proportional to the angle. By default, the OPAMP Gain setting FB_int_EN (OTP bit) is set to 0. Please take care to add an external resistor network between Vout and FB Pin (see AS5043 Datasheet Figure 14). 3.1.3 DACref 3.1.4 DACout ca This is the external voltage reference input for the Digital-to-Analog Converter (DAC). The analog output voltage of Vout is radiometric to the voltage on this pin. ch ni This is the unbuffered output of the Digital-to-Analog Converter (DAC). This pin may be used to connect an external OPAMP, etc. to the DAC. 3.1.5 FB Te Feedback (FB) is the inverting input of the OPAMP buffer stage, where various OPAMP configurations may be set. 3.1.6 MagRNG The Magnet Field Magnitude RaNGe warning indicates if the magnetic field is outside of the limits. Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 2 of 12 AS5x43 Demoboard OPERATIONAL MANUAL 3.1.7 Encoder selection switch The switch SW1 selects the encoder which communicates with the microcontroller through the SSI bus: Onboard AS5043/AS5143 Right position (default): 2. External AS5043/AS5143 connected on J6 Left Position: The signals of the synchronous serial interface (DO, CLK, CSn, PROG) and the power supply (3.3V, GND) of an external device can be connected directly to J6. In this configuration, the data of the serial interface are displayed on the GUI or the LCD. al id 1. am lc s on A te G nt st il lv • In standalone mode, regardless to the demoboard type (AS5043 or AS5143), AS5043 and AS5143 can be attached to J6 and evaluated. See figure 3. • If the GUI is used for operation, additional devices AS5040, AS5140, AS5045 and AS5145 can be connected to J6 and evaluated. In that case, the correct encoder must be selected instead of “Autoselect” in the Device list of the PC software, see chapter Error! Reference source not found. figure 4. VDD5 VDD33 2.2u CSn CLK AS 5043 / AS5143 DO ca VSS PROG Figure 3: external AS5043/AS5143 connection to the demoboard Te ch ni Demoboard switched to external encoder mode Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 3 of 12 AS5x43 Demoboard OPERATIONAL MANUAL 4 AS5000 Programmer GUI software 4.1 Installing the GUI on the PC 4.2 check on your PC if Service Pack 2 is installed install the mentioned .NET package to your computer execute setup.exe Finally start the GUI using the shortcut in the start menu or desktop. am lc s on A te G nt st il 1. 2. 3. 4. lv Following Procedure is recommended before starting the GUI: al id The preliminary software is developed for a Microsoft Windows XP operating system with Service Pack 2. In addition the dotnet (.NET) framework version 2.0 or more must be installed on the PC. This package can be downloaded free of charge from the Microsoft webpage: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en The Home tab ca Figure 4 shows the main window of the GUI. On the top left corner, board information’s as firmware (FW) version and demoboard name declaration can be found. By default the GUI is in the auto detection mode. Any connected austriamicrosystems demoboard and programming tool will be automatically detected and displayed in the right top corner. The GUI is divided into three main sections HOME, SSI and OTP. Te ch ni Device selection list: Change the encoder type if a different encoder type is connected externally on J6 and SW1 on left position Revision 1.0, 17-Jun-2009 Figure 4: AS5000 GUI detected the AS5043 Demoboard www.austriamicrosystems.com Page 4 of 12 AS5x43 Demoboard OPERATIONAL MANUAL 4.3 The SSI tab This mode displays in realtime the angle & absolute value, status bits and magnet range status. By selecting the SSI (serial protocol for AS5040, AS5140, AS5043, AS5143, AS5045, AS5145) tab, the information of the angular position and the status bits appears. See figure 5. al id Not used (dual die encoders only) lv Angle value: 10 bit absolute position: From 0 to 1023 Status bits information am lc s on A te G nt st il Magnet range warning: - Green: magnet in Range - Orange: magnet too close or too far Set counter clockwise Angle register value: Magnet angle value: From 0 – 359,6° Display update rate. The readout speed can be adjusted from 10ms to 1s Zero position register access: - Button SET: Sets the current angle as the 0° angle - Button RESET: resets the Zero Position register to 0 (default) ca Figure 5: SSI tab, allows access to the AS5x43 registers from the serial bus Value is the Angle data [D9:D0] from the RD_ANGLE (Read Angle) serial command. This value is continuously updated. ni The Zero Pos. value represents the Zero Position register. By clicking on the Set button, the actual angle “Value” is written into the Zero Position register. Clicking on Reset writes the value 0 to the Zero Position register. Te ch The Magnetic Range Warning is continuously read from the RD_ANGLE serial command. • Green lamp: Magnet in range • Orange lamp: Magnet too far or too close. MagINC and MagDEC are set. The Status bits information are taken from the serial stream. The Read Interval can be modified from 10 ms (fastest) to 1 s (slowest). Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 5 of 12 AS5x43 Demoboard OPERATIONAL MANUAL 4.4 The OTP tab The OTP tab is normally used for the AS5000 programmer, but the OTP bits can be changed on the AS5x43 demoboard as well. Options like Zero Position, Pulses per revolution and Incremental Mode Selection can be changed by selecting the function in “Fields”, then changing the parameter in “Options for the selected field” or directly the decimal value of this parameter in “Value”. am lc s on A te G nt st il lv al id Each time a field’s value has been changed, the corresponding OTP bits will be automatically checked in the right window. The button Write should be clicked to write the parameter into the AS5x43. The Read button reads back the OTP register, and updates the “Field” parameter as well as the OTP bits window. Figure 6: OTP tab ca Field Zero Position: To zero position value, like on the SSI tab. The zero position value can be changed by checking the Z[0:9] bits, or changing the Value field with a decimal number. ni Field Analog Output Range Selection (Output Range): ch The analog output can be configured to 360°, 180°, 90° and 45° angular range. Note that the Zap! button is used for the AS5000 Programmer only and has no effect on the AS5x43 Demoboard. Te Important: If the OPAMP Gain setting FB_int_EN is set to 0 (default), please take care to add an external resistor network between Vout and FB Pin (see AS5043 Datasheet Figure 14). Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 6 of 12 5 AS5x43 Demoboard, Schematics, Blockdiagramm 3V 7 C3 RegIn 3.3V 6 C4 100n GND C5 1u VDD 3 GND GND ISP J2 C2CK 1 2 3 4 Header 4 3.3V 9 10 GND J3 VBUS DD+ GND USB SHLD 1 2 3 4 8 5 4 VBUS DD+ 5 GND 100n D7..0 C8 1u GND C11 1u Prog Ext_CLK DO CSn LCD_E Int_CLK LCD_RW LCD_A0 C8051F320 GND R2 nc C9 1u C10 1u Analog_in 27 28 29 30 31 32 1 2 P0.7 P0.6 P0.5 P0.4 P0.3 P0.2 P0.1 P0.0 440478-1 D7 D6 D5 D4 D3 D2 D1 D0 19 20 21 22 23 24 25 26 P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0 RST/C2CK P3.0/C2D C2D 11 12 13 14 15 16 17 18 P2.7 P2.6 P2.5 P2.4 P2.3 P2.2 P2.1 P2.0 C12 C13 C14 C15 1u 1u 1u 1u 1 2 LCD_A0 3 LCD_RW 4 5 LCD_E 6 D0 7 D1 8 D2 9 D3 10 D4 11 D5 12 D6 13 D7 14 3V 15 GND 16 17 18 19 20 21 22 23 24 25 26 27 C16 3V 28 1u GND CS1n RESn A0 R/W E D0 D1 D2 D3 D4 D5 D6 D7 VDD VSS Vout Cap3Cap1+ Cap1Cap2Cap2+ V1 V2 V3 V4 V5 VDD C86 GND R14 68R D3 BAS70-05 BL_A LCD Backlight R13 5V 33R 1 2 3 4 5 6 7 Ext_DO Ext_CLK Ext_CSn Prog DO GND R5 nc R7 1k MagRNG Mode Int_CSn Int_CLK LED_R INT_CSn Int_DO CSn 3.3V 5V R8 0R MCLSS22_DPDT GND Prog C25 10n Header 7 GND External encoder 1 2 3 4 5 6 7 8 MagRNGn VDD5V Mode VDD3V3 CSn nc CLK nc nc Vout DO FB VSS DACout PROG DACref 16 15 14 13 12 11 10 9 C19 100n FB DACout DACref MagRNG AS5043 DS1 LED_Y am lc s on A te G nt st il U4 AS1360-50 2 3 C23 10u C21 1u Vin 3V GND 5V Vout 1 C22 22u 9V Battery Vin GND LL4001 Header 6 GND GND BAT54 Header 2 1 2 3 4 5 6 R6 1k U3 Vbat 3 GND J7 GND Vout GND 1 D1 1 2 R4 10k GND D2 J5 3.3k C20 100n Analog_in DisplayTech32128a lv Int_DO SW1 J6 GND DO CLK CSn 3.3V 5V Prog R3 U2 100n Vbat GND 3.3V C7 100n GND GND 3.3V DS2 C6 al id U1 5V Shield C2 10u 3V J1 0 C1 100n R1 10k Vout 2 AS1360-30 C24 1u GND Te ch ni ca Figure 7: AS5x43 Demoboard schematics Figure 4: AS5x43 Demoboard PCB Layout Revision 1.0, 17.June 2009 Page 7 of 12 www.austriamicrosystems.com am lc s on A te G nt st il lv al id AS5x43 Demoboard OPERATIONAL MANUAL Te ch ni ca Figure 9: AS5x43 Blockdiagramm Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 8 of 12 AS5x43 Demoboard OPERATIONAL MANUAL Index General Overview.............................................................................................................................................................. 1 The AS5x43 Demoboard ................................................................................................................................................... 1 Operating the AS5x43 Demoboard ................................................................................................................................... 1 3.1 Hardware Indicators and Connectors ....................................................................................................................... 2 3.1.1 Graphic LCD display ........................................................................................................................................ 2 3.1.2 Vout LED.......................................................................................................................................................... 2 3.1.3 DACref ............................................................................................................................................................. 2 3.1.4 DACout............................................................................................................................................................. 2 3.1.5 FB .................................................................................................................................................................... 2 3.1.6 MagRNG .......................................................................................................................................................... 2 3.1.7 Encoder selection switch.................................................................................................................................. 3 4 AS5000 Programmer GUI software................................................................................................................................... 4 4.1 Installing the GUI on the PC ..................................................................................................................................... 4 4.2 The Home tab ........................................................................................................................................................... 4 4.3 The SSI tab............................................................................................................................................................... 5 4.4 The OTP tab ............................................................................................................................................................. 6 5 AS5x43 Demoboard, Schematics, Blockdiagramm........................................................................................................... 7 Index........................................................................................................................................................................................... 9 Revision History ....................................................................................................................................................................... 10 Contact ..................................................................................................................................................................................... 11 Copyright .................................................................................................................................................................................. 12 Te ch ni ca am lc s on A te G nt st il lv al id 1 2 3 Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 9 of 12 AS5x43 Demoboard OPERATIONAL MANUAL Revision History Revision Date June.17, 2009 First version Te ch ni ca am lc s on A te G nt st il lv al id R1.0 Description Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 10 of 12 AS5x43 Demoboard OPERATIONAL MANUAL Contact Headquarters austriamicrosystems USA, Inc. austriamicrosystems Germany GmbH 8601 Six Forks Road Tegernseer Landstrasse 85 Suite 400 D-81539 München, Germany Raleigh, NC 27615, USA Phone: +49 89 69 36 43 0 Phone: +1 919 676 5292 +49 89 69 36 43 66 Fax: +1 509 696 2713 Fax: austriamicrosystems USA, Inc. Via A. Volta, 18 4030 Moorpark Ave am lc s on A te G nt st il austriamicrosystems Italy S.r.l. lv Sales Offices al id austriamicrosystems AG A 8141 Schloss Premstätten, Austria Phone: +43 3136 500 0 Fax: +43 3136 525 01 [email protected] www.austriamicrosystems.com Suite 116 I-20094 Corsico (MI), Italy Phone: +39 02 4586 4364 Fax: +39 02 4585 773 San Jose, CA 95117, USA Phone: +1 408 345 1790 Fax: +1 509 696 2713 austriamicrosystems France S.A.R.L. austriamicrosystems AG 124, Avenue de Paris F-94300 Vincennes, France Phone: +33 1 43 74 00 90 Fax: +33 1 43 74 20 98 austriamicrosystems Switzerland AG Rietstrasse 4 Suite 811, Tsimshatsui Centre East Wing, 66 Mody Road Tsim Sha Tsui East, Kowloon, Hong Kong Phone: +852 2268 6899 Fax: +852 2268 6799 CH 8640 Rapperswil, Switzerland austriamicrosystems AG Phone: +41 55 220 9008 AIOS Gotanda Annex 5th Fl., 1-7-11, Fax: +41 55 220 9001 Higashi-Gotanda, Shinagawa-ku Tokyo 141-0022, Japan 88, Barkham Ride, ca austriamicrosystems UK, Ltd. Phone: +81 3 5792 4975 Fax: +81 3 5792 4976 Finchampstead, Wokingham austriamicrosystems AG Phone: +44 118 973 1797 #805, Dong Kyung Bldg., Fax: +44 118 973 5117 824-19, Yeok Sam Dong, Kang Nam Gu, Seoul austriamicrosystems AG Korea 135-080 ch ni Berkshire RG40 4ET, United Kingdom Klaavuntie 9 G 55 Phone: +82 2 557 8776 FI 00910 Helsinki, Finland Fax: +82 2 569 9823 +358 9 72688 170 Fax: +358 9 72688 171 Te Phone: austriamicrosystems AG Singapore Representative Office austriamicrosystems AG 83 Clemenceau Avenue, #02-01 UE Square Bivägen 3B 239920, Singapore S 19163 Sollentuna, Sweden Phone: +65 68 30 83 05 Phone: Fax: +65 62 34 31 20 +46 8 6231 710 Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 11 of 12 AS5x43 Demoboard OPERATIONAL MANUAL Copyright Devices sold by austriamicrosystems are covered by the warranty and patent indemnification provisions appearing in its Term of Sale. austriamicrosystems makes no warranty, express, statutory, implied, or by description regarding the information set forth herein or regarding the freedom of the described devices from patent infringement. austriamicrosystems reserves the right to change specifications and prices at any time and without notice. Therefore, prior to designing this product into a system, it is necessary to check with austriamicrosystems for current information. This product is intended for use in normal commercial applications. Te ch ni ca am lc s on A te G nt st il lv al id Copyright © 2009 austriamicrosystems. Trademarks registered ®. All rights reserved. The material herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. To the best of its knowledge, austriamicrosystems asserts that the information contained in this publication is accurate and correct. However, austriamicrosystems shall not be liable to recipient or any third party for any damages, including but not limited to personal injury, property damage, loss of profits, loss of use, interruption of business or indirect, special, incidental or consequential damages, of any kind, in connection with or arising out of the furnishing, performance or use of the technical data herein. No obligation or liability to recipient or any third party shall arise or flow out of austriamicrosystems rendering of technical or other services. Revision 1.0, 17-Jun-2009 www.austriamicrosystems.com Page 12 of 12