2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Raspberry Pi Zero (W) にBright Piを取り付けてみた

Last updated at Posted at 2017-10-19

Raspberry Pi Zero Wに赤外線カメラモジュール「Pi NoIR Camera V2」を取り付けたけど、赤外線フィルタが除外されているだけで、暗視撮影には赤外線ライトが必要ということを知ったので、購入、取り付けてみました。
Bright Piのセットアップに関して日本語で分かりやすくまとまっている文献がなく、色々調べ物したので、まとめておきます。

購入先(一例)

Raspberry Pi対応の明るい白色ライトとIRカメラライト(RobotShop)
http://www.robotshop.com/jp/ja/bright-white-ir-camera-light-raspberry-pi.html

工作手順

Bright Pi Quick Start And FAQ
https://www.pi-supply.com/make/bright-pi-quickstart-faq/#putting-the-kit-together
背が低いもの、内側のものから半田付けしていくのがセオリー。つまりはL型ピンヘッダ→赤外線LED→白色LEDの順。上記URL内の画像の通り、基板にプリントされた図形とLEDのアノード(+)、カソード(-)を合わせていくよう注意。

https://www.pi-supply.com/make/bright-pi-quickstart-faq/#wiring-the-bright-pi
Bright Pi基板の1〜4番端子を、Raspberry PiのGPIO端子6,4,5,3番に接続します。公式のカメラケースを使っている場合、GPIO端子を背面から出すことになるので、表面の端子配列とは配置が逆になるので、気をつけてください。

Bright Pi GPIO Raspberry Pi
1 GND 6
2 5V 4
3 SCL 5
4 SDA 3

動作確認

https://www.pi-supply.com/make/bright-pi-quickstart-faq/#enable-i2c
に従って、コマンドラインでsudo raspi-config→Interfacing Options→I2CをEnableにするか、スタートメニュー→設定→Raspberry Piの設定から「インターフェイス」タブでI2Cを有効にするかして、その後再起動します。

https://www.pi-supply.com/make/bright-pi-quickstart-faq/#verify-that-the-bright-pi-is-seen-by-the-os
コマンドラインでi2cdetect -y 1を実行して、画像の通り「70」が出力されていたら、正しく接続されています。(私はここでGPIOの接続間違いで詰まりました)

sudo i2cset -y 1 0x70 0x00 0x5aを実行すると、白色LED4個が点灯します。

https://www.pi-supply.com/make/bright-pi-quickstart-faq/#i-cannot-see-the-ir-leds-lighting-up
sudo i2cset -y 1 0x70 0x00 0xa5を実行すると、赤外線LED8個が点灯します。が、肉眼では見えないので、Pi NoIR Cameraで撮影して確認しましょう。

その他コード例
https://www.pi-supply.com/bright-pi-v1-0-code-examples/

公式ケース加工(失敗?)

フタにドリルで穴を開けて、Bright Piに付属のナイロン製ボルト、ナットを用いて、Bright Pi、フタ、カメラモジュールを固定します。

…というのをやってみたのですが、カメラレンズとBright Piの距離があるせいか、LEDが直接写真に写り込んでしまう…。別の手を考えなければ。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?