Thermopile Shield

Thermopile Shield มอบอาร์เรย์เซนเซอร์ความร้อน 16x4 ให้กับ OpenMV Cam ผ่าน I2C สำหรับการถ่ายภาพความร้อนความละเอียดต่ำและการวัดอุณหภูมิแบบรายพิกเซล

Thermopile Shield

ดูข้อมูล datasheet ฉบับเต็ม รูปภาพ และการสั่งซื้อได้ที่ หน้าผลิตภัณฑ์ Thermopile Shield

จุดเด่น

  • อาร์เรย์เซนเซอร์ความร้อน 16x4 มุมมองภาพ 60 องศา x 16 องศา

  • อุณหภูมิวัตถุตั้งแต่ -50 องศาเซลเซียส ถึง 300 องศาเซลเซียส

ผังพิน

Thermopile Shield Pinout

อ้างอิงพิน

พิน

ฟังก์ชัน

P4

I²C SCL — สัญญาณนาฬิกาไปยังอาร์เรย์ thermopile

P5

I²C SDA — สัญญาณข้อมูลไปยังอาร์เรย์ thermopile

3.3V rail

จ่ายไฟให้ thermopile

GND rail

กราวด์ร่วม

การใช้งาน

ดึงข้อมูล heat-map จากอาร์เรย์ thermopile บนบอร์ดผ่านโมดูล fir

import fir
import image
import time

fir.init()

clock = time.clock()
while True:
    clock.tick()
    try:
        img = fir.snapshot(x_scale=10, y_scale=10,
                           color_palette=image.PALETTE_IRONBOW,
                           hint=image.BICUBIC,
                           copy_to_fb=True)
    except OSError:
        continue
    print(clock.fps())

อ่านอุณหภูมิรายพิกเซลดิบเป็น ndarray ขนาด 16×4 ของ float เซลเซียส fir.read_ir() ยังส่งคืนอุณหภูมิแวดล้อมและค่าต่ำสุด/สูงสุดที่พบในเฟรมด้วย:

import fir
import time
from ulab import numpy as np

fir.init()
w = fir.width()
h = fir.height()

while True:
    try:
        ta, ir, to_min, to_max = fir.read_ir()
    except OSError:
        continue
    grid = np.array(ir).reshape((h, w))
    print("Ambient: %.1f C, range: %.1f to %.1f C, mean: %.1f C"
          % (ta, to_min, to_max, np.mean(grid)))
    time.sleep(1)