More Related Content
Similar to JavaOne Preso How to make Geiger usin SunSPOT and Arduino
Similar to JavaOne Preso How to make Geiger usin SunSPOT and Arduino (20)
More from Masafumi Ohta (16)
JavaOne Preso How to make Geiger usin SunSPOT and Arduino
- 1. How to make Geiger counter devices
using SunSPOT and Ardruino
Project Pid0.org Masafumi Ohta, Presenting with
OpenForce Yoshimasa Kawano and Gclue Akira Sasaki LOGO
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 2. Program Agenda
• SunSPOTの紹介(太田)
• 放射線や計測器やマッピングの基礎知識(河野)
• CLOUDCANDEプロジェクトの紹介(河野)
• SunSPOTを使った放射線計測器接続事例(河野)
• Arduinoを使った放射線計測器接続紹介(佐々木)
2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 3. はじめに
• このセッションではいろいろな方にご協力いただきました。
– 元SunSPOT担当の方
– 夜中までおしかけてごめなさい m(__)m
• 小出先生@九州工業大学様
– 本当にありがとうございます。謹んで御礼申し上げます。
• 若松通商様
– ショールームを一時占拠しました…ごめんなさい
• …ほかいろいろ皆様方、謹んで御礼申し上げます。
3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 4. SunSPOTの紹介
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 5. 自己紹介
• 太田 昌文(おおた まさふみ)
• 東京都出身・でも実際は大分県民?
• 皆様しってのOpenSolaris CoreContributorでございます。
– 今日はSolarisつかいませんケド、関係者の方ごめんなさい。
• CTCにて仮想化案件の推進・Sun/Solaris案件の技術支援・OSS案件の推進=
なんでも屋さん。
• SunSPOTはかつて学校の研究用に売り込みにいったことがあってヘンに思い入
れがあるのですが、ここまで大変とは思いもしませんでした…orz
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 6. SunSPOTってなに?
6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 7. SunSPOTの開発環境
• OS:Windows 32bit/MacOS X/Linux 32bit
– MacOS Xでの利用を推奨
• SunSPOT SDKインスト後にsudo dscl . -append /Groups/uucp GroupMembership
$USERが必要
– Windows,Linuxだと、動作させるまでが面倒
• 64bitだとSolariumでデモが全然うごきません。
• Windowsの場合リカバリ・アップデート処理で失敗することがあります。
7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 8. SunSPOT Demoは豊富!
• 使い方がいまいちわからなかったらまずデモをデプロイしてみる。
– 基本はNetbeansで直接build and deploy
– デプロイはSolariumでもVirtual SPOTでエミュレートできます。
8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 10. SunSPOTデモ
• Windows 7(64bit)上のVirtualboxでUbuntu Linux 10.04LTS(32bit)をインストー
ルし、SunSPOT ManagerとNetbeansをインストール、SunSPOT sdkのデモをデ
プロイし、SunSPOTの動作を確認。
– 販売当初は32bit OS(Windows XP)が主流であったが、現在は64bit OS(Windows 7)が
主流であり、かつWindows 64bitの場合SunSPOT sdkにあるデモが動作しないなど問題
があるため、仮想環境を構築して動作可能なOSを利用する。
– FLOSSとして使い勝手のよいUbuntu Linux(32bit)をSunSPOT利用環境として選定
10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 12. NetBeansのインストール、環境設定
• http://www.netbeans.org よりダウンロード、インストール
• http://www.sunspotworld.com/NB6/com-sun-sunspot-updatecenter.nbmから
Netbeans SunSPOT pluginをインストール
• .xprofileの設定
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
export ANT_HOME=/usr/share/ant
export NETBEANS_HOME=/usr/local/netbeans-7.1.1
• .profileの設定
PATH="/usr/local/netbeans-7.1.1/bin:$PATH”
12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 16. 自己紹介
• 河野 悦昌(かわの よしまさ)
– 徳島県出身・東京に単身赴任中
• 若松通商にいます
– アキバNET館
• 秘密結社やってます
– オープンフォース
– あく(オープンな)技術で
– 破壊活動(イノベーション)をする組織
16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 17. 汚染の種類
• ウラン系元素
– 原発内部またはごく近辺のみ
• 分裂核系元素
– セシウム、ストロンチウム、ヨウ素の同位体
• 汚染と区別するべきもの
– バックグラウンド
– 宇宙線やカリウム
17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 18. 話題の放射性核種
18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 19. 放射線の種類
• α線、β線、γ線、その他
• α線は肺胞への吸塵時に強い毒性があり、
その他にはあまり影響がない
• β線は今回の汚染で広範に検出するが透過力
が弱く測定条件で100倍以上の変動が発生する
• γ線はマッピング測定のためには最も手軽に
測定できるが弱いエネルギーでの検出なの
で工夫が必要
• その他は検出が難しい
→人体への直接的影響は少ない
19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 20. 計測器の種類
• ガイガー
• 半導体
• シンチレーション
20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 21. ガイガー
• 原理:高圧電場の中に放射線を入れると気体全体が放電する。その信号を利用
。
• 400V以上の高圧が必要
• 本来はベータ線しか反応しないものが多い
• γ 線は?
– 光電効果でβ 線に変換したものを計測する
– なので感度が低い
21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 22. 半導体
• 原理:半導体のギャップを放射線のエネルギーで乗り越える
– ギャップって?
– 電気の流れない層
– 薄いよ
• 小型化できる
– 素子が小さい
– ギャップも薄い
– 感応領域が小さい
• 体積が少ないのでガイガーに比べると反応が弱い
• 回路上の問題で振動で誤作動することが多い
• 大体1時間ぐらい安置しておかないといけない
22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 23. シンチレータ
• 原理:蛍光を発する結晶に放射線をあてると光を発するのでそれを計測する
• 安定、感度高い、値段も高い
23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 24. マッピングソリューションの種類
• 国
– 文科省航空機モニタリング
• 市民系
– Scanning the Earth Project、市民放射線測定マップ
– Safecast
– 測ってガイガー
– 早川マップ
• 市民系はいろいろ批判があるが国の結果と同じような結果を描き出す
• 国よりも速い
• データ量が何よりものを言う
24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 26. CLOUDCANDE
• 原発災害に対応するため
• データをクラウドに収集、マッピングする
• そのためのサービスの開発
• そのためのデータ送信機器の開発
• そのための測定機材の入手
• そのためのテクニカル情報の集積
• 啓蒙活動
26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 27. 汚染を計測
• 分裂核系元素
– セシウム、
ストロンチウム、
ヨウ素の同位体
• 幸いにして、大放出が
一度きりだったので、
組成はどこでもほぼ同じ
– 半減期、組成から見て
Cs-137をターゲットに
27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 28. CLOUDCANDEのために
• 放射線計測機
– 入手難の解消
– 輸入
– 独自開発
• PC,スマートフォンなどに接続
– インターフェースを開発
– プログラムを作成
• サーバサイドを構築
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 29. データ収集の種類
• スマートフォン
• PC
• 計測器をHack
• 接続方法
– いくつも接続方法があるがどれも統一して使えるように
– バリエーション広くして間口を広く
29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 30. ケース1(ガイガー方式)
• 自作ガイガーカウンター
• ガイガー管輸入
• 高圧回路は使い捨てカメラのフラッシュ回路
30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 31. ケース2(半導体方式)
• 半導体方式はbeep出力が無いものが多い(ex,エアカウンター)
• 音声出力に特化したものはむしろ安価に入手可能
– ex,Radiationwatch.org(フリスクガイガー)
• 音声入力なのでそれを受けるプログラムを開発
31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 32. ケース3(ガイガー、シンチ方式)
• 出来合いの放射線計測器を改造
• 例として、FUKUSHIMA GEIGER COUTER
• この機種はオープンハードウェアなので回路図が公開されている
• 分解してスピーカ部分から信号を取り出す
32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 33. ケース4(ガイガー、シンチ方式等)
• モニタリングポスト装置を改造
• Mark2、BlueV2など
• 元々定置測定用なので、フォーマットを変更するだけで使える
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 34. PC,スマートフォン等への接続方法
• USB有線接続
– Arduinoを使った方法
– 安定している
– 電力供給も含めてOK
• センサネットワーク
– Xbeeを使った方法
– SunSPOT
• 自律収集ネットが構築できる
34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 35. PC,スマートフォン等への接続方法(続き)
• Bluetooth
– 専用モジュールを開発中
– 持ち歩きにはこれをお勧め
• Wi-Fi
– 未開発
• 有線LAN
– 単体でLANに接続
– 専用機
• 音声有線接続
– iPhoneなどに
35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 36. PC,スマートフォン上で
• 数値表示
• 分析
– グラフ表示など
• クラウドアップロード
36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 37. クラウドアップロード
• データ形式:JSON形式
• IMAOCANDEフォーマット
• 日時、計測値、緯度、経度、通し番号、 ・・・
• Cf, IMAOCANDEマシン
37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 38. クラウド側
• 製作中
• 乞ご期待!
• Hadoopを使い分析、OpenStreetMapなどへのマッピングを行う。
• 作成のエピソードは後程
38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 40. SunSPOT
• 改めて計測器ドライバとして見てみる
– 無線センサーネットワークデバイス
– フィジカルコンピューティングデバイス
– フルJavaプログラミングデバイス
40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 41. SunSPOTハードウェアスペック
• USBから充電
• 小型
• オンボードセンサーがいっぱい
– 温度センサー
– 照度センサー
– 3軸加速度センサー
• フルカラーLED x 8
• IEEE802.15.4
• デジタル入出力x4、アナログ入出力x4
• スイッチ入力x2 (割り込み)
41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 42. 電源スペック
• 電池 3.7V 770mAh
• 3V ピン 電力供給可能
• 大電流出力ピンが4つある
• ソース、シンク300mA 合計500mA 個別制御
• モータコントロールなどもできる
42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 43. センサネットワーク
• Sleep 30μA
• IEEE802.15.4
• メッシュネットワークが構築できる
43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 44. コンセプト
• 放射線検出器を接続したSUNSPOT
• 数百m程度のフィールドでメッシュネットワークを構築
• データ収集はホストPC1台に
• ノードは太陽電池で駆動
44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 45. 太陽電池
• 2W級 SP80180 180x81x1.5mm
• 5.5V 360mA
• SunSPOTは低消費電力なので
太陽電池でも駆動可能
• 1.4V 240mA
(エクトプラズム動作状態)
45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 46. 昼間の数時間のみの動作
• 数値を1時間安定するまで計測して
• 1時間たったら転送する
• ノード同士でホップして順繰りにデータを転送
• 最大255ノードからPCにデータを収集
• 屋外のモニターをメッシュ状にしなければならない
• 農園などで動作
46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 47. 実験1
• 最初は半導体検出器を接続することを考えた
– コンパクト、消費電力小
• 問題点
– 半導体検出器はノイズに著しく弱い
– 半導体の感度を上げようとすると十数ボルト以上を作成しなければならない
– SunSPOTの3.3Vから昇圧するとノイズが発生
– 正確な計測が困難に
• ガイガー管式に変更した
– 400Vが必要だがノイズには非常に強い
– 不感時間があるので高線量では誤差が大きくなる
47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 48. 実験2
• 屋外ノイズ実験
• ガイガー管式に変更したので振動には強い
• 半導体式では風雨の振動を除外するしくみを作らないといけないがガイガー管式
では特に対策をとらずに問題が発生しないことを確認
48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 49. 実験3
• 太陽電池で満充電するには…2W級 SP80180 180x81x1.5mm を2枚利用
• 実測値
– USBコネクタからの電源供給値
• CPUアクティブ時 4.98V 97.2mA
• スリープ時 5.03V 50.6mA
– 電池セルへの充電電流
• CPUアクティブ時 4.16V 70~80mV
• スリープ時 3.6V 20mA
• 充電時間4時間程度
49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 50. 実験4
• ホップ転送のために
• スリープ中の自律ノード同士で通信させる
• 出力 PALevel 31…0dBmm 19…-5dBM 7…-15dBm 3…-25dBm
• -20dBmで1m程度なので、最大出力だと30m程度と推測
50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 51. マッピングへ
(図は従来システムのマッピング例)
メッシュネットワークの対応
移動計測の交点
突き合わせ
データは自由に利用可能に
51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 52. 応用へ
• 放射線以外への応用
• 屋外での長期モニタリング
• 月、年単位
• 農場の植物生育
• 植生変化
• メモリはフラッシュなので通信をせずに年単位のデータ収集もOK
52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 53. 発展形
• 1.空中散布ロボット?
• 2.SUNSpot入手できない場合
– Arduino+XBee+シリアル通信+Javaで同様のものが動作するように
– モックアップ作成
53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 54. Geiger Cooking
54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 56. 自己紹介
• 佐々木 陽(ささき あきら)
• 1999年よりPalmのKVMでJavaアプリを開発。2001年にGClueを設立し、代表取
締役に就任。
• 以後、携帯電話向けのJavaアプリの開発に従事。2007年よりスマートフォン向け
アプリ開発をおこなっている。
56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 57. Arduinoとは?
• Arduinoプロジェクトは2005年にイタリアで始まり、当時入手可能であった他の学
生向けのロボット製造用コントロールデバイスよりも安価なプロトタイピング・シス
テムを製造することを目的にスタートした
• 現在までに35万枚が出荷
• コミュニティには4万人が登録
57 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 58. Geiger Counter
• 登録入力
– 5V
• ガイガーミューラー菅
– 400V
• 出力
– 数V(一瞬)
58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 59. 5Vから400Vを作り回路図
59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 60. ブレッドボードで試作
60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 61. Arduino
• 放射能が計測されると放電する
• 割り込みで値を取得
– 1秒間の合計を累計する
61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 62. Arduinoと接続
62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 63. 表示
• LCDに表示
• USBでスマートフォンに転送
• Mic端子でスマートフォンに転送
63 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 64. LCDで表示
64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 66. Arduino + 3G Shield
66 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 67. 補足
67 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 68. 今後の予定
• CLOUDCANDEサーバサイドインプリメント、サービスイン
• 災害管理システムSAHANAプラグイン
• 開発ハードウェアのスピンアウト
68 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 69. スピンアウト例
• Bluetooth汎用入出力装置
• InkscapeでG-code作成
• FT232RLフィジカルコンピューティングモジュール
69 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 70. 参考文献
• WebサイトPROJECT2108.com - CLOUDCANDE
• テキスト「Programing Sun Spot 2009.08」
• もっと知りたい方はオープンフォースMLへ!
70 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 71. 最後にひとこと
71 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 72. 最後に
• 東北の大惨事から一年たってじわじわと放射能の脅威が広がっていて、風評被
害もそれにともないひろがっています。正しい知識をもつということは大事です。
• 当初放射線計測器は高かったものの少しずつですが値段が下がってきています
。今度はこれをどう生かしていくかの腕もかかってくるかと。
• Hack4jpや被災者をITで支援していくコミュニティで貢献することも、現地に行って
作業をすることと同様大切なことかと思ってます。
• 今後との私どもの活躍、ご期待くださいませ.
72 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 73. Q&A
73 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
- 74. Thanks for Ur Coming!
Masafumi Ohta
Akira Sasaki
Yoshikmasa Kawan
74 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.