梁雪霖
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # ic FLEXMOS Hex Low-side MOSFET Pre-driver [NCV7520](https://www.onsemi.com/pdf/datasheet/ncv7520-d.pdf) 可以看到有SPI 和 parallel pin(就連PWM) 看起來還是沒有那種輸入phase angle,直接output 對應svpwm。也是對,畢竟MCU能做,但就是有點怕SVPWM 計算耗費性能。 [Spining BLDC(Gimbal) motors at super slooooooow speeds with Arduino and L6234](http://www.berryjam.eu/2015/04/driving-bldc-gimbals-at-super-slow-speeds-with-arduino/) 和預期的一樣有driver,input 就3個pin腳。這IC主要是希望後面就直接接馬達了。但應該也可以當做前級就好。 [L6234 Three phase motor driver ](https://www.st.com/en/motor-drivers/l6234.html) ![](https://www.st.com/content/ccc/fragment/product_related/rpn_information/product_circuit_diagram/group0/ca/39/62/98/e4/c7/46/b2/L6234_BD/files/L6234_BD.PNG/jcr:content/translations/en.L6234_BD.PNG) 其實有,只是叫controller [MP6570](https://www.monolithicpower.com/en/mp6570.html) ![](https://media.monolithicpower.com/catalog/product/cache/ccb9ba928e4f463ae145b55d0127b66f/M/P/MP6570_499_1.jpg) [MP6540](https://www.monolithicpower.com/en/mp6540-mp6540a.html) 也不錯,整合MOS 和 current OP。 * 比較像的還有 [DRV8313](https://www.ti.com/lit/ds/symlink/drv8313.pdf?ts=1691034208831&ref_url=https%253A%252F%252Fwww.google.com%252F),它的PGND1也是放resistance,但沒有放大器。 這個IC有模組,比較常見。 * analog device [TMC4671](https://media.digikey.com/pdf/Data%20Sheets/Trinamic%20Motion%20Control%20PDFs/TMC4671_v1.06.pdf): 這個就是SPI 介面,然後輸出SVPWM。但是又太多了,連PID controller,甚至torque mode, position control... 都做完了。但是可能也是不錯的方案,畢竟current loop用硬體做,保證realtime,省不少資源。其它loop再用算的。 * update rate of current controller and PWM at maximum frequency of 100 kHz * 10us 的current loop,很吸引人 * 50RMB * datasheet 裡面的資料很豐富且專業。 應該是如果只有算SVPWM的電路太浪費了,可以多做一點。 大部份的整體IC都是無介面,不接MCU。 MP6570, TMC4671這種的比較少。 往下一階 SPI Controlled H-Bridge ,L9958,也是有。但沒SVPWM 還用SPI沒意義。 # circuit ![](https://filedn.com/lzOQU5aSSXB47Aru33KDfTb/motor_drive_circuit_module.dio.svg) [NXP AN1590 HIGH VOLTAGE MEDIUM POWER BOARD FOR THREE PHASE MOTORS](https://www.nxp.com/docs/en/application-note/AN1590.pdf) freescale detail design reference. good for knowing sensor and isolation design. basically, all signal will use divider resistor. And isolate OP for isolation. OP for low pass filter and signal amplifier. * HCPL7800 * 光隔離放大器 * MC34082 * OP * 我希望能offset。0~5V。 [Renesas Current and Voltage Sensing Solutions for Motor Drive Control Using Photocouplers](https://www.renesas.com/us/en/document/whp/current-and-voltage-sensing-solutions-motor-drive-control-using-photocouplers-0) 把 isolator, op, delta sigma AD modulator 整合。 ADC 有分 Delta Sigma, successive approximation register (SAR) Delta Sigma Demodulator (DSD) 可以decode delta sigma signal, 可以整合進MCU stm32f7 有 DFSDM f28377d 有 Sigma Delta Filter Module (SDFM) [A Simple ADC Comparison Matrix](https://www.analog.com/en/technical-articles/a-simple-adc-comparison-matrix.html) DS DAC trade-off of speed to resolution compare to SAR DAC # encoder > 自己做了話,可以作廢不少,encoder 浪費太多時間和成本在介面。 [提升馬達控制編碼器的通訊可靠度與效能](https://www.eettaiwan.com/20180227ta31-enhanced-communication-reliability-and-performance-for-motor-control-encoder-applications/) [绝对值编码器接口:SSI、BISS、Hiperface、EnDat之间的差异](https://zhuanlan.zhihu.com/p/650869976) vendor specific protocol endat2.2, tamagawa t-format, hiperface 沒有用sincos 的需要。 增量式都直接用ABZ,或是SPI (如果是磁頭)直接讀了。ABZ 如果沒有差分線,所以 vcc, gnd, shield, a,b,z,共6個。但如果有,就又不一樣。所以ABZ的接頭不太統一。 低階的,都是6pin 的版本。差分與否,就是看距離。如果是驅電一體,就不需要。總體來說,我認為驅電一體 > remote 驅動器。不然就用額外的 差分转集电极。 理論上,增量式也可以用SSI。但是有用到的幾乎都是絕對型。 ~~總之,BISS 是第一選擇。~~ 速度要多快?assume 10ms(100khz) rate,32bit encoder,就是3.2Mbps。如果要request response,就要x2-->6.4Mbps,再來如果有額外1個通道for other info,x2-->12.8Mbps。 目前由於encoder interface ic 的獨佔性,還沒有真正通用的abs encoder 方案。老舊,無軟體層協議的 **SSI** 可能反而是主流。新的挑戰者 Ethercat 沒有對應mcu 2 mcu ic,好像不太適合。CANopen FD可能更有機會,但是一開始就被速度限制上限了。還是說,biss-c 的fpga會先被做出來? 主流的encoder裡,**tamagawa** tformat 因為是usart,所以應該是最可得的。BiSS的應該是design算好的,但是master interface 直接卡死。 會不會說,最後mcu 還不如直接用ethernet udp protocol 走過來? ## SSI [什麼是串行同步接口](https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MgLSAU&l=zh-TW) [SSI Encoders Overview](https://www.dynapar.com/technology/encoder_basics/ssi_encoders/) SSI 本質上是一種硬體層的協定(e.g. SPI 位階),一般的使用就是 periodic 的output 。由於是硬體,所以output 的單位之類都不一定有規範,有1. gray code 2.abs encoder 的直接output。 速度 2Mhz 大概到頂。 SSI 還是有意義的,因為現在的encoder interface ic 大多只有獨佔的解決方案。 ## BISS [wiki BiSS interface](https://en.wikipedia.org/wiki/BiSS_interface) > Because BiSS utilizes the PHY of SSI [(RS-422)], it develops as the successor of the SSI interface in automation [BISS spec](https://biss-interface.com/c/downloads/) BISS B 已經停用,目前都是2007年後的 BISS C。 Serial 系列的protocol 最大問題是很多時候沒有一個硬體直接定義的frame,或是data 要在那裡切分。這導致ISR 裡要有routine 去polling check buffer。 BISS 做的就比endat2.2 好,BISS 的clock signal 由主機切斷,但endat 會不斷持續,增加判斷data 的難度。 [ic-haus BiSS 接口] [BISS通信协议简介](https://zhuanlan.zhihu.com/p/630372843) BISS 有串連encoder , 数据同步 功能,同步對於很進階的進用有意義。 [MR2 BiSS編碼器外掛模組](https://www.gathertech.net/post/mr2-biss%E7%B7%A8%E7%A2%BC%E5%99%A8%E5%A4%96%E6%8E%9B%E6%A8%A1%E7%B5%84) 硬體介面和 SPI, usart 不同,導致大部份都用FPGA. 有部份ic,[ichaus](https://www.ichaus.de/products/?category=22240) iC-MB3 和 iC-MB4。NTD 250起。 我估計一般 FPGA的價格在 NT 150左右,超過150的ic 實在沒必要。 蠻貴的。沒有辦法用usart 做就沒意義了。 stm32的SPI 部份可以 [receive only mode](https://community.st.com/t5/stm32-mcus-products/biss-c-implementation/td-p/81200),但這也表示它只有部份功能。 slave open, master acutal close. 等 fpga open? [BISS-C](https://github.com/lenzencoders/BISS-C) ## tamagawa t-format 用的人也不少。 ## endat 越來越封閉,變成有 要求才給decode 的 document 有考慮incremental encoder 的情況。 endat2.2 比 endat2.1 就是同時有 publish 的 data block 和 server/client 的 data block 在同一個frame。 有endat3了,和endat2.2完全不同,直接切成固定的request, response。更好。 [endat/c_src](https://github.com/thiagoesteves/endat/tree/master/c_src) 硬體介面和usart 不同,導致大部份都用FPGA ## tamagawa tformat [多摩川编码器使用总结 ](https://github.com/imuncle/imuncle.github.io/issues/32) 是用RS485 (usart),算是最可得的。 max 2.5Mhz,算是比SSI 還高。以前usart 沒那麼彈性時,好像也要fpga。 ## ethercat CiA DS-406 是 encoder 的spec。但就是有點尷尬。ethercat 的design 是以 pc 為ethercat master, mcu 為 ethercat slave 為主。除了像 Ti sitara 特別強調可以 mcu 為 master 以外,或 [額外software](https://community.st.com/t5/stm32-mcus-embedded-software/run-ethercat-master-on-stm32h7-series/td-p/244332),幾乎沒有。 用ethercat encoder 了話,可以把速度再提上去,Serial 大概10M到頂,一舉x10 到100M。而且不用搞一堆特規的encoder 協定。網路線也非常成熟。 當然是可能有點over design了,因為 MCU 就只有要接encoder,如果要接很多額外的 peripheral 意義較大。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully