Code Monkey home page Code Monkey logo

as5600_breakoutboard_v1_0's Introduction

12bit (4096P/R) 磁気式エンコーダAS5600 Breakout Board

概要

12bit (4096P/R) 分解能の磁気式アブソリュートエンコーダ AS5600 (ams AG製) を2.54mmピッチに変換する基板です。ネオジム磁石を同梱。
5V、3.3V、GNDの電源ピンとI2C、アナログ/PWM出力のピンが出ています。電源電圧は5Vもしくは3.3Vです。
※AS5601との違いはAS5601の出力方式がA/B相のインクリメンタル出力であるのに対し、AS5600はアナログ/PWM出力である点です。

※本ボードはDCモータ制御シールドV1.0にも使用しています。

AS5600の特徴

  • 4096P/R の高分解能
  • 磁気式のため非接触で角度計測が可能であり、信頼性と耐久性に優れている
  • インターフェイス:I2C、アナログ出力もしくはPWM出力
  • アナログ出力:角度に対応したアナログ電圧値を出力
  • PWM出力:角度に対応したデューティ比のPWM信号を出力
  • I2C:設定レジスタにアクセスでき、角度の読み取りや動作設定が可能
  • サンプリング時間:150μs
  • AS5600とネオジム磁石の中心が1mm程度ずれても値の読み取りが可能

基板仕様

  • 基板サイズ:横20mm×縦13.5mm
  • 基板マウント用穴:15mmピッチ、M3×2穴
  • 電源電圧に5Vを供給する場合は3.3Vピンをオープンに、3.3Vを供給する場合は5Vピンにも3.3Vを供給してください。
  • DIRピンはGNDに接続、PGOピンは非接続

販売

スイッチサイエンス委託販売ページ
※大量注文や在庫に関する問い合わせはこちらまでご連絡ください。

内容物

  • AS5600 Breakout Board 本体
  • エンコーダ用ネオジム磁石

回路図

寸法

取付方法

  1. 同梱のネオジム磁石を回転体の軸中心に取り付けます
  2. AS5600の中心とネオジム磁石の中心が合うよう基板を固定部に取り付けます

取付例

Arduinoによるプログラム例

I2Cによる角度の取得

配線図

ミニマムコード

#include <stdint.h>
#include <Wire.h>
#define AS5600_AS5601_DEV_ADDRESS      0x36
#define AS5600_AS5601_REG_RAW_ANGLE    0x0C

void setup() {
  // I2C init
  Wire.begin();
  Wire.setClock(400000);

  // Read RAW_ANGLE value from encoder
  Wire.beginTransmission(AS5600_AS5601_DEV_ADDRESS);
  Wire.write(AS5600_AS5601_REG_RAW_ANGLE);
  Wire.endTransmission(false);
  Wire.requestFrom(AS5600_AS5601_DEV_ADDRESS, 2);
  uint16_t RawAngle = 0;
  RawAngle  = ((uint16_t)Wire.read() << 8) & 0x0F00;
  RawAngle |= (uint16_t)Wire.read();
  // Raw angle value (0 ~ 4095) is stored in RawAngle
}

void loop() {
}

アナログピンを用いた角度の取得

配線図

ミニマムコード

#include <stdint.h>

void setup() {
  uint16_t AnalogValue = 0;
  AnalogValue = analogRead(0);
  AnalogValue &= 0x03FF;
  AnalogValue = 0x03FF - AnalogValue;
  // Angle value (0 ~ 1023) is stored in AnalogValue
}

void loop() {
}

License

MIT License

as5600_breakoutboard_v1_0's People

Contributors

y2kblog avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.