10
Most read
15
Most read
16
Most read
micro:bit亮度感測應用
Revised on April 20, 2021
 亮度度量衡
 光感測元件與生活科技應用
 micro:bit亮度感測
 資料映射指令
 實作練習 - 自動調光小夜燈
 實作練習 - 魔術表情面板
 瓦特數:耗電量 1度電 = 仟瓦⋅小時
 流明數:亮度
 色溫:光線顏色
照明設備規格
 燭光定義:給定⼀個頻率為540×1012Hz的單色輻射光源,其發光效能
定為683流明/瓦特
 流明(lm)是光通量的國際單位制導出單位,用於表示光源在單位時間
內所發出可見光的總量
 根據燭光的定義來看,若⼀個功率為1瓦特,頻率為540×1012Hz的單色輻
射光源,其光通量為683流明
 照度則是每單位面積縮接收的光通量,其單位勒克斯為流明/平方公尺
亮度(照度)
3
 色溫K數是將色彩與溫度連結在⼀起,紀錄「⿊體」(可以想像為鐵或
鎢等金屬)在不同溫度下變化出的光芒顏色,再依照這種現象,制定溫
度與顏色之間的關係
色溫
 自動小夜燈
 手機螢幕亮度自動調整
亮度感測應用
5
 光敏電阻 (photoresistor)
受光時,CdS硫化鎘內原本處於穩定狀態的電子受到激發成為自由電子。所以
光線越強,產生的自由電子也就愈多,電阻值就會變小
亮度感測元件 1/2
6
零件外觀
電路符號
光線愈強,分壓
輸出愈大
RCdS
R1 10KΩ
5V
𝑉
𝑅
𝑅 𝑅
5𝑉
 光二極體 (photodiode)
工作在逆向偏壓。當光照射在光電二極體上,會使其逆向偏壓電流增加。由
於光二極體電流很小,需要搭配電晶體或運算放大器使用
 光電晶體 (Phototransistor)
相當於光電二極體 + 電晶體放大
亮度感測元件 2/2
7
電路符號
零件外觀
Light
Current
C
E
Flat spot
B
Emitter
Base
Collector
電路符號
零件外觀
micro:bit亮度感測 1/5
https://youtu.be/TKhCr-dQMBY
8
 Micro:bit並沒有特別設置亮度感測器,而是利用LED的反向原理
 LED不亮時,若有接收到外界光源,會在LED接腳上出現逆電流的,這時若
接腳切換成ADC輸入角色,讀取接腳的電壓數值,是可以得知環境亮度的
 接腳從⼀般輸出接腳轉變成ADC輸入接腳時,需要⼀段時間的穩定,才能
對最小的逆電流進行精確量測,這約要4mS(毫秒,千分之⼀秒)的時間
 啟動亮度感測器後,會略影響本來的5×5 LED燈顯示,本來是每秒更新55
次畫面,會因需要偵測周遭亮度而減少更新頻率,自每秒55次降至50次
 LED的逆電流感測會對自己發出的顏色比較敏感,Micro:bit用的是紅色
LED,所以周遭附近若有紅光,紅光亮度的弱與強,是Micro:bit比較可
以精準感測的
micro:bit亮度感測 2/5
9
 Micro:bit板子LED是以5*5方式排列,但控制電路是使用3*9方式連
接 (其中第二列第8及第9行未接LED)
 col 1~col 3接腳可以切換為類比輸入
micro:bit亮度感測 3/5
10
 用來做為亮度感測之LED位置
 重置後首次亮度感測回傳值為255
micro:bit亮度感測 4/5
11
 測試程式
 顯示亮度⻑條圖
micro:bit亮度感測 5/5
12
 將⼀個數值從⼀個範圍重新映射到另⼀個範圍
映射指令
13
 環境亮度值小於150,開啟小夜燈
 依據環境亮度值自動調整LED亮度等級
實作練習 - 自動調光小夜燈 1/3
255
0
光線感測值
150
小夜燈亮度值(分等級)
最暗
最亮
5
55
105
155
205
255
關閉小夜燈
點亮小夜燈
小夜燈開關臨界值
14
 參考程式
