顯示具有 行動科技 標籤的文章。 顯示所有文章
顯示具有 行動科技 標籤的文章。 顯示所有文章

2009年4月25日 星期六

LDO Regulator 簡介

img003

LDO (Low Dropout Regulator) 的主要功能就是在輸入電壓 (Vin) 或是輸出電流 (Iout) 變動的情形下,仍然維持穩定的輸出電壓 (Vout)。如上圖所示,如果 Vin (就是 line) 有一個電壓的突升, 輸出電壓 Vout 也會隨之改變,但經由 LDO 的回授電路會把 Vout 穩定在原來的電壓,因此 Vout 有一些電壓漣波,同時最終穩定的電壓也有些許的變化。Vout 對 Vin 的變化稱之為 line regulation,後面有更詳細的說明。同樣的如果輸出電流突升,輸出電壓 Vout 也會改變, Vout 對 Iout 的變化則稱為 load regulation。

 img007

上圖是一個 LDO 的原理圖,主要有四個部份。簡單卻包含了類比電路的feedback 控制、和補償的原理。

Reference 和 RC filter: 通常為 bandgap 電路加上 RC 濾波電路提供穩定的參考電壓。

Error Amplifier 及 R1/R2 分壓: 通常為一簡單的 opamp 放大輸出電壓(經R1/R2 比例)和參考電壓的誤差。注意此處參考電壓接正極。實務上 Pass FET 多為 PMOS 提供多一次反向。因此參考電壓會接負極而非正極。

Pass FET: 一般為一個巨大的 PMOS。PMOS 的大小由提供的電流和 dropout voltage 決定。

Cout 及 Rload: Cout 為輸出濾波及提供快速電流給 output load。可以用 Rload 模擬 LDO 提供的電流。 Cout 通常會有寄生電感和電阻,稱之為 ESL 和 ESR (equivlaent serial resistance)。其中 ESR 對於 LDO 的穩定(或振盪)相當重要。

 

LDO performance: AC and Step Response

LDO 常見的特性包含 frequency domain PSRR 和 time domain step response。以 Vin 的 PSRR 為例:

 image

上圖為 Vout 對 Vin 在不同頻率正弦波的 rejection ratio 。一般可分為三區:

  • Region 1 是由 reference 和 RC filter 決定。由於 RC 面積的限制,一般 RC filter 的頻率很難低於100 Hz。
  • Region 2 是由全部的 feedback loop 的 gain 和 frequency response 決定,包含 error amp, pass FET, output load 和 R1/R2。一般 dominant pole 是由 Cout Rload 決定 (10uF, 10 Ohm ~  1.5kHz)。
  • Region 3 是由 output 電容分壓決定。Cout 愈大,PSRR 在 region 3 愈高。

 

再以 load current 的 500mA step response 為例:

 Screenshot - 20090511 - 002144

可分為二區

第一區為高頻區 (以 close loop 的 loop bandwidth 為準)。因為 error amplifier 和 PMOS 來不及反應,電流由外接電容供應,因此 Vout 往下降。可以根據 output cap 以及寄生的電阻電感、再細分為三個部份壓降,分別為 ESR, 其次為 ESL, 然後是 cap 造成。ESL 壓降最快,反應電流的變率(微分);ESR 壓降其次,直接反應電流; cap 壓降最慢,反應電流的積分 (droop)。

一旦進入了 loop bandwidth 的反應時間,error amplifier 和 PMOS 開始動作,加大的電流同時供應 output load 以及對電容充電。電壓上升,這時對應的是 PSRR 的 region II 。

理論上可以同樣得出 Vin  的 step response 和 load current 的 ac response。可由 fourier transform 得到。不過一般 LDO 較少用到。

  AC response Step response
Input Voltage PSRR, 週期性 noise step noise
Load current 很少用到 常見且重要

 

LDO Frequency Compensation

Screenshot - 20090516 - 012513

上述的 LDO 很明顯有 stability 的問題,因為有兩個低頻的 poles:一個位於 output 的 dominant pole,由 Cload (~10uF) 所造成;另一個位於 PMOS  gate 的 non-dominant pole,由 PMOS 的 gate capacitance (Cgate ~ 幾十 pF) 所造成。另外加上一些高頻的 poles, 會讓 phase margin 小於10度而引起 stability 的問題。

