![](https://1space-scenery.net/wp-content/uploads/2021/05/49_01-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
Arduinoで踏切を自作しようの続きです。
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
YouTubeチャンネルでは、第45回動画で [光と音編]として
踏切の点滅と音を表現するための解説動画をアップしました。
![](https://i.ytimg.com/vi/6C5nUZ1OAx8/maxresdefault.jpg)
![](https://i.ytimg.com/vi/6C5nUZ1OAx8/maxresdefault.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
こちらの動画ですね
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
今回は、この光と音を出すトリガーとして、
フォトカプラーを使って車両検知できるか試しました。
フォトカプラーは、ローム製のRPR-220になります。
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
色々なサイトでご紹介されている定番アイテムですね。
結果は、どうでした?
![](https://1space-scenery.net/wp-content/uploads/2021/05/49_03-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/49_03-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
できました。
車両通過時に、センサー値がしっかり変化しました。
10回繰り返し実施しましたが、再現性はありました。
ONトリガーの設定値は900ぐらいが良さそうです。
後は、色々な車両やレイアウトに組み込んだ時、設定値を見直します。
![](https://1space-scenery.net/wp-content/uploads/2021/05/49_02-2-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/49_02-2-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
この写真では、レールに綺麗な四角穴がありますね。
あけたのですか?
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
TOMIX製のワイドPCレール S140-WPですが、
もとから穴が開く仕様でした。手に取るまで知らなかったです。
突然蓋が取れて、びっくりしました。
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
説明書はちゃんと読んでくださいね。
ところで、他に試したことありますか?
![](https://1space-scenery.net/wp-content/uploads/2021/04/45_16-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/04/45_16-1024x576.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
この回路図のように、最初はフォトセンサーの入力部の抵抗値1KΩに
していましたが、出力される数値の判別が難しかったです。
なので、10kΩ、20kΩと試して、20kΩにしました。
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
よくわかんない…
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
とにかく、ちゃんとできて良かったですね!
後は、レイアウトに組込むことを考えないとですね!
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
がんばります!
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
今更ですが、この吹き出しは一体?何がおこったのです?
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
今回、新たに導入した新機能です。
YouTube内の動画サポートだけでなく、
ブログ内でもサポートしてもらえればと…。
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
ここ2か月、悩んでいたものですね。
それでは、こちらにもお邪魔します。
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/03/cropped-aikon2.jpg)
ということで、今回から記事構成が大きく変わります。
さらに追加コンテンツも準備中です。
これからもよろしくお願いします。
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
![](https://1space-scenery.net/wp-content/uploads/2021/05/ICONkiri.jpg)
それでは、次の記事でお会いしましょう♪
コメント