網頁最後修改時間:2019/05/24
PROTEUS 是一款電路模擬的軟體,不但可以學習電路也可以模擬韌體程式實際在 MCU 執行的情形,它在我學習的路上幫助與輔助我很多,也希望這樣的想法延續下去,所以當時在建立部落格要命名的那一刻,它的名字就莫名地浮現出來:ㄆㄜ ㄊㄧㄡ ㄙˋ (proteus),用注音是因為不想用英文,用中文又不曉得翻譯成什麼,所以就英文注音化。
部落格發佈的網頁,主要是以我玩的東西、學習的心得和電子週邊應用為主,也歡迎有興趣的一起交流分享 !
2014年1月6日 星期一
2013年6月18日 星期二
使用 Raspberry Pi 驅動 LCD 顯示 DHT-11 所測得的環境溫濕度
需要 DHT-11 (溫濕度感測器) 的話請到露天賣場訂購:DHT11 - 溫濕度感測器
DHT-11 使用 DATA 接腳與處理器之間做通訊與同步,採用串行單線數據格式,一次通訊時間在 4ms 左右,數據分為整數與小數部分,一次完整數據輸出為 40-bit,高位元先輸出:
數據格式:8-bit 濕度整數數據 + 8-bit 濕度小數數據 +
8-bit 溫度整數數據 + 8-bit 溫度小數數據 + 8-bit 檢驗和
檢驗和是溫濕度整數與小數四個數據相加之後取末 8 位元數據資料,至於詳細的通訊過程請參閱 "DHT11溫濕度感測器說明書" 的說明。
下面的例子將使用 Raspberry Pi (樹莓派) 與 DHT-11 作通訊取得溫濕度數據,並將數據顯示在 LCD上。
首先,我們延用部落格網頁 "驅動 16x2 LCD 螢幕 (英文文字型)" 的線路,並增加 DHT-11 於線路中;DHT-11 使用 3.3V 電源供應,資料通訊使用樹莓派 GPIO P1 第 10 支 pin 腳 (也就是 RxD, #15) 連接 DHT-11 DATA 接腳。
ps. #15 表示是 BCM2835 GPIO 15 的意思
材料列表:
DHT-11 使用 DATA 接腳與處理器之間做通訊與同步,採用串行單線數據格式,一次通訊時間在 4ms 左右,數據分為整數與小數部分,一次完整數據輸出為 40-bit,高位元先輸出:
數據格式:8-bit 濕度整數數據 + 8-bit 濕度小數數據 +
8-bit 溫度整數數據 + 8-bit 溫度小數數據 + 8-bit 檢驗和
檢驗和是溫濕度整數與小數四個數據相加之後取末 8 位元數據資料,至於詳細的通訊過程請參閱 "DHT11溫濕度感測器說明書" 的說明。
下面的例子將使用 Raspberry Pi (樹莓派) 與 DHT-11 作通訊取得溫濕度數據,並將數據顯示在 LCD上。
首先,我們延用部落格網頁 "驅動 16x2 LCD 螢幕 (英文文字型)" 的線路,並增加 DHT-11 於線路中;DHT-11 使用 3.3V 電源供應,資料通訊使用樹莓派 GPIO P1 第 10 支 pin 腳 (也就是 RxD, #15) 連接 DHT-11 DATA 接腳。
ps. #15 表示是 BCM2835 GPIO 15 的意思
材料列表:
- Raspberry Pi (Model B, Rev2.0 (512MB))
- 特製 GPIO 彩色排線
- 雙頭長排針 ( GPIO 排線用)
- 麵包板連接測試跳線(公對公)
- DHT11 - 溫濕度感測器 (附電阻)
- 英文字型 LCD 螢幕 (附排針與可變電阻, 16x2,藍底白字, LED 背光)
- 麵包板
2013年6月7日 星期五
[ 認識與使用 Gertboard ] 第五部曲 - 數位轉類比 ( MCP4802 ) 和類比轉數位 ( MCP3002 ) 轉換器 ( D to A and A to D converters )
學習樹莓派週邊不容錯過的學習利器 "Assembled Gertboard (Rev2.0)",心動不如馬上行動!!露天賣場:
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
Gertboard - A to D and D to A Converters ( 橙色部分 ),source: Gertboard User Manual (Rev 2.0) |
![]() |
Gertboard - D to A Converter 電路圖,source: Assembled Gertboard Schematics |
![]() |
Gertboard - A to D Converter 電路圖,source: Assembled Gertboard Schematics |
![]() |
Gertboard - 電路圖,source: Assembled Gertboard Schematics |
2013年6月5日 星期三
pidora 遠端桌面與編輯環境設定
![]() |
from: Pidora_18_Firstboot |
我想,關於如何安裝與指令介紹這些東西都可以在網路上找到一大堆資料,此篇網頁主要是與下面三個部落格文章做連結,說明如何使用 pidora 來設定以下的編輯環境
- 在 Windows 設置 Raspberry Pi (樹莓派) 遠端編輯環境 Sublime Text 2 遠端編輯環境設定
- 把 Windows 桌面當作是 Raspberry Pi (樹莓派) 的螢幕 遠端桌面連線 - 使用 MobaXterm
- 遠端桌面 - VNC 遠端桌面連線 - 使用 VNC
重啟 pidora 第一次開機 ( firstboot ) 的設定畫面
2013年5月6日 星期一
[ 認識與使用 Gertboard ] 第四部曲 - 馬達驅動控制器 ( Motor Controller )
學習樹莓派週邊不容錯過的學習利器 "Assembled Gertboard (Rev2.0)",心動不如馬上行動!!露天賣場:
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
GertBoard 使用 ROHM BD6222HFP 做為馬達驅動控制器,可以驅動最大電壓 DC 18V 電流 2A 的直流有刷馬達。晶片 ( 如下圖 ) 有兩支接腳 MOTOR_A 與 MOTOR_B 可以輸入高或低準位控制直流馬達轉動方向,並且可以在單一接腳輸入 PWM 訊號對馬達進行轉速的控制,這兩支接腳位於電路板中間偏右下的位置,標示名稱是 J5,接腳名稱為 MOTA 與 MOTB
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
![]() |
Gertboard - Motor Controller ( 粉紅色框線 ),source: Gertboard User Manual (Rev 2.0) |
![]() |
Gertboard - Open Collector Driver 電路圖,source: Assembled Gertboard Schematics |
2013年5月2日 星期四
[ 認識與使用 Gertboard ] 第三部曲 - ULN2803 開集極驅動 ( Open Collect Driver )
學習樹莓派週邊不容錯過的學習利器 "Assembled Gertboard (Rev2.0)",心動不如馬上行動!!露天賣場:
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
GertBoard 的 open collector driver ( 開集極驅動,位置位在 GertBoard 的右上方 ) 使用八通道 ULN2803 達靈頓驅動 IC,電壓輸出最大可達 DC 50V,每一通道最大電流可達 500mA,可以用來驅動 LEDs、直流馬達、步進馬達以及繼電器,但在 GertBoard 只開放六個通道做使用。
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
![]() |
Gertboard - Open Collector Driver ( 黃色框線 ),source: Gertboard User Manual (Rev 2.0) |
![]() |
Gertboard - Open Collector Driver 電路圖,source: Assembled Gertboard Schematics |
[ 認識與使用 Gertboard ] 第二部曲 - 輸出入緩衝線路 ( 開關和 LED )
學習樹莓派週邊不容錯過的學習利器 "Assembled Gertboard (Rev2.0)",心動不如馬上行動!!露天賣場:
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
緩衝器可以作為輸出的驅動也可以保護內側的電路。也就是將原本的輸出訊號在經過緩衝器之後可以驅動更多的元件;或是當外部輸出短路或是有突波訊號時,會先衝擊到緩衝器,進而保護接收輸出訊號的元件。
另外,在網路上找到這英文的說明可作為參考,若還是存在疑問請自行 Google 一下 !!!
Buffers (in analog circuits) are used when you need to lower the impedance/increase current capability. They're also useful if you want to tap a signal in a circuit and don't want to put a load on that circuit that might cause the voltage to drop. For example, you might have a circuit that generates a signal and you want to bring that signal out to an external connector that you can plug a data logger or whatever into. If you put a buffer in between the original signal and the data logger output, you don't have to worry about the data logger causing a voltage drop on the original signal. Or if you accidentally short out the output, the circuit won't be affected or damaged.
Another use for a buffer is if you have a chip that has a high output impedance (such as an accelerometer) which you want to feed into a ADC that has a lower input impedance. The ADC would load the accelerometer too much and the voltage will drop; the buffer will prevent that.
Digital buffers are used as logic inverters (inverting buffers) or as simple buffers similar to the analog example above (to increase fan-out capabilities or to protect circuits against shorts when going to an external connector).
Assembed Gertboard (Rev2.0) - 利用 Raspberry Pi (樹莓派) 學習與開發電子 (週邊) 的最佳拍檔
PiGertboard 套件 (A) - Raspberry Pi (樹莓派) Gertboard 嵌入式套件
PiGertboard 套件 (B) - Raspberry Pi (樹莓派) Gertboard 外接式套件
![]() |
Gertboard - Buffer I/O ( + switches and LEDs ),source: Gertboard User Manual (Rev 2.0) |
另外,在網路上找到這英文的說明可作為參考,若還是存在疑問請自行 Google 一下 !!!
Buffers (in analog circuits) are used when you need to lower the impedance/increase current capability. They're also useful if you want to tap a signal in a circuit and don't want to put a load on that circuit that might cause the voltage to drop. For example, you might have a circuit that generates a signal and you want to bring that signal out to an external connector that you can plug a data logger or whatever into. If you put a buffer in between the original signal and the data logger output, you don't have to worry about the data logger causing a voltage drop on the original signal. Or if you accidentally short out the output, the circuit won't be affected or damaged.
Another use for a buffer is if you have a chip that has a high output impedance (such as an accelerometer) which you want to feed into a ADC that has a lower input impedance. The ADC would load the accelerometer too much and the voltage will drop; the buffer will prevent that.
Digital buffers are used as logic inverters (inverting buffers) or as simple buffers similar to the analog example above (to increase fan-out capabilities or to protect circuits against shorts when going to an external connector).
2013年4月30日 星期二
[ 認識與使用 Gertboard ] 首部曲 - 瞭解 GertBoard 電路板、建置編輯環境與測試程式碼下載與安裝
Gertboard 可說是 Raspberry Pi (樹莓派) 一個理想的添加裝置,特色有:
- 可直接插入到樹莓派上
- 可以檢測與響應外部物理事件
- 檢測與輸出類比電壓
- 驅動 (直流、步進) 馬達 (18V, 2A max)
- 檢測按鍵動作
- 點亮 LED
- 驅動繼電器
- 六大區塊各自獨立,可互相結合使用,更富使用上的彈性 ! (請看下面說明)
- 以上全部都可由樹莓派直接做控制
- 豐富的軟體資源與使用者手冊,讓使用上更加的方便 !
2013年4月8日 星期一
[AlaMode][PIR] AlaMode 與人體紅外線感應 (PIR) 模組
AlaMode + Raspberry Pi + PIR + Relay + Buzzer |
還記得我們在 "使用人體紅外線感應 (PIR) 模組,製作家中安全防護及警報系統" 使用樹莓派控制 PIR 模組與繼電器,並發送電子郵件嗎 ?
這次樹莓派除了負責接收從 AlaMode 發送過來的訊息,並由訊息中確認是否開始發送電子郵件之外,所有週邊的控制都是由 AlaMode 負責。
或許有人會問,這不是都一樣嗎 ? no! No! NO! 同款隔不同師傅!
AlaMode 只要有電,裡面的程式會一直執行,當你想要在 PIR 模組被觸發時發送電子郵件再把樹莓派裡的接收程式開啟就可以了。
使用此程式,樹莓派裡的 UART 功能必須已經被打開了。如果您不是一開始就依照 "AlaMode: Get Started (中文入門說明)" 作設定,那設定的方法請參考 "使用樹莓派模擬 HT12E 遙控器編碼晶片的編碼格式" 網頁中關於 "樹莓派接收無線訊號" 這一段的說明,照著做再重開機就可以!
另外,也請在閱讀此網頁之前先瀏覽
訂閱:
文章 (Atom)