更麻煩的是 Cload 所看到的等效電阻會隨著 Iload 有很大的改變。大電流時 (50-100mA) 等效電阻小 (Rload 和Rpar, 幾十歐姆),小電流時 (<1mA) 時等效電阻大 (> kOhm)。會造成 dominant pole 頻率可能相差百倍。

相反的,Cgate 所看到的等效電阻 (error amplifier output impedance) 卻是與 Iload 無關,non-dominant pole 的頻率基本上不會隨著 Iload 改變 (但仍與 PVT 有關)。因些有可能藉著增加 zero 來補償 (或者可想成 cancel) non-dominant pole 而增加 phase margin。

 

Screenshot - 20090516 - 084339

最容易加上 zero 的方法就是直接利用 output cap 上的 ESR,自動創造出一個位於 Cload* ESR 的 zero。這個增加 zero 的方法簡單有效,廣為 LDO 所用,但是有一些限制。

  1. 為了能適當的補償或 cancel non-dominant pole,ESR 值有一定的範圍,太大或太小都會造成問題。
  2. 必須選擇 tantalum (鉭質)電容,因為 ESR 值適中 (~100 mOhm) 且不隨著溫度變化太大。ceramic 電容雖然體積小且低價,但 ESR 過小 (<10 mOhm) 不適合。一般電解電容的 ESR 隨溫度變化太大也不適合。
  3. 另外 ESR 在 Iload 變化時,會有額外的壓降而造成 Vout 上的 noise。

對於 LDO 更詳細的介紹請參考 LDO 設計重點一文。

2009年2月22日 星期日

藍牙簡介

如前文所述,bluetooth 己成為 mobile computing 的 de facto 外接的標準。本文主要討論 bluetooth 的規格及應用。

Bluetooth 有內定的 profile 決定有關的應用,可參考 wiki。以下舉出手機中常見的 profile:

  • Hands Free and Headset profile: HFP / HSP
  • Advanced Audio Distribution (Stereo) profile: A2DP
  • Audio/Video Remote control profile: AVRCP

不同的 profile 並不完全是獨立的,常常是互相關連,如下圖所示。GAP 是最基本的 profile;GAVDP 是架構在GAP之上; A2DP 又是架構在 GAVDP之上。

image

以下說明各種 os/device 對 profile 的支援程度。以 embedded OS 而言,symbian 目前有最完整的 bluetooth profile 支援。

 

General OS

Windows XP SP2/Vista/7

The Microsoft Windows Bluetooth stack only supports external or integrated Bluetooth dongles attached through USB. It does not support Bluetooth radio connections over PCI, I²C, serial, PC Card or other interfaces.

Windows XP includes a built-in Bluetooth stack starting with the Service Pack 2 update, released on 2004-08-06.

The Windows XP and Windows Vista Bluetooth stack supports the following Bluetooth profiles natively: SPP, DUN, HID, HCRP.  Windows 7 also supports audio related profiles-HFP, HSP, A2DP and AVRCP natively.

 

Linux

The Linux operating system currently has two widespread Bluetooth stack implementations:

BlueZ is the official Bluetooth stack for Linux and is used in Google's Android OS. Its goal is to make an implementation of the Bluetooth wireless standards specifications for Linux. As of 2006, the BlueZ stack supports all core Bluetooth protocols and layers.  It was initially developed by Qualcomm, and is available for Linux kernel versions 2.4.6 and up.

 

MAC OS

Mac OS X: As of version 10.5, Mac OS X includes native support for A2DP on Bluetooth equipped Macs.  Version 10.4 does not support A2DP, but can be hacked to enable limited functionality.  Softick Audio Gateway for Mac OS X also supports A2DP. Despite being capable of A2DP, the iPhone variant of OS X provides no A2DP support as of October 2008. (But will be supported in future versions of the iPhone OS.)

 

Embedded OS

BlueMagic

BlueMagic 3.0 is Open Interface's (now Qualcomm) highly portable embedded Bluetooth protocol stack which power's Apple's iPhone and Qualcomm-powered devices such as the Motorola RAZR. BlueMagic also ships in products by Logitech, Samsung, LG, Sharp, Sagem, and more. BlueMagic 3.0 was the first fully certified (all protocols and profiles) Bluetooth protocol stack at the 1.1 level.

 

BlueCore Host Software (BCHS)

