ODrive

SKU:M036

概要

ODriveは、オープンソースのモーションコントロールソリューションODriveをベースにM5Stackが立ち上げた高性能サーボモーター駆動モジュールです。三相サーボモータ1台の制御をサポートし、ピーク駆動電流は5Aに達します。エンコーダ信号インタフェースを備え、高速モータ制御が可能で、高精度なモーションコントロールの位置決めを実現します。UART通信インターフェースを使用し、公式ODrive設定ツールとプロトコルに対応しています(ホストコンピューターツールを通して異なるモーターモーションモードを設定し、モーターをよりスムーズに、安定的に動作させることも可能です)。

  • 上位のコンピューターを通じてモーターパラメータを設定し、UARTを通じてモーター変位を制御するコマンドを送信します。

製品の特徴

  • 単相三相サーボモータ駆動
  • ピーク駆動電流5A
  • 12-24V DC電源入力インターフェース (最大5Aまでのアダプタ出力電流が必要)
  • 通信インターフェース UART
  • 1チャンネルサーボモータードライブ/エンコーダーインターフェース付き

含まれるもの

  • 単一モジュール版

    • 1x ODrive モジュール
    • 1x 3.96-3P ターミナル
    • 1x 3.96-2P ターミナル
    • 1x 2.54-5P ターミナル
  • 適合するモーター版

    • 1x ODrive モジュール
    • 1x 3.96-3P ターミナル
    • 1x 3.96-2P ターミナル
    • 1x 2.54-5P ターミナル
    • 1x サーボ・モーター (詳細なパラメーターについては、以下の仕様表を参照してください)
    • 1x エンコーダ・アダプタ・ボード

アプリケーション

  • 高精度モーションコントロール
  • サーボモーター駆動

仕様

リソース パラメータ
オプションのサーボモーター仕様 フェーズ:3相、電圧: DC24V、定格電流: 4A、定格電力: 62W、定格回転数: 3000rpm
モータドライバチップ DRV83018
最大駆動電流 5A
Interface Type 3.96-2P (power supply), 3.96-3P (motor), 2.54-5P (encoder)
入力電源 DC12~24V
製品重量 22.5g
梱包重量 42.3g
製品サイズ 54.254.2**13.2mm
梱包サイズ 95 *65 *25mm

PinMap

M5Core1 GPIO13 GPIO5 5V GND
ODrive RX TX 5V GND

回路図

関連リンク

Example

備考 この場合、ODriveモジュールはサーボモーターの高速かつ正確な回転を制御するために使用されます。ボタンCを押してキャリブレーションを行い(この間、モーター軸に触れないでください)、ボタンAを長押し、短押ししてモーター回転を制御します。注)本実施例のモータパラメータ設定は、M5 Odriveキットに適合したモータ機種にのみ適用されます。それ以外のモータを駆動する場合は、使用するモータに合わせてパラメータを設定してください。

Video

Arduino-API


//Create an instance, specify the serial port used
ODrive odrive(Serial1);

// Commands
void setPosition(float position);
void setPosition(float position, float velocity_feedforward);
void setPosition(float position, float velocity_feedforward, float current_feedforward);
void setVelocity(float velocity);
void setVelocity(float velocity, float current_feedforward);
void setCurrent(float current);
void setGain(float pos, float vel, float vel_integrator);
void setControlMode(int32_t mode);
void setControlInputPos(float pos);
void trapezoidalMove(float position);
// Getters
float getVelocity();
float getVbusVoltage();
int32_t getEncoderShadowCount();
float getEncoderPosEstimate();
float getMotorTemp();
float getPhaseCurrent();
float getBusCurrent();
bool checkError(int32_t* axis=NULL, int32_t* motor_thermistor=NULL, int32_t* encoder=NULL, int32_t* controller=NULL);
// General params

// State helper
bool runState(int32_t requested_state, uint32_t timeout);

// device will reboot
void eraseConfig();
void reboot();
void saveConfig();
void setDefaultConfig();

float readFloat();
int32_t readInt();
void writeToDeive(const char* data);
void writeConfig(const char* config, float_t value);
void writeConfig(const char* config, int32_t value);
int32_t readConfigInt(const char*config);
float readConfigFloat(const char*config);

ODriveTool

ODriveTool は、ODrive の設定およびデバッグ用ソフトウェアで、これを通してモーターのパラメーターを設定することができます。このチュートリアルでは、Linuxプラットフォームでのodrivetoolのインストールと基本的な使い方を説明します。

  • Use the following command to install odrivetool v0.5.1, environment requirement: python3.
pip3 install odrive==0.5.1.post0
  • Add ~/.local/bin to the system environment variable, execute the following command, and insert export PATH=$PATH:~/.local/bin to the end of the text.
vim ~/.bashrc
  • Execute odrivetool from the command line to run the tool. Connect the ODrive module to the computer and wait for odrivetool to recognize it. After successful connection, enter odrv0.vbus_voltage to test and obtain the power supply voltage of the drive board.
$odrivertool

ODrive control utility v0.5.1.post0
Website: https://odriverobotics.com/
Docs: https://docs.odriverobotics.com/
Forums: https://discourse.odriverobotics.com/
Discord: https://discord.gg/k3ZZ3mS
Github: https://github.com/madcowswe/ODrive/

Please connect your ODrive.
You can also type help() or quit().

Connected to ODrive 306A396A3235 as odrv0

In [1]: odrv0.vbus_voltage
  • Commonly used configuration commands.

//配置电机电流限制
odrv0.axis0.motor.config.current_lim [A].

//配置电机转速限制值
odrv0.axis0.controller.config.vel_limit

//配置功率耗散电阻的电阻值
odrv0.config.brake_resistance


//保存配置
odrv0.save_configuration()

詳しくは、 Odrive公式ドキュメントはこちら をご覧ください。