自動進行システムについて

システムの動きとしては、
①体験者が部屋のドアを開ける
②ドアセンサ(部屋)で検知し、ゆかりさんの音声を再生
③体験者が浴室のドアを開ける
④ドアセンサ(浴室)で検知し、ゆかりさんの映像を再生
といった流れで動いてました。

システム全体構成について

①ドアセンサにてドアとセンサ間の距離を測定。
②ドアセンサ測定結果をマイコンが判定し、距離情報から開閉情報に変換して制御コンピュータに入力。
③ドア開閉情報をトリガーとして部屋入室時、浴室入室時それぞれの音声・動画を再生。
④システム担当者は制御コンピュータからのセンサ情報・プログラム動作状況をモニタリング。

ドアセンサについて

ドアセンサとして「測距センサ(シャープ製 GP2Y0A21YK)」を使いました。測距センサとは、センサから対象物までの距離を測定し、測定結果を距離に応じたした電圧(アナログ電圧、例えば10cmなら2.25V、80cmなら0.4V)を出力してくれるセンサです。

このセンサをドア近くに貼り付けておき、ドアとセンサ間の距離を測定。
ドアが開いたときに、センサへドアが近づいてくるので距離が短くなる=開閉が検出できます。

ソフト・ハードについて

センサの信号変換を行うマイコン(mbed KL46Z)のプログラムは以下に公開しています。https://developer.mbed.org/users/nameless129/code/YukariOnsen/

センサの信号をAD変換にて10msおきに取得、センサの信号が1Vのときにドアが開いたと判定し、デジタルポートをドアが開いたらL、ドアが閉じていたらHで出力するようにしています。

制御コンピュータ(Raspberry Pi)のプログラムは以下に公開しています。https://github.com/en129/YukariOnsen

使い方としては、部屋の受け入れ準備ができたらonsen.shを起動するだけです。

sen1.shとsen2.shをバックグラウンドで起動させ、それぞれマイコンからの入力があればフォアグラウンドに移行し、音声・映像を再生します。

sen2.shの処理中、omxplayerがデコードエラーで動作しなくなった場合が当日起きたので、対策として2窓SSHターミナルを開いておき、1つはonsen.shを実行し、デコードエラーが発生した瞬間、もう1つのターミナルでre.shを即座に実行、再生し直します。(故にゆかり温泉開催中、担当がモニタリング用PCに釘付けになっていました。。。)

回路図は以下のとおりです。

文責:システム担当(en129)

AUTO PROGRESSION SYSTEM

① experienced person opens the room door
② a sensor catch the person, it starts to sound YUKARI’s voice
③ experienced person opens bath room door
④ a sensor on the door of bath room catch the person, it starts to project the movie

about door censer

① experienced person opens the room door
② a sensor catch the person, it starts to sound YUKARI’s voice
③ experienced person opens bath room door
④ a sensor on the door of bath room catch the person, it starts to project the movie

the door censer is GP2Y0A21YK (SHARP co,ltd.) this is a distance sensor.

Signal conversion is mbed KL46Z. the program is open to the public on this website.
https://developer.mbed.org/users/nameless129/code/YukariOnsen/

Control computer is Raspberry Pi. the program is open to the public on this website.How to use is that when it is ok to start, it needs only start “onsen,sh”,
https://github.com/en129/YukariOnsen

sen1.sh and sen2.sh on background, if each microcomputer transmit the signal, it will go foreground and show the voice and movie.

Circuit diagram

by en129 (chief engineer)