Slide 1

Slide 1 text

體驗 Raspberry Pi 5 台灣樹莓派 2023/10/30 @Raspberry Pi Meetup #40

Slide 2

Slide 2 text

姓名標示 — 非商業性 — 相同方式分享 CC (Creative Commons) 姓名標示 — 你必須給予 適當表彰、提供指向本授權 條款的連結,以及 指出(本作品的原始版本)是否已 被變更。你可以任何合理方式為前述表彰,但不得以 任何方式暗示授權人為你或你的使用方式背書。 非商業性 — 你不得將本素材進行商業目的之使 用。 相同方式分享 — 若你重混、轉換本素材,或依本 素材建立新素材,你必須依本素材的授權條款來 散布你的貢獻物。

Slide 3

Slide 3 text

3 ● Raspberry Pi 官方經銷商 ● 專注 Raspberry Pi 應用與推廣 , 舉辦社群活動 關於我們

Slide 4

Slide 4 text

● COSCUP , MakerConf, PyCon, HKOSCon 講者 ● 投影片 ● https://speakerdeck.com/piepie_tw ● 程式碼 ● https://github.com/piepie-tw ● 台灣樹莓派網站 : ● https://piepie.com.tw/ ● Facebook: ● https://www.facebook.com/RaspberryPi.Taiwan 分享 x 教學

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

7 ● 1. Raspberry Pi 5 改變的地方 ● 2. 效能評比 ● 3. 相機評比 ● 4. 技術說明 大綱

Slide 8

Slide 8 text

Raspberry Pi 5 技術分析

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

外觀比較 https://www.elecrow.com/blog/raspberry-pi-5-vs-raspberry-pi-4-what-are-their-differences.html

Slide 11

Slide 11 text

外觀比較 https://www.elecrow.com/blog/raspberry-pi-5-vs-raspberry-pi-4-what-are-their-differences.html

Slide 12

Slide 12 text

● Pi 4: Broadcom BCM2711 quad-core Cortex- A72 (ARM v8), 64-bit SoC @ 1.8GHz (28nm) ● Pi 5: Broadcom BCM2712 quad-core Cortex- A77 (ARM v8), 64-bit SoC @ 2.4GHz (16nm) ● 數字提昇約 33% ● 實際約提昇 2-3 倍 全新 BCM2712 處理器

Slide 13

Slide 13 text

● 一組 4 通道 PCIe 2.0 介面 , 每通道速度 5 GT/s 全新 PCI-E 介面

Slide 14

Slide 14 text

可外接多種設備 https://www.jeffgeerling.com/blog/2023/testing-pcie-on-raspberry-pi-5 NVMe SSD Coral TPU/AI USB Accelerator ASUS NIC HBA/RAID Storage Cards

Slide 15

Slide 15 text

● 可外接 NVMe SSD 和其他 M.2 格式配件 新 M.2 HAT( 原型 ) https://www.raspberrypi.com/news/introducing-raspberry-pi-5/

Slide 16

Slide 16 text

● 支援 802.3at 和 802.3af, 最高輸出電流 5A PoE 腳位改位置 PoE Pin 換位置了

Slide 17

Slide 17 text

前兩代的 PoE 規格

Slide 18

Slide 18 text

https://www.cnx-software.com/2021/05/24/raspberry-pi-poe-plus-hat-25-5-watts/

Slide 19

Slide 19 text

● 可安裝在原廠外殼裡 新 PoE+ HAT( 原型 ) https://www.raspberrypi.com/news/introducing-raspberry-pi-5/

Slide 20

Slide 20 text

專用 UART 接頭 專用 UART 接頭

Slide 21

Slide 21 text

● 不用再修改 /boot/config.txt 就永遠啟用偵錯模式 搭配 Raspberry Pi Debug Probe

Slide 22

Slide 22 text

Linux 可用 PuTTY 登入 /dev/ttyACM0 115200

Slide 23

Slide 23 text

Windows 可用 MobaXterm 登入

Slide 24