CSR's BCHS or BlueCore™ Host Software provides the upper layers of the Bluetooth® protocol stack (above HCI, or optionally RFCOMM) - plus a large library of Profiles - providing a complete system software solution for embedded BlueCore applications. BCHS supports 1.2, 2.0+EDR and 2.1+EDR. Current qualified Profiles available with BCHS: A2DP,AVRCP,PBAP,BIP,BPP,CTP,DUN,FAX,FM API,FTP GAP,GAVDP,GOEP,HCRP,Headset,HF1.5,HID,ICP,JSR82,LAP Message Access Profile,OPP,PAN,SAP,SDAP,SPP,SYNC,SYNC ML.

 

Windows CE/Mobile

Windows CE is Microsoft's embedded operating system, which also supports Bluetooth. However, different stacks can be installed on windows CE devices, including Microsoft, Widcomm, and Toshiba, depending on the embedded device on which the OS is installed.

Windows Mobile (previously Pocket PC, PPC): Version 5.0 and newer (with AKU 2.0), thus far based on the Windows CE 5.0 kernel, fully support A2DP if an appropriate device is present.

There is a huge amount of debate on the forums as to what Bluetooth profiles Windows Mobile devices support.  Below is the list that we support natively in the Microsoft Stack in AKU 2.0 of Windows Mobile 5.0 and beyond:

Generic Access Profile (GAP)
Generic Object Exchange Profile (GEOP)
Serial Port Profile (SPP)
Dial-up Networking (DUN) Profile
Hands-Free Profile (HFP)
Headset Profile (HSP)
Human Interface Device (HID) Profile
Object Push Profile (OPP)
ActiveSync-Over-Bluetooth
Advanced Audio Distribution Profile (A2DP)
Audio/Video Remote Control Profile (AVRCP)

The confusion typically starts because it is up to to the OEM to choose which ones they implement or to add additional support for other profiles.

 

Symbian OS bluetooth profile (v9.2)

Symbian OS is an operating system for mobile phones, which includes a bluetooth stack. All phones based on Nokia's S60 platform and Sony Ericsson/Motorola's UIQ platform use this stack. The Symbian bluetooth stack runs in user mode rather than kernel mode, and has public APIs for L2CAP, RFCOMM, SDP, AVRCP, etc. Profiles supported in the OS include GAP, OBEX, SPP, AVRCP, GAVDP, PAN, PBAP.  Additional profiles supported in the OS + S60 platform combination include A2DP, HSP, HFP1.5, FTP, OPP, BIP, DUN, SIM access, device ID.

There are two kinds of profiles provided for by Symbian OS: implemented and supported. Implemented profiles can be used directly from the existing components. When a profile is supported the licensee will need to provide its own APIs to make the functionality of that profile available to application developers.

image

The above figure shows the dependencies of profiles. The shaded profiles are implemented by the Symbian OS Bluetooth subsystem.

Implemented Bluetooth profiles

The following profiles are implemented by Symbian OS Bluetooth:

  • Generic Access Profile (GAP)

  • Serial Port Profile (SPP)

  • Generic Object Exchange Profile (GOEP)

  • Personal Area Networking (PAN) Profile

  • Audio Video Remote Control Profile (AVRCP)

  • Generic Audio Video Distribution Profile (GAVDP)

 

Android (Cupcake)

Android bluetooth is based on BlueZ on Linux.  New kernel based on Linux 2.6.27.  However, the bluetooth API is not supported till v1.0 release.  Google promised it will support A2DP profile.  The tentative release cupcake supports A2DP and AVRCP profiles.

iphone OS

iphone OS is based on MAC OS X.  The only bluetooth device opens now is the bluetooth headset.  It is annoying!

2009年2月4日 星期三

如何在 Transport Stream 做 Data Service

 

Example 1: EPG

Propritary data service defined in DVB (T/C/S?)

 

Example 2: TPEG

Orginal based on RDS-TMC then use in DAB or DVB (particularly DVB-H, but not DVB-T?)

 

Example 3: IP over MPE

DVB-T/H/S uses MPE (multi-protocol encapsulation)

ESG?

How about DAB-IP ?

 

Moreover HTML or XML over TS?

 

Can use hardware to strip IP packets

DVB-H adds another MPE-FEC

Applications:

Data broadcasting for

for emergence

general information

How about advertisement?

html? (file type, no return channel)

追蹤者