伴伴學 Accomdemy
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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

      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.
      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
    • Transfer ownership
    • Delete this note
    • 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 Help
Menu
Options
Engagement control 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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

    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.
    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
    3
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- tags: 伴伴學共創專案 --- ![](https://hackmd.io/_uploads/Hk809zQUh.jpg) # 海龜繪圖機器人 ## 簡介 什麼是海龜機器人?該概念可以追溯到威廉·沃爾特(William Walter)在 1940 年代進行的機器人工作,該工作研究了簡單系統中的複雜行為。海龜機器人通常移動緩慢,轉彎半徑小,可以追踪顯示其隨時間變化的行為的設計。它們是很好的教學輔助工具,因為它們的編程輸出可以在視覺上看到。許多編程語言都內置了“海龜圖形”。海龜圖形還可以用於研究高級主題,例如L系統或仿射幾何學。 #OTTR #口丁海龜 目標用 Raspberry Pi Pico 來完成。 這位是神經生物學家威廉格雷華特( William Gray Walter) 他在上世紀四十年代根據腦神經連結原理打造了史上第一、二部「電子生物」並取名為Elmer 和 Elsie。其他人將他的機器生物暱稱為「烏龜」或是「海龜」。 後來在六十年代的電腦程式LOGO語言以此為靈感,內建了「海龜繪圖」的繪圖系統,用來教育小小孩的電腦程式概念。 直到八十年代,再進一步將「海龜繪圖」實體化,讓微控制器打造的海龜機器人,背著繪圖筆在紙上真實畫圖。 直到現代的python就成為眾所周知的turtle函式庫了。 為什麼用海龜來繪圖呢? 因為海龜在海灘上爬行的時候會留下長長的軌跡啊~ https://www.facebook.com/pondahai/posts/pfbid0331FTaAWZifqVcM4mVqwJfEer2wbn5UtYFMFaE95JbL5Myp5SDkZ4d7jwKQ9B9iNkl?locale=zh_TW ## 參考資料 [The History of Turtle Robots](https://roamerrobot.tumblr.com/post/23079345849/the-history-of-turtle-robots) [CS 161 Lab B - Turtle Graphics](https://faculty.washington.edu/joelross/courses/archive/s15/cs161/lab/b/) [Open Source Turtle Robot (OSTR)](https://www.instructables.com/OSTR/) [Doodle Bot](https://mitmedialab.github.io/doodlebot/make.html) https://joshburker.com/logoturtle/LogoTurtle.html 計畫 [Mirobot v2 drawing turtle robot kit](https://openstem.com.au/store/digital-technologies/digitech-physical-resources/mirobot-v2-drawing-turtle-robot-kit) [Open Source Turtle Robot Kit](https://www.tindie.com/products/makersbox/open-source-turtle-robot-kit/) [Disney's Beachbot is an artistic robot turtle that can draw in the sand](https://www.engadget.com/2015-01-12-disney-research-beachbot-art.html?guccounter=1) https://github.com/aspro648/OSTR ## 材料 https://github.com/aspro648/OSTR/blob/master/V2/BOM.md * [N20 萬向輪](https://shopee.tw/iCShop-N20-萬向輪●368030501365●滾珠輪-全向輪-智能小車-車輪-機器人-i.15050169.18913498233?sp_atk=60077483-9e8e-45b2-85cb-8839d9c35ae8&xptdk=60077483-9e8e-45b2-85cb-8839d9c35ae8) 20元 * iCShop-W420 鋼珠萬向輪●368040500022●滾珠輪 全向輪 智能小車 車輪 機器人 適合三號電池盒的高度 * [28BYJ-48-5V] ![](https://hackmd.io/_uploads/ryDutc_V2.png) 需要畫出尺寸 tinkercad有模型耶!! ![](https://hackmd.io/_uploads/SySFks_Nh.png) (https://shopee.tw/%E3%80%90UCI%E9%9B%BB%E5%AD%90%E3%80%91(K-4)-28BYJ-48-%E6%AD%A5%E9%80%B2%E9%A6%AC%E9%81%945V-12V-4%E7%9B%B85%E7%B7%9A-%E6%B8%9B%E9%80%9F%E9%9B%BB%E6%A9%9F-i.2305548.73316735) 步進馬達 ## 28byj48步進馬達以及ULN2003 https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/ * 410 橡皮輪子 這個是「雙D頭」確定可以連接步進馬達嗎? 應該可以 ![](https://hackmd.io/_uploads/BJq4tcOE3.png) https://shopee.tw/product/405745673/13252436802?gclid=CjwKCAjw3ueiBhBmEiwA4BhspAdbg-cu33HN6mc_yFr0yvDzhZxDeI42LfXp92V6Eaug2AMrGv7TTBoC6uMQAvD_BwE * 五公分的輪子 * 5908 for 28byj-48 * 直徑6公分 * ![截圖 2024-08-19 下午12.43.32](https://hackmd.io/_uploads/ryvYarxsC.png) * - [ULN2003 IC](https://shopee.tw/%E3%80%90UCI%E9%9B%BB%E5%AD%90%E3%80%91(C-4-8)-ULN2003A-2003-ULN2003-i.2305548.31837617) ## 韌體 https://github.com/aspro648/OSTR/tree/master/V2/firmware/TurtleV2.2%20ItsyBitsyM4%20CircuitPythonV6 ## 想像圖 ![](https://hackmd.io/_uploads/B1alNjd4n.png) 注意輪子高度與馬達高度 原設計因為是把電池放在底板下方 所以輪子訂製(猜測) ## 關於這個想像圖幾個設計想法說明 ![](https://hackmd.io/_uploads/B1N7lzq4n.png) * 所有零件都是現成件。 * 機體採立體列印。 * 筆放在輪軸軸心,這樣轉彎才能在一點。 * 電池放在下方,讓下筆有重量。 * 電路板集中在萬向輪與兩個動輪形成的三角範圍,將重量盡量集中在三角範圍中間,避免海龜急停時傾倒。 * 抓筆的機制採下筆用橡皮筋牽引,抬筆時用馬達搖臂抬升(或者顛倒)。 * 用四色原子筆。 ## 開發紀錄 ### 單晶片版的海龜程式庫 修改自 https://github.com/russhughes/turtleplotbot3 中的turtleplotbot.py, turtleplot.py 這個程式庫的作者Russ Hughes 修改自原 始python 中的 turtle.py 原始的 turtle.py 作者是 Gregor Lingl 原本是利用 tkinter 程式庫作為繪圖核心 RH 把 turtle.py 做修改後 再把其中_turn, _move, _pen, _done 四個副程式串接到單晶片的行為 這樣就可以實現原本只能在電腦螢幕移動的海龜 變成在現實世界驅動單晶片來移動 使用的時候只要把turtleplotbot.py, turtleplot.py 放在micropython 的lib 資料夾中 這樣主程式就可以像在電腦上寫turtle一樣寫單晶片的turtle 我把這組程式修改成可在 rp2040 運作,並且驅動步進馬達用來移動與伺服馬達用來拿筆。 ### 20230528實驗結果 使用 4 顆 AA 電池驅動,四顆 AA 產生 6V 電壓,會超過 pico 的 5.5V 上限,我用 1N4001 串在電池與 VBUS 之間,這樣可以讓 1N4001 壓降 1V 左右,再利用 pico 內部的 MBR120 蕭特基二極體再降一些,最後 VSYS 量到電壓不到 5V,不至於造成傷害。 只有實現移動,還沒有實現抓筆。 還沒有校正。 兩個輪子胎紋不一樣。 最重要的:這種輪胎與步進馬達的軸,雖然都是雙 D,但是軸的平面差0.2mm,圓弧面差 0.1mm。我在想是否可以找到薄金屬片做鈑金件,套在馬達軸上。 課程規劃: * 繪圖 * 迷宮或是障礙挑戰賽 繪圖原理 迪卡兒座標 指令 goto 這指令會越寫越歪,無法回到原點。 經典範例 碎形圖案 謝爾冰濕機三角 不做無線傳輸上傳程式碼的理由 希望學員能用有線上傳程式碼,然後帶著自己的海龜到紙上繪圖。 輪子直徑 65 mm ### 20230705 新骨架 https://www.tinkercad.com/things/1U5chW7X9Hq 進一步縮小體積。 組裝後測試,原輪胎兩顆不一樣,換成一樣的。 Hello圖案測試,整個往右上角飄。 推測是換了輪胎之後,左輪減少太多(校正機制是僅調整左輪,上一版本左輪步數有略為減少)。 ![](https://hackmd.io/_uploads/H1L_zo7F2.png) 經過組裝之後,修改設計。 https://www.tinkercad.com/things/1U5chW7X9Hq 1. 主控板使用迷你麵包板支撐,底下再設計一框架盛放麵包板, 2. 使用框架保留彈性,一方面避免與底板螺絲干涉,另一方面將來可安裝專用主控電路板 ![](https://hackmd.io/_uploads/SJn5GomKh.png) ![](https://hackmd.io/_uploads/B1ZeQomtn.png) ### [海龜點點名](https://www.facebook.com/SimpleinfoDesign/posts/pfbid025uuWLMXuZREguza7xtVdj9FnaM54uKrnLXfzbKtLhthGNEo9A8SncknQbMCYq1oLl?locale=zh_TW) ### 202030730工作坊@COSCUP https://hackmd.io/iUad1x4TQI6JMnYFvtrF5Q ### 歷史資料 在網上找到一個網站介紹海龜機器人歷史 https://cyberneticzoo.com/cyberneticanimals/1969-the-logo-turtle-seymour-papert-marvin-minsky-et-al-american/ 這一篇文章敘述了海龜繪圖機器人的歷史 並有許多豐富有趣的照片 內容有點雜,看不太懂,大致上是從Logo語言開始介紹 Logo語言是由 Wally Feurzeig, Seymour Papert, and Cynthia Solomon.等人開發的電腦程式語言,目的是讓學生可以在螢幕或是實體世界(透過海龜機器人)以指令方式控制繪圖游標移動並繪圖 Papert提出一種名為"body-syntonic reasoning"的概念,即是讓學生想像自己是螢幕上那隻海龜,並且理解、預測與推理海龜的下一步行動 但是後來好像扯到商業化的事情!? Logo語言後來衍生出許多變體,甚至在python的標準程式庫中,雖然已經跟Logo無關,但也可以看到海龜畫圖的程式庫 彭大海的程式小車 #OTTR 鄭鴻旗 #海龜繪圖 然後以下是我用google bard幫我整理的重點:(原網頁內容太長,要分段問) 好的,以下是剛剛我幫你翻譯的所有內容的總結: 1960 年代,麻省理工學院的 Seymour Papert 發明了 LOGO 程式語言,並與他的學生 Cynthia Solomon 一起開發了 LOGO 海龜。LOGO 海龜是一款可以用來教導孩子編程和數學的機器人。 LOGO 海龜受到了廣泛的歡迎,並被用於世界各地的學校。LOGO 海龜被認為是一種有效的教育工具,可以幫助孩子們學習編程、數學和問題解決技能。 LOGO 海龜仍然在使用,並被用於教育孩子們關於編程、數學和 STEM 的基礎知識。 希望這對你有幫助!如果您有任何其他問題,請告訴我。 這部分資料銜接一開始提到的威廉華特,LOGO團隊也有提到他們的機器人部分是被威廉華特所啟發的 ### 大海用tinkercad設計的海龜2D設計圖(驗證中) ![](https://hackmd.io/_uploads/Sk0JsZDhh.png) ![](https://hackmd.io/_uploads/SJCxobDhh.png) ![](https://hackmd.io/_uploads/BkeYsWwn2.jpg) ## 馬達的不同驅動IC價格比較分析 傳統28BYJ48以及ULN2003一組賣NT$27 其中馬達20控制板7 27*2組=54 而ULN2803就只要10元就有兩組驅動器 20+20+10=50 ## 步進馬達ULN2003驅動板連接器參數 https://electronics.stackexchange.com/questions/157799/what-is-the-name-type-of-the-connector-on-the-28byj-48-stepper-motors ## tinkercad模型已更換新版電路主板 ![image](https://hackmd.io/_uploads/BJll00oCUa.png) https://www.tinkercad.com/things/jAyTOp9Ajw1-openlab-taipei-turtle-robot-v3?sharecode=eqZg6aS7ZQwoI9bQfJjok3lkpl9sjtMXwCW4UiY1J5c ![image](https://hackmd.io/_uploads/B1iEVjCLa.png)

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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