實作練習 - 自動調光小夜燈 2/3
15
實作練習 - 自動調光小夜燈 3/3
 初始顯示?
 每次用手掌遮蔽LED再放開,LED依序變換顯示以下圖示
提示:
手掌遮蔽LED時,亮度感測值會下降;手掌移開時,亮度感測值會回復到
環境亮度值。須等到手掌移開才變換顯示。
注意事項:須依環境狀況調整亮度感測臨界值
實作練習 - 魔術表情面板 1/3
 設計以下程式
實作練習 - 魔術表情面板 2/3
 參考程式
實作練習 - 魔術表情面板 3/3

More Related Content

PDF
Microbit 1 introduction
PDF
micro:bit LED顯示控制
PDF
mBot 教學4 移動控制
PDF
mBot 教學5 超音波感測應用
PDF
mBot教學(4) - 移動控制
PDF
micro:bit開關控制應用
PDF
mBot教學(11) 聲音感測應用
PDF
mBot教學(8) - 巡線控制應用
Microbit 1 introduction
micro:bit LED顯示控制
mBot 教學4 移動控制
mBot 教學5 超音波感測應用
mBot教學(4) - 移動控制
micro:bit開關控制應用
mBot教學(11) 聲音感測應用
mBot教學(8) - 巡線控制應用

What's hot (20)

PDF
mBot 教學6 光感測器與LED應用
PDF
mBot教學(6)-光感測器與LED應用
PDF
mBot教學(7)- 聲光控制應用
PDF
mBot教學(5) - 超音波感測應用
PDF
教學(10) 藍牙控制應用
PDF
mbot2.0教學-超音波感測應用.pdf
PDF
micro:bit亮度感測應用
PDF
mBot教學(3) - 開發mBot應用程式
PDF
mBot 教學1 組裝與測試
PDF
mBlock積木式設計程式
PDF
mBot教學(1) - mBot初體驗
PDF
mBot 教學7 聲光控制應用
PDF
Mbot教學(1b) mBot初體驗
PDF
mBot 教學10 藍牙控制應用
PDF
mbot2.0教學-組裝與測試.pdf
PDF
mbot2.0教學-四路顏色感測器應用.pdf
PDF
mBot教學(9)- 紅外線傳輸應用
PDF
mBot教學(3b) - 使用M部落App
PDF
mBot 教學8 巡跡控制應用
PDF
mbot2.0教學-光感測器與LED應用.pdf
mBot 教學6 光感測器與LED應用
mBot教學(6)-光感測器與LED應用
mBot教學(7)- 聲光控制應用
mBot教學(5) - 超音波感測應用
教學(10) 藍牙控制應用
mbot2.0教學-超音波感測應用.pdf
micro:bit亮度感測應用
mBot教學(3) - 開發mBot應用程式
mBot 教學1 組裝與測試
mBlock積木式設計程式
mBot教學(1) - mBot初體驗
mBot 教學7 聲光控制應用
Mbot教學(1b) mBot初體驗
mBot 教學10 藍牙控制應用
mbot2.0教學-組裝與測試.pdf
mbot2.0教學-四路顏色感測器應用.pdf
mBot教學(9)- 紅外線傳輸應用
mBot教學(3b) - 使用M部落App
mBot 教學8 巡跡控制應用
mbot2.0教學-光感測器與LED應用.pdf
Ad

Similar to micro:bit亮度感測應用 (16)

