Application Note: AS8510-AN04 – Arduino Shield AS8510 AN04 – Arduino Shield www.ams.com Revision 1.1 page 1/8 AS8510-InsertApp# Arduino Shield Table of Contents 1 General Description ............................................................................................................. 3 1.1 Kit Content ........................................................................................................................... 3 2 Getting Started ..................................................................................................................... 4 3 Hardware Description........................................................................................................... 5 4 Software Description ............................................................................................................ 6 5 Board Schematics, Layout and BOM ................................................................................... 7 6 Ordering Information ............................................................................................................ 8 Revision History Revision Date Owner Description 1.1 06.10.2014 gheh Version 1.1 www.ams.com Revision 1.1 / 06/10/14 page 2/8 AS8510-InsertApp# Arduino Shield 1 General Description This document describes the AS8510 Arduino Shield Reference design. It is an add-on to the very popular Arduino Series of uC development boards. The reference design allows to measure current and voltage via the AS8510 A/D IC and to use the measured data in any Arduino sketch. Schematic and Layout are available on the homepage for free use with no restrictions. Libraries to Interface to the Arduino IDE as well as example code can be downloaded from the homepage as well. 1.1 Kit Content The kit consists of the Shield with connections for current and voltage measurement. Software, example code, and all cad files are available from the download area at #URL Figure 1: AS8510 Arduino Shield www.ams.com Revision 1.1 / 06/10/14 page 3/8 AS8510-InsertApp# Arduino Shield 2 Getting Started To get started connect the AS8510 Shield to your Arduino board like in the following picture: Figure 2: AS8510 Arduino Shield connected to the Arduino Uno board Install the Arduino IDE from: http://arduino.cc/en/Main/Software Download the example code and lib files from the Homepage: #URL Move the AS8510 folder to the libraries folder of the Arduino IDE Open the as8510_arduino_test.ino file in the Arduino IDE You can compile the test project and download it to the Arduino Board The test project will output measured current and voltage into the serial monitor of the Arduino IDE. The test project has calibration data for current and voltage channel which has a tolerance between manufacturing lots. You can tweak the measurement performance by comparing the measured values to value measured with a DMM and change the calibration coefficients accordingly. www.ams.com Revision 1.1 / 06/10/14 page 4/8 AS8510-InsertApp# Arduino Shield 3 Hardware Description The AS8510-Arduino Shield is powered via the Arduino Board. Connectors A and D are for current measurement. The connectors in between (B and C) as well as J1 (F) are for voltage measurement. Keep in mind that GND of current measurement and voltage measurement are the same and are connected to the GND of the Arduino. A B F C G D E Figure 3: PCB Connection Diagram Label Name Designator Description Info A LOAD BU4 + current input Connect + side of current measurement path here B V_MEAS_+ + voltage input Connect + side of voltage measurement path here C V_MEAS_GND - voltage input Connect GND side of voltage measurement path here (connected to GND connector D) D GND - current input Connect GND side of current measurement path here www.ams.com BU3 Revision 1.1 / 06/10/14 page 5/8 AS8510-InsertApp# Arduino Shield Label Name Designator Description Info E V_MEAS2 J2 Additional measurement inputs Additional voltage measurement inputs (ETR / ETS) F V_MEAS J1 Voltage measurement Same connection as B/C but as a pin header Table 1: PCB Connections 4 Software Description The AS8510 Library which is part of the example code available from the homepage contains the following functions: AS8510.begin(); Initializes all necessary pins and activates the SPI interface AS8510.set_volt_calib(cal_value); Used to calibrate the voltage channel AS8510.set_curr_calib(cal_value); Used to calibrate the current channel AS8510.set_curr_gain(40); Changes the gain in the current channel. Possible values are 1,5,25,40,100. This allows you to trade current range versus accuracy. Typical value is 40 AS8510.autoconversion(); Starts the autoconversion procedure.. New values are available each millisecond AS8510.read_voltage() Outputs the measured voltage in millivolts AS8510.read_current() Outputs the measured current in milliamps www.ams.com Revision 1.1 / 06/10/14 page 6/8 AS8510-InsertApp# Arduino Shield 5 Board Schematics, Layout and BOM Figure 4: AS8510 Arduino Shield Schematic www.ams.com Revision 1.1 / 06/10/14 page 7/8 AS8510-InsertApp# Arduino Shield Figure 5: AS8510 Arduino Shield Top Layer Figure 6: AS8510 Arduino Shield Bottom Layer 6 Ordering Information The AS8510 Arduino Shield can be ordered via www.ams.com/RefDesign/AS8510-Arduino . Table 11: Ordering Information Ordering Code 990600809 www.ams.com AS8510 Arduino Shield Revision 1.1 / 06/10/14 page 8/8