Slide 24 text

Mac 可用 screen 登入

Slide 25

Slide 25 text

● 短按兩下軟關機 ( 系統關機 ) ● 長按一下強制關機 ● 再按一次啟動電源 劃時代的 On/Off 實體電源按鍵設計

Slide 26

Slide 26 text

● 提供 BCM2712 和 RP1 穩定電源 , 支援 PD 5V/5A ● 支援 RTC, 電源按鍵軟硬關機和開機事件 客製化的 DA9091 PMIC https://www.raspberrypi.com/news/introducing-raspberry-pi-5/

Slide 27

Slide 27 text

● Raspberry Pi 自研全新 I/O 控制晶片 RP1 大改 I/O 架構 https://www.raspberrypi.com/news/rp1-the-silicon-controlling-raspberry-pi-5-i-o-designed-here-at-raspberry-pi/

Slide 28

Slide 28 text

● RP1 = I/O Controller (IC 設計 ) ● RP2 = RP2040 MCU (IC 設計 ) ● RP3 = Zero 2 W 的 SoC ( 封裝技術 ) Raspberry Pi 晶片開發歷史 https://www.raspberrypi.com/news/rp1-the-silicon-controlling-raspberry-pi-5-i-o-designed-here-at-raspberry-pi/

Slide 29

Slide 29 text

從南北橋架構到晶片整合趨勢 https://kopu.chat/ 系統單晶片 soc ?來看看這些年來的晶片整合趨勢 /

Slide 30

Slide 30 text

Pi4 BCM2711 架構 ( 非官方資料 ) https://www.heise.de/hintergrund/Raspberry-Pi-4-Model-B-Blockschaltbild-des-Broadcom-BCM2711-4514399.html

Slide 31

Slide 31 text

● 將 I/O 獨立出來 , 再透過 PCIe 和 BCM2712 通訊 ● 具有核心板和 I/O 控制分離的戰略意義 RP1 全新 I/O 架構 https://www.raspberrypi.com/documentation/microcontrollers/rp1.html

Slide 32

Slide 32 text

● RP1 提供的 I/O 控制 ● Gigabit Ethernet MAC, 含 – 兩組 USB 3 host controllers(USB2+USB3) ● MIPI 收發 (4 通道 , 支援 DSI/CSI-2) ● 兩組 SDIO ports/eMMC( 未用在 Pi5) ● 低速週邊 (SPI, UART, I2C, PWM, GPIO, I2S) ● Delta-sigma PWM audio out ● 3V3-failsafe GPIO ● RP1 再透過四通道 PCIe 2.0 和 BCM2712 通訊 RP1 特色 https://www.raspberrypi.com/documentation/microcontrollers/rp1.html

Slide 33

Slide 33 text

RP1 功能圖 https://hackaday.com/2023/10/16/why-the-rp1-is-the-most-important-product-raspberry-pi-have-ever-made/

Slide 34

Slide 34 text

效能評比

Slide 35

Slide 35 text

https://www.cnx-software.com/2021/10/28/raspberry-pi-zero-2-w-and-zero-w-features-comparison/ Raspberry Pi 4 Raspberry Pi 5 CPU Broadcom BCM2711 quad-core Cortex-A72 (ARM v8) @ 1.8GHz (28nm) Broadcom BCM2712, quad-core Cortex-A77 (ARM v8), 64-bit SoC @ 2.4GHz (16nm) GPU VideoCore VI @ 500 MHz VideoCore VII @ 800 MHz RAM 1/2/4/8GB LPDDR4 @ 2133 MHz 1/2/4/8GB LPDDR4x @ 4167 MHz WiFi 2.4GHz, 5.0GHz 802.11ac wireless 2.4GHz, 5.0GHz 802.11ac wireless Bluetooth Bluetooth 5.0, BLE Bluetooth 5.0, BLE Ethernet Gigabit Ethernet Gigabit Ethernet PCIe N/A 1 x PCIe 2.0 interface USB 2 x USB 3.0, 2 x USB 2.0 (shared) 2 x USB 3.0 5Gbps operation, 2 x USB 2.0 ports GPIO Standard 40-pin GPIO header via BCM2711 Standard 40-pin GPIO header via RP1 Southbridge HDMI 2 x micro HDMI ports (up to 4Kp60) 2 x micro HDMI ports (up to 4Kp60) MIPI 2-lane MIPI DSI, 2-lane MIPI CSI 2 x 4-lane MIPI (DSI/CSI) Audio 4-pole audio and composite video N/A Storage microSD card microSD card support SDR104 mode Input power 5V/3A DC 5V/5A DC (PD-enabled) PoE PoE HAT new PoE HAT,(PoE 802.3at) RTC N/A RTC and RTC battery connector

