CNCãã³ãããã¿ã¼ã®ä½æããã®1
å½ããã°ãè¦ã¦ããã ãããããã¨ããããã¾ãã
ç§ã¯ç¾å¨ãç系大å¦ã«éã£ã¦ããã®ã§ãããæã£ã¦ãã以ä¸ã«èª²é¡ãå¤ãã¦æ¯æ¥è¾ãã§ã...ï¼åå®ï¼
ä¸ã§ãç¹ã«å¤§å¤ãªã®ãããããããææ¸ãã¬ãã¼ããªãã§ãã
å¤ãã®ç系大å¦ã«ã¯ãï¼åå¦ã»ç©çï¼å®é¨ãã¨ããææ¥ãåå¨ãã¦ãããå®é¨ãçµãã£ãä¸é±éå¾ã¾ã§ã«ãã®å®é¨ã«ã¤ãã¦ã®ã¬ãã¼ããæ¸ãå¿ è¦ãããã®ã§ãã
ãã®ã¬ãã¼ãã®å¤§å¤ãã¯å®é¨ã«ãã£ã¦æ§ã ãªã®ã§ããã大å¤ãªãã®ã«ãªãã¨1é±éã§ã¬ãã¼ã30æãæ¸ããªãã¦ã¯ãªããªãå ´åãããã¾ãã
ããã¦ãªãã¨ããã大å¦ãæå±å¦ç§ã«ãã£ã¦ã¯ãã®è¨å¤§ãªéã®ã¬ãã¼ãããå ¨ã¦ææ¸ããã§æ¸ããªããã°ãããªãã¨ããæå®ããã£ãããã¾ãï¼(æ¶)
Twitterã§ãææ¸ãã¬ãã¼ããã§æ¤ç´¢ããã¨ããã®ææ¸ãã¬ãã¼ãã¸ã®ä¸æºãå±±ã®ããã«åºã¦ãã¾ãã
ææ¸ãã¬ãã¼ãã¯é æªããããä»ããå»æ¢ããã¹ã
— çç§å¤§ã®æ²³åã«ã¨ã (@Engineetori) August 16, 2019
ã©ããã¦ä»ã®æ代ã«ææ¸ãã¬ãã¼ããªãã¦ããããã ææã«é ¼ã£ã¦ãææ......
— æ´ (@olt_Lindel) August 15, 2019
ãããããã¿ãªãããææ¸ãã¬ãã¼ãã«è¦ãã¾ãã¦ãã¾ããã
ããããããã®ãå®é¨ãã¨ããææ¥ã¯ãç 究室ã«å ¥ã£ã¦å¦ä¼ã«è«æãæåºããããã®ç·´ç¿ã§ãããã¯ããªãã§ãããä¸ä½èª°ããã®æ代ã«è«æãææ¸ãã§åºããã§ãããããTexã¨ãã®ä½¿ãæ¹ã®è¬ç¾©ãããæ¹ããã£ã½ã©ææ義ã§ããã¨æãã¾ãã...ã
ããã§ããã
ãææ¸ãã¬ãã¼ããªãã¦æ©æ¢°ã«ããããã°ãããã ï¼ï¼ã
...ã¨ããçºæ³ã«è³ãã¾ãã¦ãå®éã«ä½ã£ã¦ã¿ããã¨ã«ãã¾ããã
1. æºå
ãã¦ãã¾ãã¯ææã®æºåã§ãã幸ããCNCãã©ã¤ã¹ãèªä½ããè¨äºã¯ä»¥åã«èªãã ãã¨ããã£ãã®ã§ããããåèã«ãç§æã¨Amazonã¨Aliexpressã§ææã調éãã¾ããã
ææ
- Arduino Uno R3
- CNCã·ã¼ã«ã V3.0
- A4988ï¼ã¹ãããã³ã°ã¢ã¼ã¿ã¼ãã©ã¤ãï¼with ãã¼ãã·ã³ã¯ãããããï¼ã¤
- NEMA17 ï¼ã¹ãããã³ã°ã¢ã¼ã¿ã¼ï¼ï¼ã¤ (X軸ã»Y軸ç¨)
SG92RSG90ï¼ãµã¼ãã¢ã¼ã¿ã¼ï¼ï¼ãã³ãä¸ä¸ã«åããç¨ï¼12Vã®å®å®åé»æºWiiã®ACã¢ããã¿(12V-3A)ã§ä»£ç¨- ã¿ã¤ãã³ã°ãã«ã 5m ï¼ã¤
- ã¿ã¤ãã³ã°ãã«ããã¼ãªã¼ã4ã¤
- ãªãã¢ã·ã£ãã軸ã4æ¬(ç´å¾8mmã»é·ã300mmã2æ¬ï¼ç´å¾8mmã»é·ã400mmã2æ¬)
- ãªãã¢ããã·ã¥(å å¾8mm)ã8ã¤
- 3Dããªã³ã¿ã¼ã§ä½ã£ãåãã¼ã
- MDFæ
使ç¨ããã½ããã¦ã§ã¢
grbl v1.1ãgrbl-servo(grbl v0.9j)ãã¨ãããgrblããµã¼ãã¢ã¼ã¿ã¼ã«å¯¾å¿ããããã¼ã¸ã§ã³ããã£ãã®ã§ãã¡ãã使ç¨ãArduinoã«æ¸ãè¾¼ããï¼ãµã¼ãã¢ã¼ã¿ã¼ã®PWMå¶å¾¡ãå¯è½ãª61.5Hzãåºããããã«ãªã£ãï¼- bCNC (grbl(arduino)ã«G-codeãéãããã®ã½ããã¦ã§ã¢)
- Inkscape (SVGãG-codeã«å¤æããããã«ä½¿ç¨)
â»MI Inkscape Extensionã¨ããæ¡å¼µæ©è½ãå¿ è¦ã
使ç¨ããéå ·
- PCï¼Macï¼
- ãã¹ã¿ã¼
- ãªã·ãã¹ã³ã¼ãï¼å¿ é ã§ã¯ãªãï¼
- å°åã®ãã¤ãã¹ãã©ã¤ãã¼
2. é¨åãå±ããã®ã§è£½ä½éå§ï¼
Amazonã§é ¼ãã é¨åãå±ãã¾ãããï¼ä»åAmazonã§è³¼å ¥ããé¨åã¯ä»¥ä¸ã®ï¼ã¤ã§ãã
ä¸èº«ã¯ãã£ããã¨æã£ã¦ãã¾ãããããã§æ©éã¢ã¼ã¿ã¼ã®å¶å¾¡ãè¡ãã¾ãã(i) Arduinoã«grblãæ¸ãè¾¼ã
ã¯ããã«ãArduinoã«ãgrblãã¨ãããã¡ã¼ã ã¦ã§ã¢ãæ¸ãè¾¼ãã§ããã¾ãã
â»Arduino IDEã¯ã¤ã³ã¹ãã¼ã«ããã¦ããåæã§ãã
â»Macã使ç¨ãã¦ããã®ã§ãWindowsã§ã¯ä¸æããããªãå ´åãããããããã¾ãã
ãgrbl-servo(grbl v0.9j)ãã«ã¢ã¯ã»ã¹ããç»é¢å³ã®ç·è²ã®ãã¿ã³ãClone or downloadããæ¼ãã¦ãDownload ZIPããé¸æããèªåã®PCã«ãã¡ã¼ã ã¦ã§ã¢ããã¦ã³ãã¼ããã¾ãããã®ZIPãã¡ã¤ã«ã¯è§£åãã¦ããã¾ãã
次ã«Arduino IDEãç«ã¡ä¸ãã¦ãã¡ãã¥ã¼ãã¼ã®ãã¹ã±ãã/ã©ã¤ãã©ãªãã¤ã³ã¯ã«ã¼ã/.ZIPå½¢å¼ã®ã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ããæ¼ãã¦ãå
ã»ã©è§£åãããã©ã«ããããgrbl-servo-master/grblãã¨ãããã©ã«ããé¸æãã¾ããããã¦ãã¡ãã¥ã¼ãã¼ã®ããã¡ã¤ã«/ã¹ã±ããä¾/grbl/grblUploadããæ¼ãã¾ããããã¨ã次ã®ãããªã³ã¼ãã表示ãããã¨æãã¾ãã
ããããããArduinoã¨PCãæ¥ç¶ãã¦ãArduino IDEã®ç»é¢å·¦ä¸ã®ç¢å°ãã¿ã³ãæ¼ãã¦ãArduinoã«grblãæ¸ãè¾¼ã¿ã¾ãã
ããã§ããã¡ã¼ã ã¦ã§ã¢ã®æ¸ãè¾¼ã¿ã«é¢ãã¦ã¯çµäºã§ãã
(ii) CNCã·ã¼ã«ãçãçµã¿ç«ã¦ã
次ã«ããArduinoããCNCã·ã¼ã«ãV3.0ããA4988ããããããç¹ãåããã¦ãããã«ãX軸ç¨ã®ã¹ãããã³ã°ã¢ã¼ã¿ã¼ã®æ¥ç¶ã¨ããµã¼ãã¢ã¼ã¿ã¼ã«æ¥ç¶ããããã®3ç·ã®é
ç·ã¾ã§è¡ãã¾ãã
â»ããã§ã¯ã¾ã Y軸ç¨ã®ãã©ã¤ãã¨ã¹ãããã³ã°ã¢ã¼ã¿ã¼ã¯æ¥ç¶ãã¦ãã¾ããããæ¥ç¶ãã¦ãåé¡ããã¾ãã
ä¸ã®åçã®ããã«CNCã·ã¼ã«ãã¨ã¢ã¼ã¿ã¼ãã©ã¤ããã¯ãè¾¼ãã§ãé
ç·ãè¡ãã°çµäºãªã®ã§ããã1ã¤ãã¤èª¬æãã¦ããã¾ãã
ã¾ããCNCã·ã¼ã«ãã«ã¤ãã¦ã§ãããArduinoã¨ä¸ã®åçã®ãããªåãã§å·®ãè¾¼ã¿ã¾ãï¼ä¸ããè¦ãã¨ãArduinoæ¬ä½ã¨åé
ãéãªãã¨æãã¾ãï¼ããã®ã·ã¼ã«ãã«ã¯è¦ã¦ãããéãã4ã¤ã®ã¢ã¼ã¿ã¼ãã©ã¤ããå·®ãè¾¼ããããã«ãªã£ã¦ãããããè¦ãã¨åºç¤ã«ãXã»Yã»Zã»Aãã¨æ¸ãã¦ããã®ããããã¾ããä»åã¯ãã³ãããã¿ã¼ãªã®ã§ããXã»Yãã®ï¼ã¤ãã使ãã¾ãããï¼ãZã»Aãã¯3Dããªã³ã¿ã¼ãä½ãã¨ããªã©ã«ä½¿ãã¾ãï¼
次ã«ãã¢ã¼ã¿ã¼ãã©ã¤ããA4988ããã·ã¼ã«ãã«å·®ãè¾¼ã¿ã¾ãããããã§åããééããã¨ãããããã³ã³ãã³ãµã¼ãããããã®ã§æ³¨æãã¾ãããããã¼ãã·ã³ã¯ãã¤ããã»ããå®å¿ã§ãã
ããã¦ãã¢ã¼ã¿ã¼ãã©ã¤ãã®æ¨ªã«æ¥ç¶ããã¦ãã4æ¬ã®ç·ãã¹ãããã³ã°ã¢ã¼ã¿ã¼ã®ç·ã§ããããã§ãæ¥ç¶ããåããæ°ã«ãã人ãããããããã¾ããããéåãã«æ¿ãã¦ãå転æ¹åãéåãã«ãªãã ããªã®ã§åé¡ããã¾ããã
çç±ã¨ãã¦ã¯ãã¢ã¼ã¿ã¼ãã©ã¤ãã®è£ãè¦ã¦ã¿ãã¨ã4ç·ã¨ç¹ããé¨åã¯ä¸ãããBã»Aã»Aã»Bãã¨å¯¾ç§°çã«ãªã£ã¦ãããã¨ããããã¨æãã¾ããAã¨AãBã¨Bãç¹ãã£ã¦ããªãã¨ãããªãã®ã§ããããã®å ´åãéåãã«å·®ãè¾¼ãã§ãé»æµã®åããå¤ããã ãã§ãAã¨AãBã¨Bã®æ¥ç¶ã«å¤åã¯ããã¾ããããããã£ã¦ãã¹ãããã³ã°ã¢ã¼ã¿ã¼ã®4ç·ãéåãã«æ¿ãã¦ãåé¡ããã¾ããã
æå¾ã«ãã³ãåããããã®ãµã¼ãã¢ã¼ã¿ã¼ã®æ¥ç¶ã§ãããæ¬æ¥ãã®CNCã·ã¼ã«ãV3.0ã¯ãgrbl v0.8ãæ³å®ãã¦ä½ããã¦ãããããã¹ãã³ãã«(主軸)ã®ã¹ã¤ããã®ONã»OFFããå¶å¾¡ã§ããªãä»æ§ã«ãªã£ã¦ãã¾ãï¼æ¬æ¥ã¯CNCãã©ã¤ã¹ã3Dããªã³ã¿ã¼ã§ä½¿ç¨ããç®çã§ä½ããããããONã»OFFã®å¶å¾¡ã ãã§äºè¶³ãã¦ããï¼ãä¸ã®åçã®ã·ã¼ã«ãåºç¤ã®å³ä¸å¤®ãããã®ãSpnEnãã¨ãããã³ã§ONã»OFFãè¡ãã¾ããï¼grbl v0.8ã®å ´åã®è©±ï¼
ããããä»åã¯ãã¡ã¼ã ã¦ã§ã¢ã¨ãã¦å ¥ããgrbl v0.9ã§ã¯ãã¹ãã³ãã«ã®PWMã«ããå¶å¾¡ãå¯è½ã¨ãªã£ã¦ããããããå©ç¨ãã¦ããµã¼ãã¢ã¼ã¿ãåããã¾ããããã§ãgrbl v0.9ãCNCã·ã¼ã«ãV3.0ã§ä½¿ããã¨ããã¨ãã³é ç½®ã«æ³¨æããªããã°ããã¾ãããä¸ã®å³ã¯v0.8ã¨v0.9ã®éãã示ããå³ã§ãã
å³ãè¦ãã¨ã以ä¸ã®è¡¨ã®éãã«ä»æ§ãå¤ãã£ã¦ãããã¨ããããã¾ãã
D11 | D12 | |
---|---|---|
grbl v0.8 | Z軸ã®ãªãããç¨ | ã¹ãã³ãã«ONã»OFFç¨ |
grbl v0.9 | ã¹ãã³ãã«ã®PWMå¶å¾¡ç¨ | Z軸ã®ãªãããç¨ |
ãããã®äºæ ã¨åè·¯å³ãç §ããåãããçµæãCNCã·ã¼ã«ãããPWMã®ä¿¡å·ããããããã«ã¯ãZ+ã®2ã¤ã®ãã³ã®ã©ã¡ãããã«ãä¿¡å·ç·ãæ¥ç¶ããã°ããã¨ãããã¨ããããã¾ãã
ããã§ãCNCã·ã¼ã«ãã®çµã¿ç«ã¦ã»é
ç·çã¯çµäºã§ãã
â»ãã¡ãããæçµçã«ã¯Y軸ç¨ã®ã¢ã¼ã¿ã¼ãã©ã¤ãã¨ã¹ãããã³ã°ã¢ã¼ã¿ã¼ãX軸ã®æã¨åãããã«æ¥ç¶ããå¿
è¦ãããã¾ã
(iii) bCNCã®ã¤ã³ã¹ãã¼ã«
ãã¦ãããããã¯ãArduino(grbl)ã«X軸ã»Y軸ã»ãµã¼ãã®å¶å¾¡å½ä»¤ãã¼ã¿ãéãããã®ã½ããã¦ã¨ã¢ãPCã«ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã ãã®ãããªã½ããã¦ã§ã¢ã¯ããããããã¾ãã(Universal-G-Code-Senderï¼Grbl Controlerãªã©)ãä»å㯠bCNCã¨ããã½ããã¦ã§ã¢ã使ç¨ãã¾ãã
ã¾ãã¯ãããããbCNCãããã¦ã³ãã¼ããã¦è§£åãã¦ããã¾ãã
ãã®ã½ããã¯Python2.7ã§ã®ã¿æ£å¸¸ã«åãã®ã§ãã¾ãã¯Python2.7ãã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã¾ãã
ç§ã¯bCNCã®ãããã£ã¬ã¯ããªã§ã®ã¿Python2.7ãåããããã£ãã®ã§ãpyenvã使ãã¾ããã ã¾ããpythonã§ã·ãªã¢ã«éä¿¡ãè¡ãããã®ãpyserialãã¨ããã¢ã¸ã¥ã¼ã«ãã¤ã³ã¹ãã¼ã«ãã¾ãã
(1) pyenvã®ã¤ã³ã¹ãã¼ã«
ãã®è¨äºããã¤ã³ã¹ãã¼ã«ãã¦ãã ããã qiita.com
(2) python2.7.16ã®ã¤ã³ã¹ãã¼ã«ã¨ãã¼ã¸ã§ã³ã®åãæ¿ã
$ pyenv install --listã //ã¤ã³ã¹ãã¼ã«ã§ããPythonã®ãã¼ã¸ã§ã³ã®ä¸è¦§ã表示ããã //2.7.xã®ä¸ã§ã¯2.7.16ãææ°ã§ããã¨æãã®ã§ããããã¤ã³ã¹ãã¼ã«ãã $ pyenv install 2.7.16 //次ã«ããã¦ã³ãã¼ãããbCNCã®ãã©ã«ãã¾ã§ç§»åãã¾ãã $ cd ~/Desktop/bCNC-master/ //Pythonã®ãã¼ã¸ã§ã³ããã®ãã£ã¬ã¯ããªã®ä¸ã ã2.7.16ã«å¤ãã¾ãã $ pyenv local 2.7.16 //ãã¼ã¸ã§ã³ãåãæ¿ãã£ã¦ãããç¢ºèª $ python --version Python 2.7.16 //ãã®ããã«è¡¨ç¤ºãããã°OKã§ãã
(3) pyserialã®ã¤ã³ã¹ãã¼ã«
(2)ã®ç¶ãã§ãã
$ pip install pyserial $ python -c "import serial" //ããã§ä½ã表示ãããªããã°ãpyserialã®ã¤ã³ã¹ãã¼ã«å®äºã
ãã¦ãã¿ã¼ããã«ããæ»ãããbCNC-master/bCNC/ãã®ä¸ã«ããå®è¡ãã¡ã¤ã«ãbCNCããããã«ã¯ãªãã¯ã§å®è¡ãã¾ãã
ããã¨ãã®ãããªç»é¢ã表示ãããã¨æãã¾ãã
ããã§ãbCNCã®ã¤ã³ã¹ãã¼ã«ã¯çµäºã§ãã
ãã¨ã¯ããã®bCNCã«.gcodeã¨ããæ¡å¼µåã®ãã¡ã¤ã«ãèªã¿è¾¼ã¾ãã¦ãArduinoã«éä¿¡ããã ãã§ãã
è¨äºãé·ããªã£ã¦ããã®ã§ã次åã¯SVGãã¡ã¤ã«ããGcodeãçæãã¦ãbCNCã«èªã¿è¾¼ã¾ãã¦ãgrblã«éã£ã¦ãã¢ã¼ã¿ã¼ãå¶å¾¡ããã¨ãããæ¸ãããã¨æãã¾ãã
ãã¾ã : G-Codeã®èª¬æ
å ã»ã©ããã¡ããã¡ããåºã¦ãããG-Codeãã¨ã¯ä½ãï¼
ãG-Codeãã¨ã¯ãCNCãã·ã³ã®ä¸»è»¸ã®åº§æ¨ãåããæå®ããã主ã«ãGãããããå§ã¾ãã³ãã³ããåè¨ããããã¼ã¿ã®ãã¨ã§ããç§ãæ¸ããä¸ã®G-codeã®ãµã³ãã«ãè¦ãã¨ããããããã¨æãã¾ãã
ä¾ãã°ãä¸ã®ãããªåè§ã¨ä¸è§ããã³ãããã¿ã¼ã«æç»ãã¦ã»ããå ´åã¯ãä¸è¨ã®ãããªG-Codeãéãã¾ããã³ã¼ãã¯ä¸ããé ã«ä¸è¡ãã¤èªã¾ãã¦ãã£ã¦ãæå¾ã®M02ã³ãã³ããèªã¿è¾¼ã¾ããã¨çµäºãã¾ããï¼â»çµäºã³ãã³ãã¯è¤æ°åå¨ããï¼
ãã®ãµã³ãã«ã«åºã¦ããã³ãã³ãã«ã¤ãã¦è§£èª¬ãã¾ãã
ã³ãã³ã | 説æ |
---|---|
G90 | ãã¢ãã½ãªã¥ã¼ãå½ä»¤ãã¨å¼ã°ãã絶対座æ¨ã«ãã£ã¦å¶å¾¡ãã¾ãããã¨ãããã¨ãä¼ãã |
G01 | ãç´ç·è£å®ãã®åä½ãæ示ããå½ä»¤ãä»ããä½ç½®ããG01ã®å¾ã«ç¶ã座æ¨ã¾ã§ç´ç·ç§»åããã |
M03 | 主軸ãæ£è»¢(軸ãä¸ããè¦ãå ´åã®æè¨åã)ãããããã®å½ä»¤ãç¶ãã¦ãSãããã¨å転æ°ãæå®ããå¿ è¦ããããããã®å ´åã®å転æ°ã¯ç°å¢ã«ä¾åãã(ä¾ãã°ãä»åä»æ§ããgrblã§ã¯ãS0ã255ã§ãµã¼ãã¢ã¼ã¿ã¼ã®å転è§0ã180度ãå¶å¾¡ã§ããããã«ãªã£ã¦ããï¼å³å¯ã«ã¯ããã¯ãMã³ã¼ããã¨å¼ã°ãããã®ããããGã³ã¼ãã¨ãã¦å æ¬ããããã¨ãå¤ãããã³ãããã¿ã¼ã§ã¯ãã®ã³ãã³ãã§ãã³ãä¸ãã |
M05 | 主軸ã®å転ãæ¢ããï¼å ã«æ»ãï¼ããã³ãããã¿ã¼ã§ã¯ãã®ã³ãã³ãã§ãã³ãããã |
ãã³ãããã¿ã¼ã®ä½æã§ã¯ãæä½ã§ãä¸è¨ã®ãG01ï¼M03ï¼M05ãã¨ããã³ãã³ãã ãç¥ã£ã¦ããã°ããã¨æãã¾ããèªåã§æ¸ããã¨ããªãã§ããã ãã¦ãããã§ãµã¨ããããªçåãæã£ã人ãããããããã¾ããã
è¤éãªæ²ç·ã¯ã©ããã£ã¦å½ä»¤ãããã ããï¼
ã¨ãçãã¯ç°¡åã§ã
æ²ç·ãè¤æ°ã®çãç´ç·ã®éåã¨ã¿ãªãã¦ãG01ã³ãã³ãã大éã«éããã¨ã§å¶å¾¡ãã¾ãã
å®éã«ãæ²ç·ãå¤ãå³å½¢ããçæãããG-Codeã®ä¸èº«ãã®ããã¦ã¿ãã¨ããã®ã»ã¨ãã©ãG01ã³ãã³ãã§ãããã¨ããããã¨æãã¾ãã