1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

日記;回すだけII ①CANopenの準備

Last updated at Posted at 2021-09-30

PC側のCANインターフェース

 入手性、日本法人があるなどの理由からIXXATのUSB-to_CAN V2 Compactをマルツで入手しました。付属のビューワcanAnalyser3 Miniでは、CANopenのプロトコルを見ることはできません。接続したPCのOSはWindows10 12H1です。

ファイル名

 購入したモデルのCAN接続口は、一般的なDサブ9ピンです。130Ω(120Ωがなかったので)の終端を取り付けたケーブルを自作しました。終端は、モータ側にもつけています。まったく終端を入れないと、同期をとるためのスタッフィング信号のエラーが多発しました。CANopenの物理層はCANバスです。ツイストペア線で、複数の機器がぶら下がります。両端には終端抵抗を入れます。

ファイル名

 Windowsのドライバと同時にインストールされるcanAnalyser3 Miniの画面です。つながっていることの確認しかできません。この上のモデルだとCANopenのプロトコルに対応していますが、Digi-keyで調べたら20万円でした。

2021-09-29 (2).png

使用したモータ

 amazonでもステッピング・モータに対応したCANopenインターフェースが販売されていますが、動く確証がありません。Digi-keyで検索したら、TRINAMIC社のモータが1万7千円ぐらいからありました。これだけシリーズが用意されているのだからという理由で、一番小さなモデルPD42-1270 CANopenを購入しました。モータ自体は、ステッピング・モータでメジャーなNEMA17ライクです。CANopenのインターフェースは、モータの後ろ側に二つのねじで止められています。コンパクトです。
 取付金具はアマゾンにありました。
   「RATTMMOTOR 取付角42mm ブラケット 取付金具 NEMA17ステッパーモーター用 L形 3Dプリンター部品 ネジ付き 3個入り」
 10ピンのコネクタもアマゾンにありました。
   「6セット10針100ミリ長さの線束単体で2.0ミリ間隔+10針直コンセント6個(AWG#26)のJST PH」
  DB9のオス/メスのコネクタもアマゾンで入手しました。
   「uxcell DB9 9ピンメス-オスコネクタ PCB実装 半田付けタイプ D-サブ」

接続

 10ピンのコネクタの配置です。電源は6~24Vなので、24Vと12Vで試しました。100rpm以上の速度でトルクに差が出ます。5V端子は出力です。特に何もつなぎません。

1 GND Supply and signal ground connection
2 +24V Supply voltage input (+6V to +28V DC)
3 CAN_H Differential CAN bus signal (non-inverting)
4 CAN_L Differential CAN bus signal (inverting)
5 GND Signal ground connection
6 +5V 5V output, 100mA maximum load, e.g. for end / home switch circuit or external encoder supply
7 HOME (GPI0) General purpose input 0, can be used as HOME switch input, also. Configurable as analog input AIN0 via software (+5V compatible, internal 10k pullup to +5V)
8 REFL (GPI1) General purpose input 1, can be used as left reference / stop switch input REFL / STOP_L, also. Configurable as incremental encoder input channel A via software (+5V TTL compatible, internal 10k pull-up to +5V)
9 REFR (GPI2) General purpose input 2, can be used as right reference / stop switch input REFR / STOP_R, also. Configurable as incremental encoder input channel B via software (+5V TTL compatible, internal 10k pull-up to +5V)
10 ENN (GPI3) ENABLE NOT input (active low) for driver stage, 0 = enabled, 1 = disabled (+5V TTL compatible, internal 10k pull-up to +5V)

 CANバスとは、CAN_L、CAN_H、GNDの3本でつなぎました。
 7 HOME、8 REFL、9 REFRの3本にはマイクロスイッチをつなぎました。各信号は+5Vにプルアップされているので、スイッチがONになるとGNDとショートする配線です。10 ENNは負論理なので、GNDに落として有効の状態にします。
 写真の電源ユニットは、12V-1.67Aです。

IMGP0785.png

CANopenの解説書

 1冊だけ見つけました。
   Olaf Pfeiffer , Christian Keydel , Andrew Ayre、福島 E.文彦 (監修), シュタールジャパン (翻訳) ;CANおよびCANopenによる組み込みネットワーク、シュタールジャパン。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?