Slide 36

Slide 36 text

CPU 效能實測

Slide 37

Slide 37 text

● 基於 LuaJIT 的開源壓力測試軟體 ● sysbench 功能測試參數 ● fileio: 磁碟 IO 測試 ● cpu: CPU 性能測試 ● memory: 記憶體分配及傳輸速度測試 ● threads: 執行緒性能測試 ● mutex: 互斥性能測試 ● oltp: oltp 測試 Sysbench

Slide 38

Slide 38 text

https://www.raspberrypi.com/news/benchmarking-raspberry-pi-5/

Slide 39

Slide 39 text

https://www.raspberrypi.com/news/benchmarking-raspberry-pi-5/

Slide 40

Slide 40 text

開機速度實測

Slide 41

Slide 41 text

SD 卡效能實測

Slide 42

Slide 42 text

SD 卡科普

Slide 43

Slide 43 text

● 2020-05-27 Raspberry Pi OS 內建的 Diagnostics SD Card Speed Test

Slide 44

Slide 44 text

● 在不同型號的 Raspberry Pi 上使用同一張 microSDXC UHS-I(V30)(A2) 64GB 測速 Pi 5 支援 SD 卡 SDR104 高速模式

Slide 45

Slide 45 text

● RICELEE microSDXC UHS-I(V30)(A2) 64GB 我們選用的 SD 卡

Slide 46

Slide 46 text

相機評測

Slide 47

Slide 47 text

Raspberry Pi Camera 硬體架構 http://www.phonearena.com/news/13MP-camera-tipped-for-Samsung-Galaxy-S-IV_id35168 1. Lens( 透鏡 ) 2. VCM( 音圈馬達 ) 3. IR-Cut( 紅外光濾片 ) 4. Sensor( 感光元件 ) 5. PCB( 印刷電路板 ) 6. ISP( 影像訊號處理器 )

Slide 48

Slide 48 text

Raspberry Pi Camera 大集合 https://libcamera.org/faq.html

Slide 49

Slide 49 text

● libcamera 是 Linux 和 Android 和 Chrome OS 的使用者空間開源相機堆疊和框架 (An userspace open source camera stack and framework for Linux, Android, and Chrome OS.) ● libcamera 目的是提供一個統一的 API 來支援各種 不同的相機模組 , 號稱是相機界的 Mesa( 一個開源 的 3D/2D 圖形加速軟體 ) ● 目前支援的硬體有 Intel IPU3( 僅限部分設備 ), NXP i.MX7, Raspberry Pi 3/4/5, RockChip RK3399, UVC 網路攝影機和 VIMC 虛擬測試設備 只支援 libcamera https://libcamera.org/faq.html

Slide 50

Slide 50 text

libcamera 架構 https://bit.ly/3QOgryr

Slide 51

Slide 51 text

● 使用 plugin 方式載入 (pipeline handler), 讓開 源和閉源的影像處理演算法 (IPA) 都能在受保護的 環境下被執行 ● 讓開發者可以使用統一的 API 進行應用程式開發 , 降低嵌入式相機硬體的複雜性 ● 提供 Adaptation Layer 來相容 V4L2 和 gstreamer 和 Android Camera HAL ● 提供 Python Binding( 例如 picamera2) ● 可支援多相機模組或是單相機模組的多個串流 ● 可對每個幀進行控制 (per-frame controls) libcamera 特色

