ams Sensor AS5600 Adapter Board Owner’s Manual

October 29, 2023
ams Sensor

ams Sensor AS5600 Adapter Board

ams-Sensor-AS5600-Adapter-Board-PRODUCT Revision History

Revision

1.0

| Date 18.03.2015| Owner

mzie

| Description

Initial

---|---|---|---

Introduction

The POTUINO is a potentiometer shield compatible with the Arduino UNO board. It was designed to evaluate the AS5600 Smart Potentiometer IC.

Kit Content

ams-Sensor-AS5600-Adapter-Board-FIG-1

ams-Sensor-AS5600-Adapter-Board-FIG-8

Note : An Arduino UNO board (not included) is required to use the POTUINO shield.

Board description

The POTUINO shield allows evaluation of the AS5600 position sensor. This Arduino shield is fully assembled with the AS5600 IC and its necessary external components. The Arduino shield includes different breakout options. A breakout magnet holder is available on the left side of the PCB and in addition, an adapter board breakout is possible. The headers on the bottom side of the PCB are used for mounting as well as for electrical connection to the Arduino UNO.

ams-Sensor-AS5600-Adapter-Board-FIG-2

Software

Custom firmware source code can be generated using the Arduino IDE. An example code and Arduino library is available for reference. In addition, the AS5600 LabVIEW Evaluation GUI software can be used to readout and configure the AS5600.

LabVIEW
The AS5600 LabVIEW Evaluation GUI supports the Arduino UNO. The latest version of the software can be downloaded from the ams webpage. Before the Arduino UNO can be used together with the POTUINO shield the LabVIEW interface firmware has to be flashed onto the Arduino. Easiest way to do this is to download the free software tool XLoader.

Choose the LIFA_Base_AS5600.hex file which is also available for download from the ams webpage. Then choose the Uno(ATmega328) in the Device dropdown menu. After this choose the correct COM port which can easily be checked in the Windows Device Manager and finally click Upload. After this procedure the Arduino UNO is ready for usage with the LabVIEW Evaluation GUI of the AS5600. If the Hardware Settings window opens, the switch has to be moved to “Arduino UNOr3”. This is show in Figure 4: AS5600 Evaluation GUI – Hardware Settings below. A green tick indicates successful communication with the sensor. For further information about the AS5600 LabVIEW Evaluation GUI please refer to the User Manual.

Using the Arduino IDE

Installing the Arduino library
The Arduino library for the AS5600 sensor can be downloaded from the ams webpage. To add an existing library open the Arduino IDE, click Sketch in the menu bar. Then Import Library and Add Library. Then choose the AMS_5600_library.zip and open it.

ams-Sensor-AS5600-Adapter-Board-FIG-5

When including the header file to a new sketch all the functions of the library are available. e.g.

Reading out the AS5600 sensor
Source code examples are also available for download on the ams webpage. Following source code shows an easy example of reading out the sensor:

FILE: AS5600
Author: Mark A. Hoferitza, Field Application Engineer, ams AG www.ams.com Date: 27 May 2014 Description: Development of sketches for AS5600 “Potuino” Read Raw Angle and Angle. Single Value, no averaging

  • int AS5600_ADR = 0x36;
  • const int raw_ang_hi = 0x0c;
  • const int raw_ang_lo = 0x0d;
  • const int ang_hi = 0x0e;
  • const int ang_lo = 0x0f;
  • const int stat = 0x0b;
  • const int agc = 0x1a;
  • const int mag_hi = 0x1b;
  • const int mag_lo = 0x1c;
  • void setup(){
  • Serial.begin(9600);
  • Wire.begin();
  • void startup(){
  • void loop(){
  • // Wire.beginTransmission(AS5600_ADR);
  • // Wire.write(0x);
  • // Wire.write(0x00);
  • // Wire.endTransmission();

Read Raw Angle Low Byte

  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(raw_ang_lo);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • int lo_raw = Wire.read();
  • Read Raw Angle High Byte
  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(raw_ang_hi);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • word hi_raw = Wire.read();
  • hi_raw = hi_raw << 8; //shift raw angle hi 8 left
  • hi_raw = hi_raw | lo_raw; //AND high and low raw angle value

AS5600 Adapter Board

  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(ang_lo);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • int lo_ang = Wire.read();
  • Read Angle High Byte
  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(ang_hi);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • word hi_ang = Wire.read();
  • hi_ang = hi_ang << 8;
  • hi_ang = hi_ang | lo_ang;
  • Read Magnitude High Byte
  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(mag_hi);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • word hi_mag = Wire.read();
  • //Read Magnitude Low Byte
  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(mag_lo);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • word lo_mag = Wire.read();
  • hi_mag = hi_mag << 8;
  • hi_mag = hi_mag | lo_mag;

Read AGC

  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(agc);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • int agc_val = Wire.read();

Read Status Bits

  • Wire.beginTransmission(AS5600_ADR);
  • Wire.write(stat);
  • Wire.endTransmission();
  • Wire.requestFrom(AS5600_ADR, 1);
  • while(Wire.available() == 0);
  • int stat_val = Wire.read();
  • Serial.print(” AS5600 Raw Angle = “); Serial.println(Raw_Ang, DEC);
  • Serial.print(” AS5600 Angle = “); Serial.println(Ang, DEC);
  • Serial.print(” AS5600 Magnitude = “); Serial.println(hi_mag, HEX);
  • Serial.print(” AS5600 AGC = “); Serial.println(agc_val, HEX);
  • Serial.print(“AS5600 Status Bits = “); Serial.println(stat_val, BIN);

AS5600-POTUINO Hardware

AS5600-POTUINO schematics

ams-Sensor-AS5600-Adapter-Board-FIG-6

AS5600-POTUINO PCB layout

ams-Sensor-AS5600-Adapter-Board-FIG-7

Ordering & Contact Information

  • Ordering Code/Description
  • AS5600-POTUINO AS5600 Eval Kit Adapter Board

Buy our products or get free samples online at:
www.ams.com/ICdirect

Technical Support is available at:
www.ams.com/Technical-Support

Provide feedback about this document at:
www.ams.com/Document-Feedback

For further information and requests, e-mail us at:
[email protected]

For sales offices, distributors and representatives, please visit:
www.ams.com/contact

Headquarters ams AG Tobelbaderstrasse 30 8141 Unterpremstaetten Austria, Europe

Copyrights & Disclaimer

Copyright ams AG, Tobelbader Strasse 30, 8141 Unterpremstaetten, Austria- Europe. 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. Demo Kits, Evaluation Kits and Reference Designs are provided to recipient on an “as is” basis for demonstration and evaluation purposes only and are not considered to be finished end-products intended and fit for general consumer use, commercial applications and applications with special requirements such as but not limited to medical equipment or automotive applications. Demo Kits, Evaluation Kits and Reference Designs have not been tested for compliance with electromagnetic compatibility (EMC) standards and directives, unless otherwise specified. Demo Kits, Evaluation Kits and Reference Designs shall be used by qualified personnel only. ams AG reserves the right to change functionality and price of Demo Kits, Evaluation Kits and Reference Designs at any time and without notice.

Any express or implied warranties, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. Any claims and demands and any direct, indirect, incidental, special, exemplary or consequential damages arising from the inadequacy of the provided Demo Kits, Evaluation Kits and Reference Designs or incurred losses of any kind (e.g. loss of use, data or profits or business interruption however caused) as a consequence of their use are excluded. ams AG 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 ams AG rendering of technical or other services.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals