ãä»åã¯Arduino UNOã«ã€ããŠã話ããŸãã
å
·äœçã«ã¯ã2023幎ã«ç»å ŽããArduino UNO R4ã«é¢ãããã®ã§ãã
ãArduino UNO R4ã¯ãArduino UNO R3ãšã¯æ確ã«åºå¥ããããŸãã
Arduino UNO ãŸã§ã¯ååãäžç·ãªã®ã§ããã
Arduino UNO R4ã¯ãArduino UNO R3ã®åŸç¶æ©ã§ãã
Rã¯ãªããžã§ã³ã®Rã§ãç°¡åã«èšããšããªããžã§ã³3âãªããžã§ã³4ã«
ã¢ãã«ãã§ã³ãžãè¡ãããããšããããšã§ãã
ãArduino UNO R3ã¯ãæ¥æ¬ã§ã®åãæ±ãã¯
2012幎é ãšãªã£ãŠããããã10幎ã¶ãã®ã¢ãã«ãã§ã³ãžãšããããšã«ãªããŸãã
é·ããArduinoãšèšãã°ãArduinoUNOã
Arduinoã®çŸè¡ã¢ãã«ãšèšãã°ãArduinoUNO R3ãšããããšã§ã
çŽ10幎ã»ã©Arduinoã®é¡ãšããŠåèšããŠããããã§ãã
ããããªArduino UNOã®ã¢ãã«ãã§ã³ãžã§å€§ããå€ãã£ããšããã3ã€çŽ¹ä»ããŸãã
ãã ããArduino UNO R4ã«ã¯æ©èœæå°éã®Minimaãšã
ç¡ç·æ©èœãšLEDãè¡šé¢å®è£
ãããŠããWiFiã®2ã¢ãã«ããããŸããã
ã©ã¡ããå
±éã§å€æŽã«ãªã£ãŠããå
容ãšããŸãã
â»çŽ°ããå€æŽã§æ°ã«ãªã£ããšããã2ã€ã»ã©çŽ¹ä»ããŸãã
Arduino UNO R3âR4ã®å€ãã£ããšãããå·®ããç解ã§ããã
Youtubeãã£ã³ãã«ã«ããŸããŸãªåç»ãäžããŠããŸãã
âââãã¡ãããYoutubeãã£ã³ãã«ã«ã¢ã¯ã»ã¹!! âââ
æ¬ããã°ã¯ã¢ãã£ãªãšã€ããçšããåºåãæ²èŒããŠããŸãã
- Arduino UNO R3âR4ã§å€ãã£ã3ã€ã®å€æŽç¹
- Arduino UNO R4ã®æ°ã«ãªã现ããå€æŽç¹2ã€
- ä»åã®ãŸãšãïŒR3âR4ã®åãæ¿ãã¯é»æµå€ã ã泚æãä»ã¯OK
Arduino UNO R3âR4ã§å€ãã£ã3ã€ã®å€æŽç¹
ãããã§ã¯æ©éArduino UNO R3ããR4ã«ãªã£ãŠå€ãã£ããšããïŒå€æŽç¹ïŒã«ã€ããŠã
3ã€ã玹ä»ããŸãããã®3ã€ããã¡ãã§ãã
ããããã詳ãã解説ããŠããŸããã
3ã€ç®ã®åãã³ãåºããé»æµå€ã®æžå°ãšãããšããã ãå¯äžã®ãã€ãã¹ãã€ã³ãã ãšæã£ãŠããŸãã
ãæ§èœUPãã¡ã€ã³ã®ãã€ã³ã³ãAtmelâRenesasã«å€æŽ
ãããã¯ã以åArduino UNO R4ãçºå£²éå§ã«ãªãåã«
èšäºã«ããå
容ã§ãã®ã§ãã芧ã«ãªã£ãæ¹ããããããããŸããã
ãå
容ãšããŠã¯ãããã解説ããå
容ãšè¢«ãéšåãå€ãã®ã§ã
åèçšåºŠã«èŒããŠãããŸãã
ãããŠããã€ã³ã³ãAtmelããRenesas補ã«å€æŽã«ãªããŸãããã
å®ã¯Arduinoã¯ç°¡åãªããã°ã©ã ãããå Žåã»ãšãã©æ°ã«ããå¿
èŠããããŸããã
ãäŸãã°ãArduinoã«ã¯ON/OFFå¶åŸ¡ãå¯èœãªãã³ãããã€ããããŸããã
ãã®ãã³çªå·ãæå®ããŠON/OFFããã³ãã³ãã¯Arduino UNO R3ã§ãR4ã§ãåããªãã§ãã
ãå
·äœçã«ã¯ãdigitalWrite(13,HIGH);ãšããã³ãã³ãããããŸãã
ããã¯ãON/OFFå¶åŸ¡å¯èœãª13çªãã³ãHIGHãã€ãŸããDC5Vãæµãããšããã³ãã³ãã§ãã
ãã®ã³ãã³ããArduino UNO R3ã§ãR4ã§ããArduino MEGAã§ãArduino Nano Everyã§ã
å
šéšå
±éã«ãªã£ãŠããŸãã
ãæèŒãããŠãããã€ã³ã³ãç°ãªã£ãŠããåãã³ãã³ãã§åãããã«
å
éšçã«å·¥å€«ãããŠãããã§ããåå¿è
ã«ã¯ããããã§ãããïŒ
ãã§ã¯ã䜿ãã³ãã³ããäžç·ã§ãã§ããããšãäžç·ãªãã
ãã©ããªãã€ã³ã³ã§ããããããªããïŒããšæããããããããŸããã
ãå®ã¯ãã€ã³ã³ãå€ãããšãäŸãã°æžã蟌ããããã°ã©ã ã®éãå€ãã£ããã
åäœåšæ³¢æ°ãšèšã£ãŠãããã°ã©ã 1è¡ããšãåŠçããé床ãšãããã®ãããã®ã§ããã
ããããã€ã³ã³ã«ãã£ãŠå€ãã£ããããŸãã
ãã§ããããåãã³ã®ON/OFFããã¹ãããã¢ããããŠããããšæã£ãå Žåã«
æ°ã«ãªããã€ã³ãã ããšããããšã§ãã
R4ã§Renesasã«å€ãã£ãŠãå ·äœçã«äœãã©ããããå€ããã®ãïŒ
ãããã§ã¯ãã€ã³ã³ãå€ãã£ãããšã§äœãã©ããããå€ãã£ãã®ãè¡šã«ããŠã¿ãŸããã
Arduino UNO R3â | R4 | |
---|---|---|
ãã€ã³ã³ã¡ãŒã«ãŒ | Atmel(MicroChip) | Renesas |
ãã€ã³ã³ã®åçª | ATMega328P | Coretex-M4 |
åäœåšæ³¢æ° | 16MHz | 48MHz |
ãã©ãã·ã¥ã¡ã¢ãª | 32Kbyte | 256Kbyte |
SRAM | 2Kbyte | 32Kbyte |
EEPROM | 1Kbyte | 8Kbyte |
ããžã¿ã«ãã³ã®æ° | 14å | 14å |
åãã³ã®èš±å®¹åºåé»æµ | 20mA | 8mA |
ã¢ããã°å ¥åãã³ã®æ° | 6åïŒ10bit | 6åïŒ14bit |
ã¢ããã°åºåãã³ã®æ° | 0å | 1åïŒ12bit |
OPã¢ã³ã | 0å | 1å |
CANéä¿¡ | 0å | 1å |
å€éšé»æºã®å¯Ÿå¿é»å§ | DC6~20V | DC6~24V |
å²ã蟌ã¿ãã³ã®æ° | 2å | 2å |
ãããããR3ãããR4ã®ã»ããæ§èœUPããŠã
ããã«ã¯æ°æ©èœãè¿œå ãããŠããããšãããããŸããã
ç¹ã«æ³šç®ããŠãããããã®ããOPã¢ã³ãããã¢ããã°åºåãè¿œå ããããšããã§ããã
ãä»ãŸã§PWMã§ç䌌çã«é»å§ãã³ã³ãããŒã«ããŠããããã§ããã
ã¢ããã°åºåãã§ããããã«ãªã£ãã®ã§ãæ¬ç©ã®ã¢ããã°å¶åŸ¡ãã§ããããã«ãªããŸããã
ãã®ãã¡PWMãšã¢ããã°åºåããªã·ãã§èŠãèšäºãäžããŠã¿ãŸãã
ã粟床åäžãã¢ããã°å ¥å(é»å§ç£èŠ)ã®èœåãåäž
ãArduinoã«ã¯ããã®ããã«ããããã®ãã³ãåºãŠããŸãããïŒ
ãããããã®ãã³ã«åœ¹å²ãããããã§ããã
ãªãã§ããå
¥åãšããŠäœ¿ãå Žåã«ã
é»å§ãæ°å€åã§ããAnalogãã³ãšåŒã°ãããã³ããããŸãã
ãAnalogãã³ã¯é»å§ãæ°å€åã§ãããšèª¬æããŸãããã
å
·äœçã«ã¯ãArduinoã¯DC5Vã®å
¥åãŸã§å¯èœã§ãããã
DC0V~DC5Vã®é»å§ãæ°å€åã§ãããšããããšã«ãªããŸãã
ããã ãæ°å€åã§ãããšèšã£ãŠãã
ã©ããããã®å解èœã(æ°åã1äžãã£ããé»å§ã¯ã©ããããäžããã®ã?)
ã«ã€ããŠãç¥ã£ãŠããå¿
èŠããããŸãã
ãåŸæ¥ã®Arduinoã§ã¯ããã®å解èœ10bitã§ããã
10bitã®å解èœãšã¯ã0or1ã§è¡šãã10æ¡ã®æ°ãšããããšã«ãªããŸãã
ãå
·äœçã«ã¯ã11 1111 1111~00 0000 0000ã®ç¯å²ãªã®ã§ã
10é²æ°ã«çŽããšã1023~0ãšããããšã§ã
DC0Vã0ã ãšãããšãDC5Vã¯1023ãšããããšã«ãªããŸãã
Arduino UNO R4ã§ã¯ã14bitã«æ¡åŒµ
ãã§ã¯ããããŸã§ã¯Arduino UNO R3ã«ä»£è¡šãããã
ããŸãŸã§ã®Arduinoã·ãªãŒãºã®å解èœã10bitã ã£ããšããããšã§ããã
Arduino UNO R4ã¯ãããã€ã«ãªã£ããïŒãšãããšã
ã10bitâ14bitã«ãªããŸããã
ã€ãŸãã11 1111 1111 1111~00 0000 0000 0000ã®ç¯å²ã§
DC0V~DC5Vãè¡šçŸããããšãã§ããããã«ãªããŸããã
14bitã®å Žåã¯ã10é²æ°ã§è¡šããšã16383~0ãŸã§ãšãªããŸãã
ã14bitã«æ¡åŒµãããããšã§ã16åçšåºŠã®å解èœUPãšãªãã
ãã现ããé»å§å€åãèªèã§ããããã«ãªããŸããã
ãé»æµå€DOWNãåãã³ãåºããé»æµå€ã®æžå°
ã3ã€ç®ã®å€§ããªå€æŽã¯ãåãã³ãåºããé»æµå€ãäžãã£ããšããã§ãã
ããšããšArduinoã®åãã³ããåºããé»æµå€ã¯ã20mAã40mAãšãã£ã
é»æµå€ã§ããããä»åã®Arduino UNO R4ã¯ãå®æ Œã§8mAãŸã§ããæµããŸããã
ãåèãŸã§ã«ä»ãŸã§ã®Arduinoã·ãªãŒãºã®æµããé»æµå€ãè¡šã«ããŠã¿ãŸããã
Arduinoã®çš®é¡ | 1ãã³ãããã§æµããé»æµå€[mA] |
---|---|
Arduino UNO R3 | 20mA |
Arduino UNO R4 | 8mA |
Arduino Leonardo | 40mA |
Arduino Nano Every | 20mA |
Arduino Micro | 20mA |
ãå®éArduino UNO R3ã¯20mAãŸã§æµããä»æ§ã§ãããã
åçŽã«R4ã¯åå以äžã®é»æµå€ããæµããªããšããããšã«ãªããŸãã
ãç¹ã«åé¡ãšãªãã®ããããŸãŸã§ArduinoåããšããŠã¢ãžã¥ãŒã«åããã
é»åéšåãã¡ããé»æµå€äžè¶³ã§æ£ããåããªããªãããšãèããããŸãã
ãå®éããããã®æå
ã«ããã¡ã«ãªã¬ãŒã¯ã
Arduino UNO R3ã§ã¯åé¡ãªãã¹ãããšåãæ¿ããŠãããã®ã«å¯Ÿãã
Arduino UNO R4ã§ã¯åãæ¿ãããããŠããããã®ã®ã
åãæ¿ãããå§ãŸãã®ãšããã§ãã£ã¿ãªã³ã°ã®ãããªãã®ãèµ·ãããŠããã®ã
é³ã§ããããŸãã
Arduino UNO R4ã®æ°ã«ãªã现ããå€æŽç¹2ã€
ãããããã¯çŽ°ããå€æŽç¹ãªã®ã§ããã£ãšçŽ¹ä»ããŸãã
ãã®å€æŽç¹ãšã¯æ¬¡ã®2ã€ã§ãã
察å¿ããå€éšé»æºã®é»å§ã®å¹ ãåºãã£ã
ãããã¯ãArduinoã USBæ¥ç¶ããã®ã§ã¯ãªãã
å€éšé»æºã§é§åãããå Žåã®è©±ã«ãªããŸãã
ãéåžžãã¹ã±ãã(ããã°ã©ã )ã¯USBã±ãŒãã«ãæ¿ããŠ
ããœã³ã³ãšç¹ãããšã«ãªããšæããŸãã
ããã ãã¹ã±ãããæžã蟌ã¿çµãã£ãããããšã¯é»æºãäŸçµŠããŠãããã ãã§ã
åæã«ã¹ã±ãããèªåã§åçããŠãããŸãã
ããããªãšããããããUSBã§æ¥ç¶ããå¿
èŠããªããã§ãã
å
·äœçã«ã¯ãããã®äžžç«¯åã«DCé»æºãå
¥ããŠãããã°OKã§ãã
ããã®æ©èœã¯Arduino UNO R3ãããåããåãã£ãŠããŸãããã
ä»åR4ã§å¯Ÿå¿ããé»å§ã®å¹
ãæ¡å€§ããŸãããã©ããããæ¡å€§ãããè¡šã«ããŠã¿ãŸããã
Arduino UNO | 察å¿é»å§ïŒäœåŽïŒ | 察å¿é»å§ïŒé«åŽïŒ |
---|---|---|
R3 | 6V | 20V |
R4 | 6V | 24V |
ã念ã®çºè§£èª¬ããŠãããšã
Arduino UNO R3ã®æ¹ã¯ãéçã®å€ã§ãæšå¥šé»å§ã¯ããå°ãäœãã§ãã
ãR3ã®éçé»å§ã20Vã«å¯ŸããŠãR4ã¯ãã£ã4Vãã
é«ããªãã®ãïŒãšæã£ããããããŸãããããã®4Vã倧ããªæå³ãæã€ãã§ãã
ãããã¯ãç£æ¥æ©åšé¢ä¿ã®é§åé»å§ã«é¢ä¿ããŠããŸãã
äŸãã°ã¢ã¯ãã¥ãšãŒã¿é¢ä¿ã®é»å§ã¯ãå®ã¯DC24Vã®ããšãå€ãã
ä»ã«ãPLCã§ããä»ã®åšèŸºæ©åšã§é»æºãå¿
èŠãªãã®ã¯ã24Vãå€ãã§ãã
ããããªAC100VâDC24Vã«å€æããé»æºãããã
ããã«ããããDC24Vã«å¯Ÿå¿ããæ©åšãç¹ããŠããã€ã¡ãŒãžã§ãã
ãã€ãŸããç£æ¥æ©åšé¢ä¿ã®äžã§ãArduinoã䜿ãããã«
ããããå¥ã®é»å§ã®é»æºãäžèŠãšããããšã§ããããã¯çµæ§ããããšã§ããã
ç°¡åãªèšåã«Arduinoãè¿œå ããŠã¡ãã£ãšããæ©èœãè¿œå ããããšãå¯èœã«ãªãããã§ãããã
USBæ¥ç¶ç«¯åãType-Cã«å€æŽããã
ãããå°å³ãªãã§ãããå¬ããå
容ã§ãã
ä»ãŸã§ã®Arduino UNO R3ã¯ãæ代é
ãã®USB端åãæ¡çšããŠããŸããã
å
·äœçã«ã¯ãæã®ããªã³ã¿ãŒãªããã§äœ¿ãããŠããUSB Type2.0 B端åã§ãã
ãããªã®âââæè¿å šç¶èŠãªã…
ãArduinoã®USB端åã®å€é·ã§ãããArduino UNO R3ã§ã¯TypeBã
Arduino Nanoã¯miniBãNano Everyã¯microBãšã©ãã©ãå°ãããã®ã
æ¡çšããŠããæŽå²ããããŸãã
ãåœç¶ããã€ã³ã³ããŒãã«å ããUSB端åã®é¢ç©ã¯å°ããæ¹ãããã«æ±ºãŸã£ãŠãŸãããã
端åãå°ãããªã£ãåã³ã³ãã¯ãã«ã§ããŸããã
ãmicroBã«ãªã£ãããšã§æçµç³»ããšæãããã
ãã5幎ãããã§æ¥æ¿ã«æ®åãå§ããã®ãTypeCã§ãã
ãããã®ãããšããã¯ãè¡šè£ãæ°ã«ããããšãªãã
ãšããããåºãããšãããšãããããã«ãä»ã§ã¯ããããªæ©åšãTypeCæ¥ç¶ã«ãªã£ãŠããŸãããã
å€åºãããšããªã©ã«æºåããã±ãŒãã«ã®çš®é¡ãæå°éã§æžã¿ãŸãã
ããã®æ©åšã¯MicroBã®ã±ãŒãã«ããã®æ©åšã¯TypeCã§ãããã¯iphoneçšã®ã±ãŒãã«ã§….
ãšå¹Ÿã€ãã®ã±ãŒãã«ã®çš®é¡ãæºåããçµéšã¯ããªãã«ããããšæããŸãã
iphoneãæè¿TypeCã«çµ±äžããŠããŸããããä»åŸããã«TypeCãæ®åããŠããã¯ãã§ãã
ããããªæ代ã®æµãããããArduino UNO R4ã®USBæ¥ç¶ç«¯åãTypeCã«å€æŽãããŠããŸãã
ä»ãŸã§ã¯Arduino UNO R3ã䜿ããšãã¯ããªã³ã¿ãŒçšã®çµ¶æ»
äžæ©æåã®
ã±ãŒãã«ãæ¢ãäœæ¥ãã»ããã§ããããR4ã§ã¯ãã®äœæ¥ã¯äžèŠã«ãªããŸãã
ä»åã®ãŸãšãïŒR3âR4ã®åãæ¿ãã¯é»æµå€ã ã泚æãä»ã¯OK
ãä»åã¯Arduino UNO R3ãšR4ã®éãã«ã€ããŠå€§ããªå€æŽç¹ãäžå¿ã«è§£èª¬ããŸããã
æèŒãããŠãããã€ã³ã³ããããAtmelããRenesasã«èŒãæ¿ãã«ãªã£ãã®ããšã«ãã
倧ããªå€æŽç¹ã§ããã
ããã ããããArduinoãšãã£ããšããã§ããã
åºæ¬æ©èœã¯R3ã§ã§ãããšããã¯R4ã§ãã§ããããã®äžã§è¿œå æ©èœãèŒããŠããŸãã
äŸãã°é»å§ã枬å®ã§ããanalogPinã®é«å解èœåãªã©ã§ããã
ã泚æç¹ãšããŠã¯ãåå¶åŸ¡ãã³ãåºããMaxé»æµå€ã§ããã
å
ã
20mAæµããŠãããã®ã8mAã§åå以äžã«ãªã£ãŠããŸãã
ã¡ã«ãªã¬ãŒãã®ãªã®ãªãã£ã¿ãªã³ã°ãèµ·ãããªããèµ·åããŠããŸãã…
ãããããå
ã
R3ã§ã®ãªã®ãªã®é»æµå€ã§åäœããŠããåè·¯ã§ã¯ã
R4ã§ã¯åäœããªãå¯èœæ§ããããŸããé»æµå€ã®èšç®ãå床ãããªããå¿
èŠãããããã§ãã
ãR3ã®åè·¯ã§åããŠããã®ã«ã
R4ã§ãããšåããªã….ãªããŠå Žåã¯é»æµå€ãçã£ãŠã¿ããšãããããããªãã§ããã
ã³ã¡ã³ã