Slide 52

Slide 52 text

● 提供開源的影像處理演算法 (3A 演算法 ) ● 提供 libcamera-apps 命令列工具測試 ● 提供 picamera2 讓 python 可存取 libcamera Raspberry Pi 整合 libcamera

Slide 53

Slide 53 text

Raspberry Pi 整合 libcamera https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf

Slide 54

Slide 54 text

54 ● 一套基於 libcamera 的小工具 , 用來取代 raspicam ● libcamera-hello 只預覽不做其他動作 ● libcamera-still 單次拍照 , 功能和 raspistill 類似 ● libcamera-vid 視訊擷取 , 功能和 raspivid 類似 ● libcamera-raw 取得原始 Bayer 幀 , 和 -raw 類似 libcamera-apps https://github.com/raspberrypi/libcamera-apps

Slide 55

Slide 55 text

● 使用 YOLOv8n 模型 (yolov8n.pt) YOLOv8 實測

Slide 56

Slide 56 text

Mediapipe 實測

Slide 57

Slide 57 text

57 ● libcamera 和 picamera2 都支援雙相機 Raspberry Pi 5 雙相機測試

Slide 58

Slide 58 text

Bookworm 技術說明

Slide 59

Slide 59 text

● Raspberry Pi 5 需用 Bookworm(12) 以上系統 Bookworm Release Note https://downloads.raspberrypi.org/raspios_armhf/release_notes.txt

Slide 60

Slide 60 text

● 從可選改為預設使用 網路預設使用 Network Manager

Slide 61

Slide 61 text

● 影響 : VNC 連線 ,KMS,GLX 顯示 ,lxpanel 工具 ● X11 vs. Wayland 架構 顯示預設使用 Wayland 協定

Slide 62

Slide 62 text

影響 lxpanel 工具

Slide 63

Slide 63 text

影響 4K 顯示 ,GLX 顯示

Slide 64

Slide 64 text

Audio 預設使用 PipeWire https://medium.com/@YihuiXiong/record-play-audio-on-linux-8f59adf93710

Slide 65

Slide 65 text

Raspberry Pi 5 週邊商品

Slide 66

Slide 66 text

● 27W USB-C PD ● 支援 5V/3A, 9V/3A, 12V/2.25A, 15V/1.8A 一定要買的 27W 5.1V/5A 電源

Slide 67

Slide 67 text

● Pi 5 在 3A( 未達 5A) 供電 , 週邊最高輸出 600mA ● Pi 5 在 5A PD 供電時 , 週邊最高輸出可達 1.6A 實測 27W 電源

Slide 68

Slide 68 text

原廠外殼 + 主動散熱風扇

Slide 69

Slide 69 text

原廠外殼堆疊功能

Slide 70

Slide 70 text

你一定需要的 Active Cooler

Slide 71

Slide 71 text

● 裸測 vs. ICE Tower vs. Active Cooler 實測散熱比較

Slide 72

Slide 72 text

原廠外殼 +Active Cooler https://www.jeffgeerling.com/blog/2023/answering-some-questions-about-raspberry-pi-5

Slide 73

Slide 73 text

Argon NEO 5 Case

Slide 74

Slide 74 text

● 兩片式外殼 vs. 全包覆式外殼 ● 可再加裝各類型擴充板 (HAT) EDA Tec 被動式散熱外殼

Slide 75

Slide 75 text

● 使用 Panasonic 電池 原廠 RTC

Slide 76

Slide 76 text

● @Raspberry Pi 贊助 Raspberry Pi Beginner's Guide ● @ 台灣樹莓派 贊助 Pico W ● @RICELEE 提供一片 Zero 2 W 抽獎 ● @Creative5 贊助 USB 小禮物 感謝乾爹們~

Slide 77

Slide 77 text

Raspberry Pi Rocks the World Thanks