PPT
Photometry
PPT
Lighting terminlologyand their units
PDF
Troubleshooting, Designing, & Installing Digital & Analog Closed Circuit TV S...
PDF
Images and Information
PPTX
THEORY: Color, Light, & Texture
PPTX
ARCHINT: Lighting Design, Colors, Illusions, and Techniques
PDF
ILLUMINATION ENGINEERING WITH BASIC INTRODUCTION
PPTX
Photometry and Radiometry in optics and optometry
PPTX
Luminance and Illuminance
PPTX
Principle of lumination design
PPTX
Lux Meter - Meco
PPTX
lecture_02_Image Formation _ System.pptx
PDF
E2S warning signals - guide to specifying visual signals
PPT
PPTX
Lumens & color rendering index
Photometry
Lighting terminlologyand their units
Troubleshooting, Designing, & Installing Digital & Analog Closed Circuit TV S...
Images and Information
THEORY: Color, Light, & Texture
ARCHINT: Lighting Design, Colors, Illusions, and Techniques
ILLUMINATION ENGINEERING WITH BASIC INTRODUCTION
Photometry and Radiometry in optics and optometry
Luminance and Illuminance
Principle of lumination design
Lux Meter - Meco
lecture_02_Image Formation _ System.pptx
E2S warning signals - guide to specifying visual signals
Lumens & color rendering index
Ad

More from 吳錫修 (ShyiShiou Wu) (20)

PDF
Vuforia AR影片程式設計
PDF
Vuforia AR 同時追踨多張辨識圖
PDF
Vuforia AR 應用程式設計入門
PDF
Vuforia AR 應用程式準備作業
PDF
IDE for micro:bit
PDF
Arduino overview
PDF
使用Makeblock App學習mBot程式設計
PDF
使用M部落App學習mBot程式設計
PDF
nodeMCU IOT教學03 - NodeMCU導論
PDF
nodeMCU IOT教學02 - Lua語言
PDF
Unity遊戲程式設計 - 2D Platformer遊戲
PDF
Unity遊戲程式設計 - 2D移動與碰撞處理II
PDF
Unity遊戲程式設計 - 2D運動與碰撞處理I
PDF
Python與Ardinio整合應用
PDF
Arduino程式除錯
PDF
Unity遊戲設計- 2D動畫製作及應用
PDF
Unity遊戲設計- 應用Sprite物件
PDF
Arduino程式開發工具
PDF
Arduino程式快速入門
PDF
開發mBot應用程式
Vuforia AR影片程式設計
Vuforia AR 同時追踨多張辨識圖
Vuforia AR 應用程式設計入門
Vuforia AR 應用程式準備作業
IDE for micro:bit
Arduino overview
使用Makeblock App學習mBot程式設計
使用M部落App學習mBot程式設計
nodeMCU IOT教學03 - NodeMCU導論
nodeMCU IOT教學02 - Lua語言
Unity遊戲程式設計 - 2D Platformer遊戲
Unity遊戲程式設計 - 2D移動與碰撞處理II
Unity遊戲程式設計 - 2D運動與碰撞處理I
Python與Ardinio整合應用
Arduino程式除錯
Unity遊戲設計- 2D動畫製作及應用
Unity遊戲設計- 應用Sprite物件
Arduino程式開發工具
Arduino程式快速入門
開發mBot應用程式

Recently uploaded (20)

PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Tech Workshop Escape Room Tech Workshop
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Cost to Outsource Software Development in 2025
PDF
Website Design Services for Small Businesses.pdf
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
"Secure File Sharing Solutions on AWS".pptx
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
CNN LeNet5 Architecture: Neural Networks
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Monitoring Stack: Grafana, Loki & Promtail
Tech Workshop Escape Room Tech Workshop
Trending Python Topics for Data Visualization in 2025
Why Generative AI is the Future of Content, Code & Creativity?
Visual explanation of Dijkstra's Algorithm using Python
Patient Appointment Booking in Odoo with online payment
Cost to Outsource Software Development in 2025
Website Design Services for Small Businesses.pdf
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
GSA Content Generator Crack (2025 Latest)
Salesforce Agentforce AI Implementation.pdf
"Secure File Sharing Solutions on AWS".pptx
How to Use SharePoint as an ISO-Compliant Document Management System
iTop VPN Crack Latest Version Full Key 2025
Topaz Photo AI Crack New Download (Latest 2025)
Designing Intelligence for the Shop Floor.pdf
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Weekly report ppt - harsh dattuprasad patel.pptx

micro:bit亮度感測應用