SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Arduinoのタコメーター
でPI制御
丹野 嘉信
2015/02/03
tannoyoshinobu@gmail.com
目次
• 流れ
• 部品
• 回路図
• 制御図
大学の教材用に作成したタコメーターのサンプル
PI制御の流れ
1. Arduinoからアナログ電圧をFETに出力
2. 外部電源とモーター間の電流を制御
3. モーターの回転に応じてタコメータ用のモーターが回転
4. タコメータ用のモーターからArduinoで電圧取得
• 1の電圧を目標値、4の電圧を出力値とした時のPI制御を行う
PI制御の結果
目標値
1-0Vステップ信号(上部黄色の線)
出力値
上部紫色の線
目標値に出力値が近づこうと
しているのが分かる
(制御してるっぽい!)
SimulinkのScopeを使ったグラフ
利用した部品・機材
製品分類 型番 商品名 単価 必要個数 単価x個数
Arduino Mega 2560 R3 6210 1 6210
FET 23K2232 100 1 100
ダイオード 1N4007 100 1 100
コンデンサ 積層セラミックコンデンサー0.1μF50V 100 1 100
抵抗 1.5kΩ RD25S 1K5 100 1 100
抵抗 100kΩ CFS50J100KB 100 1 100
電池ケース(外部電源) 電池ボックス・電池ケース(コード付き) 単4 60 1 60
乾電池単4 LR03N/10S 358 1 358
ブレッドボード BB-801 200 1 200
ブレッドボード・ジャンパーコード(オス-オス)セット BBJ-65 200 1 200
FA130RA モーターマウント/2段プーリー付き 154 2 308
マブチモータージョイント 473 1 473
合計 8309
使用言語 Matlab2014b
ライブラリ Simulink Simulink用のArduinoブロック
回路図
• [ArduinoとMATLABで制御計をはじめよう!]P56-57より
• 指令値入力用ポテンショ部分はいらない
制御図
• 入力ピンと出力ピンは適宜変えること
• エクスターナルモード中にP,Iゲインを変えるとグラフに反映されるの
が強み
Q And A
Q 1. 一番大変だったことは?
A 1. モーターがぶれないように固定すること
Q2. どうしてArduino Mega使ったの?
A2. エクスターナルモードを利用するためです。
書き込むだけならUNOでも問題ありません
Q3. SimulinkやMatlabがないのでできません!
A3. リアルタイムにパラメータ変更、デフォルトのグラフ表示
機能など使わなくても良い場合はProcessingでも実現可能です
参考文献
• ArduinoとMATLABで制御計をはじめよう! P54-69

Weitere ähnliche Inhalte

Andere mochten auch

Tutorial for robot programming with LEGO mindstorms EV3
Tutorial for robot programming with LEGO mindstorms EV3 Tutorial for robot programming with LEGO mindstorms EV3
Tutorial for robot programming with LEGO mindstorms EV3 Hironobu Fujiyoshi
 
Androidロボットサミットin京都
Androidロボットサミットin京都Androidロボットサミットin京都
Androidロボットサミットin京都Kenichi Yoshida
 
かずきのUWP入門
かずきのUWP入門かずきのUWP入門
かずきのUWP入門一希 大田
 
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方海洋調査用ブイの水深制御のためのPID制御パラメータの求め方
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方Katsuhiro Morishita
 

Andere mochten auch (6)

Tutorial for robot programming with LEGO mindstorms EV3
Tutorial for robot programming with LEGO mindstorms EV3 Tutorial for robot programming with LEGO mindstorms EV3
Tutorial for robot programming with LEGO mindstorms EV3
 
WPF4.5入門
WPF4.5入門WPF4.5入門
WPF4.5入門
 
Androidロボットサミットin京都
Androidロボットサミットin京都Androidロボットサミットin京都
Androidロボットサミットin京都
 
かずきのUWP入門
かずきのUWP入門かずきのUWP入門
かずきのUWP入門
 
Xamarin.forms入門
Xamarin.forms入門Xamarin.forms入門
Xamarin.forms入門
 
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方海洋調査用ブイの水深制御のためのPID制御パラメータの求め方
海洋調査用ブイの水深制御のためのPID制御パラメータの求め方
 

Mehr von ytanno

How to be friend with Attiny202 which is small microcontroller
How to be friend with Attiny202 which is small microcontrollerHow to be friend with Attiny202 which is small microcontroller
How to be friend with Attiny202 which is small microcontrollerytanno
 
Process of Interval Photograph System
Process of Interval Photograph SystemProcess of Interval Photograph System
Process of Interval Photograph Systemytanno
 
How to make an effort for good job
How to make an effort for good jobHow to make an effort for good job
How to make an effort for good jobytanno
 
How To Bind Cuda And OpenCV
How To Bind Cuda And OpenCV How To Bind Cuda And OpenCV
How To Bind Cuda And OpenCV ytanno
 
How to autorun graphic application
How to autorun graphic applicationHow to autorun graphic application
How to autorun graphic applicationytanno
 
How to setup 3D printer (Ender 3 pro)
How to setup 3D printer (Ender 3 pro)How to setup 3D printer (Ender 3 pro)
How to setup 3D printer (Ender 3 pro)ytanno
 
How to set https server
How to set https serverHow to set https server
How to set https serverytanno
 
How to write code in Attiny10
How to write code in Attiny10How to write code in Attiny10
How to write code in Attiny10ytanno
 
How to set up two i2cs on Attiny841
How to set up two i2cs on Attiny841How to set up two i2cs on Attiny841
How to set up two i2cs on Attiny841ytanno
 
How to write code on MachXO2
How to write code on MachXO2How to write code on MachXO2
How to write code on MachXO2ytanno
 
K-means and X-means
K-means and X-meansK-means and X-means
K-means and X-meansytanno
 
First Step SVM
First Step SVMFirst Step SVM
First Step SVMytanno
 
さるでも分かりたい9dofで作るクォータニオン姿勢
さるでも分かりたい9dofで作るクォータニオン姿勢さるでも分かりたい9dofで作るクォータニオン姿勢
さるでも分かりたい9dofで作るクォータニオン姿勢ytanno
 
Xaml html5
Xaml html5Xaml html5
Xaml html5ytanno
 
C# でブラウザ操作
C# でブラウザ操作C# でブラウザ操作
C# でブラウザ操作ytanno
 
CharpTwitter
CharpTwitterCharpTwitter
CharpTwitterytanno
 
MongoDBCSharp
MongoDBCSharpMongoDBCSharp
MongoDBCSharpytanno
 
VisualStudinoの役に立ちそうな拡張機能をまとめてみた
VisualStudinoの役に立ちそうな拡張機能をまとめてみたVisualStudinoの役に立ちそうな拡張機能をまとめてみた
VisualStudinoの役に立ちそうな拡張機能をまとめてみたytanno
 
2013_kougi6
2013_kougi62013_kougi6
2013_kougi6ytanno
 
兼本研究室プログラム講義4回目
兼本研究室プログラム講義4回目兼本研究室プログラム講義4回目
兼本研究室プログラム講義4回目ytanno
 

Mehr von ytanno (20)

How to be friend with Attiny202 which is small microcontroller
How to be friend with Attiny202 which is small microcontrollerHow to be friend with Attiny202 which is small microcontroller
How to be friend with Attiny202 which is small microcontroller
 
Process of Interval Photograph System
Process of Interval Photograph SystemProcess of Interval Photograph System
Process of Interval Photograph System
 
How to make an effort for good job
How to make an effort for good jobHow to make an effort for good job
How to make an effort for good job
 
How To Bind Cuda And OpenCV
How To Bind Cuda And OpenCV How To Bind Cuda And OpenCV
How To Bind Cuda And OpenCV
 
How to autorun graphic application
How to autorun graphic applicationHow to autorun graphic application
How to autorun graphic application
 
How to setup 3D printer (Ender 3 pro)
How to setup 3D printer (Ender 3 pro)How to setup 3D printer (Ender 3 pro)
How to setup 3D printer (Ender 3 pro)
 
How to set https server
How to set https serverHow to set https server
How to set https server
 
How to write code in Attiny10
How to write code in Attiny10How to write code in Attiny10
How to write code in Attiny10
 
How to set up two i2cs on Attiny841
How to set up two i2cs on Attiny841How to set up two i2cs on Attiny841
How to set up two i2cs on Attiny841
 
How to write code on MachXO2
How to write code on MachXO2How to write code on MachXO2
How to write code on MachXO2
 
K-means and X-means
K-means and X-meansK-means and X-means
K-means and X-means
 
First Step SVM
First Step SVMFirst Step SVM
First Step SVM
 
さるでも分かりたい9dofで作るクォータニオン姿勢
さるでも分かりたい9dofで作るクォータニオン姿勢さるでも分かりたい9dofで作るクォータニオン姿勢
さるでも分かりたい9dofで作るクォータニオン姿勢
 
Xaml html5
Xaml html5Xaml html5
Xaml html5
 
C# でブラウザ操作
C# でブラウザ操作C# でブラウザ操作
C# でブラウザ操作
 
CharpTwitter
CharpTwitterCharpTwitter
CharpTwitter
 
MongoDBCSharp
MongoDBCSharpMongoDBCSharp
MongoDBCSharp
 
VisualStudinoの役に立ちそうな拡張機能をまとめてみた
VisualStudinoの役に立ちそうな拡張機能をまとめてみたVisualStudinoの役に立ちそうな拡張機能をまとめてみた
VisualStudinoの役に立ちそうな拡張機能をまとめてみた
 
2013_kougi6
2013_kougi62013_kougi6
2013_kougi6
 
兼本研究室プログラム講義4回目
兼本研究室プログラム講義4回目兼本研究室プログラム講義4回目
兼本研究室プログラム講義4回目
 

Kürzlich hochgeladen

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 

Kürzlich hochgeladen (9)

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 

PI制御を作ってみた