linux shell 中"2>&1″含義

原文 http://bowen.blog.51cto.com/136148/94406

0 代表鍵盤輸入
1 代表螢幕輸出
2 代表錯誤輸出


腳本是:
      nohup /mnt/Nand3/H2000G  >/dev/null  2>&1  &
      對於& 1 更準確的說應該是檔描述符 1,而1 一般代表的就是STDOUT_FILENO,實際上這個操作就是一個dup2(2)調用.他標準輸出到all_result ,然後複製標準輸出到檔描述符2(STDERR_FILENO),其後果就是檔描述符1和2指向同一個檔表項,也可以說錯誤的輸出被合併了.其中0 表示鍵盤輸入 1表示螢幕輸出 2表示錯誤輸出.把標準出錯重定向到標準輸出,然後扔到/DEV/NULL下面去。通俗的說,就是把所有標準輸出和標準出錯都扔到垃圾桶裡面。
      command >out.file  2>&1 &
      command >out.file是將command的輸出重定向到out.file檔,即輸出內容不列印到螢幕上,而是輸出到out.file文件中。 2>&1 是將標準出錯重定向到標準輸出,這裡的標準輸出已經重定向到了out.file檔,即將標準出錯也輸出到out.file文件中。最後一個& , 是讓該命令在後臺執行。
       
      試想2>1代表什麼,2與>結合代表錯誤重定向,而1則代表錯誤重定向到一個檔1,而不代表標準輸出;
換成2>&1,&與1結合就代表標準輸出了,就變成錯誤重定向到標準輸出.
 
      你可以用
            ls 2>1測試一下,不會報沒有2檔的錯誤,但會輸出一個空的檔1;
            ls xxx 2>1測試,沒有xxx這個檔的錯誤輸出到了1中;
            ls xxx 2>&1測試,不會生成1這個檔了,不過錯誤跑到標準輸出了;
            ls xxx >out.txt 2>&1, 實際上可換成 ls xxx 1>out.txt 2>&1;重定向符號>預設是1,錯誤和輸出都傳到out.txt了。
為何2>&1要寫在後面?
      command > file 2>&1
       首先是command > file將標準輸出重定向到file中, 2>&1 是標準錯誤拷貝了標準輸出的行為,也就是同樣被重定向到file中,最終結果就是標準輸出和錯誤都被重定向到file中。
      command 2>&1 >file
      2>&1 標準錯誤拷貝了標準輸出的行為,但此時標準輸出還是在終端。>file 後輸出才被重定向到file,但標準錯誤仍然保持在終端。
 
用strace可以看到:
1. command > file 2>&1
這個命令中實現重定向的關鍵系統調用序列是:
open(file) == 3
dup2(3,1)
dup2(1,2)
 
2. command 2>&1 >file
這個命令中實現重定向的關鍵系統調用序列是:
dup2(1,2)
open(file) == 3
dup2(3,1) 
張貼在 程式 | 發表留言

UART – Universal Asynchronous Receiver and Transmitter

UART – Universal Asynchronous Receiver and Transmitter

By: WW Kong

RH2T Magazine Vol.3, Dec 2010

Were you ever disheartened when you ran out of ideas interfacing your microcontroller with PC? Well, not anymore as UART, despite being one of the pioneers in communication protocol happens to be one of the solutions

1.0 Introduction

The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications subsystem of a computer. UART is also a common integrated feature in most microcontrollers. The UART takes bytes of data and transmits the individual bits in a sequential fashion. At the destination, a second UART re-assembles the bits into complete bytes. Serial transmission of digital information (bits) through a single wire or other medium is much more cost effective than parallel transmission through multiple wires. Communication can be “full duplex” (both send and receive at the same time) or “half duplex” (devices take turns transmitting and receiving).

2.0 The Asynchronous Receiving and Transmitting Protocol

Asynchronous transmission allows data to be transmitted without the sender having to send a clock signal to the receiver. In this case, the sender and receiver must agree on timing parameters (Baud Rate) prior transmission and special bits are added to each word to synchronize the sending and receiving units. In asynchronous transmission, the sender sends a Start bit, 5 to 8 data bits (LSB first), an optional Parity bit, and then 1, 1.5 or 2 Stop bits.

When a word is passed to the UART for asynchronous transmissions, the Start bit is added at beginning of the word. The Start bit is used to inform the receiver that a word of data is about to be send, thereby forcing the clock in the receiver to be in sync with the clock in the transmitter. It is important to note that the frequency drift between these two clocks must not exceed 10%. In other words, both the transmitter and receiver must have identical baud rate.

After the Start bit, the individual bits of the word of data are sent, beginning with the Least Significant Bit (LSB). When data is fully transmitted, an optional parity bit is sent to the transmitter. This bit is usually used by receiver to perform simple error checking. Lastly, Stop bit will be sent to indicate the end of transmission.

When the receiver has received all of the bits in the data word, it may check for the Parity Bits (both sender and receiver must agree on whether a Parity Bit is to be used), and then the receiver searches for a Stop Bit. If the Stop Bit does not appear when it is supposed to, the UART considers the entire word to be garbled and will report a Framing Error to the host processor when the data word is read. Common reason for the occurrence of Framing Error is that the sender and receiver clocks were not running at the same speed, or that the signal was interrupted.

UART Basic UART packet format: 1 Start bit, 8 data bits, 1 Parity bit and 1 Stop bit

Every operation of the UART hardware is controlled by a clock signal which runs at much faster rate than the baud rate. For example, the popular 16450 UART has an internal clock that runs 16 times faster than the baud rate. This allows the UART receiver to sample the incoming data with granularity of 1/16 the baud-rate period and has greater immunity towards baud rate error.

The receiver detects the Start bit by detecting the voltage transition from logic 1 to logic 0 on the transmission line. In the case of 16450 UART, once the Start bit is detected, the next data bit’s “center” can be assured to be 24 ticks minus 2 (worse case synchronizer uncertainty) later. From then on, every next data bit center is 16 clock ticks later.

uart receiver Data sampling point by the UART receiver

Transmitting and receiving UARTs must be set at the same baud rate, character length, parity, and stop bits for proper operation. The typical format for serial ports used with PC connected to modems is 1 Start bit, 8 data bits, no Parity and 1 Stop bit.

3.0 The Physical Layer Standards

So far, we have discussed the software protocol of the UART. How about the physical layer standards? There are actually quite a number of different standards that utilizes similar protocol. For instances, TTL level UART, RS-232, RS-422, RS-485 and etc. We will only discuss about TTL level UART and RS-232 in this article.

3.1 TTL level UART

Most microcontrollers with UART uses TTL (Transistor-transistor Logic) level UART. It is the simplest form of UART. Both logic 1 and 0 are represented by 5V and 0V respectively.

Logic

Voltage

Low

0V

High

5V

Voltage level for TTL level UART

The TTL level UART is commonly used in the communications between microcontrollers and ICs. Only 2 wires are required for the full duplex communications as illustrated in the picture below.

Between devices

 UART Communication Between 2 devices

3.2 RS-232

RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a Data Terminal Equipment (DTE) and a Data Communication Equipment (DCE). It is commonly used in computer serial ports. One of the significant differences between TTL level UART and RS-232 is the voltage level. Valid signals in RS-232 are ±3 to – ±15V, and signals near 0V is not a valid RS-232 level.

Logic

Voltage

Low

+3 to +15V

High

-3 to -15V

Voltage level for RS-232

722px-Rs232_oscilloscope_trace.svg RS-232 voltage level for data 0x4B with 1 start bit, 8 data bits and 1 stop bit

Besides voltage level, the RS-232 also has a few extra pins specifically designed for the communication between PC and modem. The pinouts of the DB-9 and their functions are shown below.

pinouts.serial Pinouts of a serial port

Name

Pin

Description

Transmitted Data (TxD)

3

Serial data output
Received Data (RxD)

2

Serial data input
Request to Send (RTS)

7

This line informs the DCE (Modem) that the DTE (PC) is ready to exchange data
Clear to Send (CTS)

8

This line indicates that the DCE is ready to exchange data
Data Terminal Ready (DTR)

4

Asserted by DTE to indicate that it is ready to be connected
Data Set Ready (DSR)

6

Asserted by DCE to indicate the DCE is powered on and is ready to receive commands or data for transmission from the DTE
Data Carrier Detect (DCD)

1

Asserted by DCE when a connection has been established with remote equipment
Ring Indicator (RI)

9

Asserted by DCE when it detects a ring signal from the telephone line

Pinouts and description of a serial port

4.0 Interfacing between TTL level UART and RS-232

From previous discussions, we know that microcontrollers make use of TTL level UART while the PC serial port uses RS-232. Since both standards uses similar software protocol, both of them are able to communicate via UART. However, because of the differences in voltage level and polarity, we will need a level shifter to interface the TTL level UART with the RS-232. Nowadays, this can be easily done with the commonly available IC such as the MAX232 from Maxim.

RS232-UART Example of interfacing microcontroller to PC serial port

5.0 Summary

In short, UART is the simplest form of communication between microcontroller and PC. However, due to the mushrooming growth of technology, serial port is slowly being replaced by other means of communication port. Nevertheless, serial communication is still possible even without a physical serial port on your PC. For example, the USB can be treated as a serial port after the signal from microcontroller is converted using the USB to RS-232 converter. In order to gain more understanding on this converter, feel free to refer to the USB to UART converter (UC00A) from Cytron as it is a readily available device that provides communication between UART and USB via the USB to RS-232 converter. If you have any inquiry, please do come to our technical forum to discuss :)

UC00A - 1 USB to UART converter (UC00A) from Cytron.

張貼在 Uncategorized | 發表留言

PCB之介電常數及鋪銅厚度

介電常數(dielectric constant ),又稱電容率, 簡稱 , 。介電常數除了由電介質本身的性質決定外﹐一般還與介質的溫度及電磁場變化的頻率有關。        而介電材料為電容器兩導板間之絕緣材料, 於製作PCB常用之PP絕緣體(即Prepreg黏合片,是Pre-pregnant的英文縮寫), 因其使用材質及型號不同, 而有不同介質常數, 若您有實際需求, 可洽詢我司業務專員.
鋪銅厚度 鋪銅之厚度與線寬一樣, 會影響到PCB實際之載流能力, PCB走線越寬, 載流能力越大, 而相對的鋪銅越厚, 其載流能力也越大. 以下提供一般常用銅厚&線寬之電流對應表: (僅供參考)

銅厚 1.0 oz=35um 銅厚 1.5 oz=50um 銅厚 2.0 oz=70um
線寬 (mil) 電流 (A) 線寬 (mil) 電流 (A) 線寬 (mil) 電流 (A)
    100     4.5     100     5.1     100     6
    80     4     80     4.3     80     5.1
    60     3.2     60     3.5     60     4.2
    48     2.7     48     3     48     3.6
    40     2.3     40     2.6     40     3.2
    32     2.0     32     2.4     32     2.8
    24     1.6     24     1.9     24     2.3
    20     1.35     20     1.7     20     2
    16     1.1     16     1.35     16     1.7
    12     0.8     12     1.1     12     1.3
    8     0.55     8     0.7     8     0.9
    6     0.2     6     0.5     6     0.7
  • 以上數據為一般常溫25℃以下之線路電流承載值.
  • 單位換算: 1mm=39.37mil (此表以40mil做換算)
  • 其它單位換算, 請參考FAQ常見問答集 .

一般於Layout設計時,採用之標準值 為 1.0 oz銅皮/40 Mil線寬可承受1 A 電流; 換言之,1.0 oz銅皮/20 Mil線寬可承受0.5 A 電流; 2.0 oz銅皮/40 Mil線寬可承受2 A 電流。   以上僅供參考, 謝謝.

張貼在 Uncategorized | 發表留言

電子產品的ESD防護如何選擇TVS

電子產品的ESD防護如何選擇TVS — 經由TLP量測2012/04/26

 晶焱科技 設計研發部 姜信欽副總

  消費性電子產品如PC、NB、手機,由於產品趨向小型化設計且積體電路內部電子元件微小化已進展到奈米的尺寸,如果沒有選擇合適的保護元件,可能會使電子產品容易遭受靜電放電(ESD)的衝擊而造成系統重置、當機甚至損壞。目前消費性電子產品也都必需通過IEC 61000-4-2的靜電放電測試要求。TVS (Transient Voltage Suppressor) 便是專門設計用於吸收ESD能量並且保護系統免於遭受ESD損害的保護元件,因此如何選擇適當的TVS以提高電子產品的ESD耐受度便成為一個重要的課題。TVS保護元件的工作原理如附圖一所示,TVS在線路板上是與被保護線路並聯的,當ESD瞬間高電流的衝擊下,TVS能夠即時導通提供給瞬時電流一個超低電阻通路,此時ESD的瞬時電流與能量便經由TVS所引開,然而TVS是否能夠對被保護線路提供有效地保護功能除了須考慮TVS在ESD衝擊下的導通速度是否夠快,更須要考慮TVS導通後箝制電壓 (Clamping Voltage) 是否夠低,來避免被保護線路受到ESD的衝擊而造成訊號的干擾所引發系統重置、當機甚至損傷。因此,在ESD衝擊下,TVS導通後的Clamping Voltage高低便是選擇TVS效能的一項重要指標。

 

  如何量測到TVS在ESD衝擊下的Clamping Voltage呢? 傳輸線脈衝產生系統(Transmission Line Pulsing System, TLP System)便是一有效地量測工具。TLP System最早是由英特爾(Intel Corporation)的T.J. Maloney所提出來,架構圖如附圖二所示,其主要功能為進行待測元件在短時間、高電流情況下之電壓-電流特性量測。此短時間係指奈秒(ns)等級,高電流係指安培(A)等級。而在此短時間、高電流情況下之電壓-電流特性,即模擬待測元件在ESD發生時的電壓-電流響應。因此,以TLP System來量測TVS保護元件,從量測到的電壓-電流特性便可以預測在ESD衝擊下,TVS的導通電壓(Turn-on Voltage)及導通後的Clamping Voltage。TVS的Turn-on Voltage越低代表導通速度越快,Clamping Voltage越低代表TVS的保護效果越好。附圖三為利用TLP System所量測各種TVS的電壓-電流特性。從圖中可比較各種TVS的Turn-on Voltage以及TVS導通後的Clamping Voltage高低。
 
   晶焱科技是目前國內唯一能完整推出全系列防靜電IC的廠商,ESD防護能力上可滿足消費性電子產品標準(IEC 61000-4-2第4級)的要求。在TVS的設計上是全方位的考量,在ESD衝擊下,不僅具有高的ESD耐受度、快速地導通速度,更具有目前業界最低的Clamping Voltage,能提供電子產品最高的ESD防護效能。
 

 附圖一

附圖二

   

 附圖三

 
張貼在 Uncategorized | 發表留言

Rated Operational/Insulation Voltage

詳加說明如下:

>RATED OPERATIONAL VOLTAGE:440V
>RATED OPERATIONAL CURRENT:16A

表示在440V電壓,電流在16A以下時,
開關可以正常工作,不會斷開。

>THERMAL CURRENT:20A
電流超過20A時會熱跳脫,切斷開關。

>RATED INSULATION VOLTAGE : 690V
額定絕緣電壓:690V
所使用的電壓不可超過690V,
否則會導致絕緣破壞

>RATED IMPULSE Withstand Voltage:6kV
額定脈衝承受電壓:6000V
瞬間電壓大於6000V會破壞開關,
即使只有1微秒。

>Conditional Short-circuit Current :1000A
失效短路電流:1000A
當短路電流超過1000A時,
將會破壞內部接點,造成無法切斷電流。

這表示,在線路上的電阻至少需要
R=V/I=440V/1000A=0.44Ω

才不致在短路時電流超過1000A而使開關失去保謢作用。

阿信~

張貼在 Uncategorized | 發表留言

Open-Drain/Push-Pull

【open-drain与push-pull】

GPIO的功能,简单说就是可以根据自己的需要去配置为输入或输出。但是在配置GPIO管脚的时候,常会见到两种模式:开漏(open-drain,漏极开路)和推挽(push-pull)。

对此两种模式,有何区别和联系,下面整理了一些资料,来详细解释一下:

 

图表 1 Push-Pull对比Open-Drain

Push-Pull推挽输出 Open-Drain开漏输出
原理 输出的器件是指输出脚内部集成有一对互补的MOSFET,当Q1导通、Q2截止时输出高电平;而当Q1截止导通、Q2导通时输出低电平 开漏电路就是指以MOSFET的漏极为输出的电路。指内部输出和地之间有个N沟道的MOSFET(Q1),这些器件可以用于电平转换的应用。输出电压由Vcc’决定。Vcc’可以大于输入高电平电压VCC(up-translate)也可以低于输入高电平电压VCC(down-translate)。
某老外的更加透彻的解释 Push-pull输出,实际上内部是用了两个晶体管(transistor),此处分别称为top transistor和bottom transistor。通过开关对应的晶体管,输出对应的电平。top transistor打开(bottom transistor关闭),输出为高电平;bottom transistor打开(top transistor关闭),输出低电平。Push-pull即能够漏电流(sink current),又可以集电流(source current)。其也许有,也许没有另外一个状态:高阻抗(high impedance)状态。除非Push-pull需要支持额外的高阻抗状态,否则不需要额外的上拉电阻。 Open-drain输出,则是比push-pull少了个top transistor,只有那个bottom transistor。(就像push-pull中的那样)当bottom transistor关闭,则输出为高电平。此处没法输出高电平,想要输出高电平,必须外部再接一个上拉电阻(pull-up resistor)。Open-drain只能够漏电流(sink current),如果想要集电流(source current),则需要加一个上拉电阻。
常见的GPIO的模式可以配置为open-drain或push-pull,具体实现上,常为通过配置对应的寄存器的某些位来配置为open-drain或是push-pull。当我们通过CPU去设置那些GPIO的配置寄存器的某位(bit)的时候,其GPIO硬件IC内部的实现是,会去打开或关闭对应的top transistor。相应地,如果设置为了open-d模式的话,是需要上拉电阻才能实现,也能够输出高电平的。因此,如果硬件内部(internal)本身包含了对应的上拉电阻的话,此时会去关闭或打开对应的上拉电阻。如果GPIO硬件IC内部没有对应的上拉电阻的话,那么你的硬件电路中,必须自己提供对应的外部(external)的上拉电阻。而push-pull输出的优势是速度快,因为线路(line)是以两种方式驱动的。而带了上拉电阻的线路,即使以最快的速度去提升电压,最快也要一个常量的R×C的时间。其中R是电阻,C是寄生电容(parasitic capacitance),包括了pin脚的电容和板子的电容。但是,push-pull相对的缺点是往往需要消耗更多的电流,即功耗相对大。而open-drain所消耗的电流相对较小,由电阻R所限制,而R不能太小,因为当输出为低电平的时候,需要sink更低的transistor,这意味着更高的功耗。(此段原文:because the lower transistor has to sink that current when the output is low; that means higher power consumption.)而open-drain的好处之一是,允许你cshort(?)多个open-drain的电路,公用一个上拉电阻,此种做法称为wired-OR连接,此时可以通过拉低任何一个IO的pin脚使得输出为低电平。为了输出高电平,则所有的都输出高电平。此种逻辑,就是“线与”的功能,可以不需要额外的门(gate)电路来实现此部分逻辑。
原理图 图表 2 push-pull原理图 <ignore_js_op>image001.png

2011-08-06 21:24 上传

下载附件 (3.26 KB)

图表 3 open-drain原理图 <ignore_js_op>image003.jpg

2011-08-06 21:24 上传

下载附件 (6.31 KB)

图表 4 open-drain“线与”功能 <ignore_js_op>image004.jpg

2011-08-06 21:24 上传

下载附件 (23.55 KB)

优点 (1)可以吸电流,也可以贯电流;(2)和开漏输出相比,push-pull的高低电平由IC的电源低定,不能简单的做逻辑操作等。 (1) 对于各种电压节点间的电平转换非常有用,可以用于各种电压节点的Up-translate和down-translate转换 (2)可以将多个开漏输出的Pin脚,连接到一条线上,形成与逻辑关系,即线与功能,任意一个变低后,开漏线上的逻辑就为0了。这也是I2C,SMBus等总线判断总线占用状态的原理。(3)利用 外部电路的驱动能力,减少IC内部的驱动。当IC内部MOSFET导通时,驱动电流是从外部的VCC流经R pull-up ,MOSFET到GND。IC内部仅需很下的栅极驱动电流。(4)可以利用改变上拉电源的电压,改变传输电平:图表 5 open-drain输出电平的原理 <ignore_js_op>image006.jpg

2011-08-06 21:24 上传

下载附件 (15.39 KB)

IC的逻辑电平由电源Vcc1决定,而输出高电平则由Vcc2决定。这样我们就可以用低电平逻辑控制输出高电平逻辑了。

缺点 一条总线上只能有一个push-pull输出的器件; 开漏Pin不连接外部的上拉电阻,则只能输出低电平。当输出电平为低时,N沟道三极管是导通的,这样在Vcc’和GND之间有一个持续的电流流过上拉电阻R和三极管Q1。这会影响整个系统的功耗。采用较大值的上拉电阻可以减小电流。但是,但是大的阻值会使输出信号的上升时间变慢。即上拉电阻R pull-up的阻值 决定了逻辑电平转换的沿的速度 。阻值越大,速度越低功耗越小。反之亦然。
特点 在CMOS电路里面应该叫CMOS输出更合适,因为在CMOS里面的push-pull输出能力不可能做得双极那么大。输出能力看IC内部输出极N管P管的面积。push-pull是现在CMOS电路里面用得最多的输出级设计方式。

 

 

 

【open-drain和push-pull的总结】

对于GPIO的模式的设置,在不考虑是否需要额外的上拉电阻的情况下,是设置为open-drain还是push-pull,说到底,还是个权衡的问题:

如果你想要电平转换速度快的话,那么就选push-pull,但是缺点是功耗相对会大些。

如果你想要功耗低,且同时具有“线与”的功能,那么就用open-drain的模式。(同时注意GPIO硬件模块内部是否有上拉电阻,如果没有,需要硬件电路上添加额外的上拉电阻)

正所谓,转换速度与功耗,是鱼与熊掌,二则不可兼得焉。

 

 

 

【MOS管的分类】

图表 6 MOS管分类

MOS JFET(结型场效应管)
MOSFET(金属绝缘栅型场效应管) N(Negative)沟道 增强型
耗尽型
P(Positive)沟道 增强型
耗尽型

 

 

MOSFET是在JFET基础上发展起来的,两者结构上存在一些差异,但使用方法和特点基本类似。

 

 

 

【MOS管和三极管的比较】

图表 7 MOS管和三极管的比较

MOS 三极管
控制方式 电压控制器件 电流控制器件
输入阻抗 特别高 相对小
输出电阻 驱动能力强 相对大
截止频率
通过电流能力 功率大,要找一个小电流的MOS很不容易
稳定性 可以工作在极高的频率下 相对不好
击穿电压 非常容易受静电影响,管脚不用的话一定要接地或者接电源。 有些管脚不用的话,把脚悬空都问题不大
易用性 不好 用法要稍微复杂一点,比如P沟道的MOS管,需要负电压来控制,相对三极管中的PNP管,明显要复杂得多。 电子初学者中熟悉三极管用过三极管的要远远多于熟悉MOS管的,小功率塑封三极管比如9000系列,8050,8550之类的非常容易买到,而且价格便宜,在信号放大和简单开关方面都用得很多,也非常方便。
总结 现在的集成电路多半使用MOS为基础

 

 

 

【三极管,PNP,NPN】

P是positive阳极,N是negative阴极;

P极中空穴多显正极性,N极中电子多显负极性;

PNP和NPN就是三级管的叠放次序,P和N靠在一起会形成PN结,所以三极管中会有两个PN结,所以又称为双极结晶体管。

 

 

 

【场效应管与三极管】

场效应管和三极管的功能、作用一样,可以用于放大、振荡、开关电路。

N沟道场效应管和NPN三极管类似,工作条件是在栅极加正向极性控制电压,在漏极加正极性电源电压,改变栅极电压就可以改变漏极与源极之间的电流大小。

P沟道场效应管和PNP三极管类似,工作条件是在栅极加负极性控制电压,在漏极加负向极性电源电压,改变栅极电压就可以改变漏极与源极之间的电流大小。

目前应用比较广泛的是N沟道场效应管,就像三极管NPN型应用比较多一样。

 

 

 

【参考资料】

1. question: push-pull or open-drain mode

http://www.edaboard.com/thread97365.html

 

2. open-drain and push-pull

http://blog.21ic.com/user1/2873/archives/2008/49225.html

 

3. Open drain & push pull 原理(转)

http://blog.csdn.net/asdfasdfhhh/article/details/4289514

 

4. 谁能告诉我三极管,mos管和mosfwt到底怎么区分啊??

http://zhidao.baidu.com/question/102122419.html

 

5. MOSFET和三极管的主要区别

http://blog.ednchina.com/cym_anhui/99752/message.aspx

 

6. 场效应管和三极管的NPN, PNP是什么意思,他们在电路中有什么作用

http://zhidao.baidu.com/question/234717192.html?pt=dwso_1_pg

 

7. 教你通俗易懂的理解三极管

http://bbs.dianyuan.com/index.php?do=tech_info_show&cate_id=0&id=11970&page=2

 

8. 场效应管的工作条件,通俗易懂点!最好类比三极管NPN和PNP以及N沟道和P沟道的

http://zhidao.baidu.com/question/115497382.html?fr=qrl&cid=86&index=3

 

9. The difference in open-drain and push-pull

http://www.electro-tech-online.com/general-electronics-chat/5535-difference-open-drain-push-pull.html

 

10. Open drain and push-pull

http://www.motherboardpoint.com/open-drain-and-push-pull-t89968.html

張貼在 Uncategorized | 發表留言

Intergrator/Differentiator

電 子 學 實 驗 室

【微分器與積分器】

          


(一)微分電路:


(二)積分電路:

關於RC電路充放電:

電子電路實驗室  東海大學物理系  東海大學

地址:40704台中市西屯區台中港路三段181號東海大學Box803物理系 電話:04-23590121-32100 傳真:04-23594643 如果您對東海大學物理系有任何建議,請與我們連絡,謝謝。

張貼在 Uncategorized | 發表留言

鋰電池充電電流時間的計算

由於電池容量會隨著尺寸的不同,而有所不同,如同水塔一樣,體積越大,內容物也就越多,只是一個是儲電另一個是儲水,故需制定一常用術語,以資區別,一般以C泛稱充電/放電電流大小。
________________________________________

*1C定義為該電池容量於1小時內放完電,所需的電流大小,如:
700mAh的電池,其1C即為700mAh / 1h = 700mA 500mAh的電池,1C即為500mAh / 1h = 500mA。
________________________________________

*同理,知道1C的值後,可進一步計算出0.2C/0.5C/0.7C/2C…等的值,如1C=700mA,則0.2C = 0.2 x 700mA = 140mA。
________________________________________

*一般而言,充電電流的大小不宜超過0.7C,以0.5C為最適條件。
________________________________________

*充電時間與充電電流呈反比,充電時間的估算如下式:
1C充電時間 = 1/1 + 0.7 = 1.7 (小時)
0.5C充電時間 = 1/0.5 + 0.5 = 2.5 (小時)
0.2C充電時間 = 1/0.2 + 0.33 = 5.33 (小時)

張貼在 Uncategorized | 發表留言

美國線規AWG尺寸對照表

電流承載能力取決於絕緣體種類,電流和應用,電線的大小是基於電流而不是電壓。 NEC (National Electrical Code) 代碼用家用交流電源線,其他一般都是直流,但應該大致相同。
American

Wire

Gauage

(AWG #)

直徑

公制(mm)   Diameter (mm)

直徑

英制(inch)   Diameter (inch)

截面積

(mm2)

Maximum Amps   for Chassis Wiring

(A)

Maximum Amps   for Power Transmission

(A)

OOOO(4/0)

11.684

0.46

107

380

302

OOO(3/0)

10.40384

0.4096

85.0

328

239

OO(2/0)

9.26592

0.3648

67.4

283

190

0

8.25246

0.3249

53.5

245

150

1

7.34822

0.2893

42.4

211

119

2

6.54304

0.2576

33.6

181

94

3

5.82676

0.2294

26.7

158

75

4

5.18922

0.2043

21.2

135

60

5

4.62026

0.1819

16.8

118

47

6

4.1148

0.162

13.3

101

37

7

3.66522

0.1443

10.5

89

30

8

3.2639

0.1285

8.37

73

24

9

2.90576

0.1144

6.63

64

19

10

2.58826

0.1019

5.26

55

15

11

2.30378

0.0907

4.17

47

12

12

2.05232

0.0808

3.31

41

9.3

13

1.8288

0.072

2.62

35

7.4

14

1.62814

0.0641

2.08

32

5.9

15

1.45034

0.0571

1.65

28

4.7

16

1.29032

0.0508

1.31

22

3.7

17

1.15062

0.0453

1.04

19

2.9

18

1.02362

0.0403

0.823

16

2.3

19

0.91186

0.0359

0.653

14

1.8

20

0.8128

0.032

0.518

11

1.5

21

0.7239

0.0285

0.410

9

1.2

22

0.64516

0.0254

0.326

7

0.92

23

0.57404

0.0226

0.258

4.7

0.729

24

0.51054

0.0201

0.205

3.5

0.577

25

0.45466

0.0179

0.162

2.7

0.457

26

0.40386

0.0159

0.129

2.2

0.361

27

0.36068

0.0142

0.102

1.7

0.288

28

0.32004

0.0126

0.0810

1.4

0.226

29

0.28702

0.0113

0.0642

1.2

0.182

30

0.254

0.01

0.0509

0.86

0.142

31

0.22606

0.0089

0.0404

0.7

0.113

32

0.2032

0.008

0.0320

0.53

0.091

33

0.18034

0.0071

0.0254

0.43

0.072

34

0.16002

0.0063

0.0201

0.33

0.056

35

0.14224

0.0056

0.0160

0.27

0.044

36

0.127

0.005

0.0127

0.21

0.035

37

0.1143

0.0045

0.0100

0.17

0.0289

38

0.1016

0.004

0.00797

0.13

0.0228

39

0.0889

0.0035

0.00632

0.11

0.0175

40

0.07874

0.0031

0.00501

0.09

0.0137

表格中的數據包括各種導線的阻抗和允許電流大小(安培)。表中的直徑數值適用於實心電線。雙絞線應當根據銅線橫截面面積進行計算。下面的表格適用於直流情況,或者頻率小於等於60赫茲的情況,也沒有考慮集膚效應

AWG 直徑 面積 阻抗
(inch) (mm) (kcmil) (mm²) (Ω/km) (Ω/kFT)
0000 (4/0) 0.46 11.684 212 107 0.1608 0.04901
000 (3/0) 0.4096 10.404 168 85 0.2028 0.0618
00 (2/0) 0.3648 9.266 133 67.4 0.2557 0.07793
0 (1/0) 0.3249 8.252 106 53.5 0.3224 0.09827
1 0.2893 7.348 83.7 42.4 0.4066 0.1239
2 0.2576 6.544 66.4 33.6 0.5127 0.1563
3 0.2294 5.827 52.6 26.7 0.6465 0.197
4 0.2043 5.189 41.7 21.2 0.8152 0.2485
5 0.1819 4.621 33.1 16.8 1.028 0.3133
6 0.162 4.115 26.3 13.3 1.296 0.3951
7 0.1443 3.665 20.8 10.5 1.634 0.4982
8 0.1285 3.264 16.5 8.37 2.061 0.6282
9 0.1144 2.906 13.1 6.63 2.599 0.7921
10 0.1019 2.588 10.4 5.26 3.277 0.9989
11 0.0907 2.305 8.23 4.17 4.132 1.26
12 0.0808 2.053 6.53 3.31 5.211 1.588
13 0.072 1.828 5.18 2.62 6.571 2.003
14 0.0641 1.628 4.11 2.08 8.286 2.525
15 0.0571 1.45 3.26 1.65 10.45 3.184
16 0.0508 1.291 2.58 1.31 13.17 4.016
17 0.0453 1.15 2.05 1.04 16.61 5.064
18 0.0403 1.024 1.62 0.823 20.95 6.385
19 0.0359 0.912 1.29 0.653 26.42 8.051
20 0.032 0.812 1.02 0.518 33.31 10.15
21 0.0285 0.723 0.81 0.41 42 12.8
22 0.0253 0.644 0.642 0.326 52.96 16.14
23 0.0226 0.573 0.509 0.258 66.79 20.36
24 0.0201 0.511 0.404 0.205 84.22 25.67
25 0.0179 0.455 0.32 0.162 106.2 32.37
26 0.0159 0.405 0.254 0.129 133.9 40.81
27 0.0142 0.361 0.202 0.102 168.9 51.47
28 0.0126 0.321 0.16 0.081 212.9 64.9
29 0.0113 0.286 0.127 0.0642 268.5 81.84
30 0.01 0.255 0.101 0.0509 338.6 103.2
31 0.00893 0.227 0.0797 0.0404 426.9 130.1
32 0.00795 0.202 0.0632 0.032 538.3 164.1
33 0.00708 0.18 0.0501 0.0254 678.8 206.9
34 0.0063 0.16 0.0398 0.0201 856 260.9
35 0.00561 0.143 0.0315 0.016 1079 329
36 0.005 0.127 0.025 0.0127 1361 414.8
37 0.00445 0.113 0.0198 0.01 1716 523.1
38 0.00397 0.101 0.0157 0.00797 2164 659.6
39 0.00353 0.0897 0.0125 0.00632 2729 831.8
40 0.00314 0.0799 0.00989 0.00501 3441 1049
張貼在 Uncategorized | 發表留言

SMD電阻額定功率

晶片電阻 Chip Resistor
型號 0402 0603 0805 1206
尺寸 inch 0.04L*0.02W 0.06L*0.03W 0.08L*0.05W 0.12L*0.06W
額定功率 1/16W 1/10W 1/8W 1/4W
溫度係數 200ppm/℃ 200ppm/℃ 200ppm/℃ 200ppm/℃
額定電壓 50V 50V 150V 200V
過載電壓 100V 100V 300V 400V
溫度範圍 -55℃–+125℃ -55℃–+125℃ -55℃–+125℃ -55℃–+125℃
零阻電流 1Amp 1Amp 1Amp 2Amp
阻值誤差 F/G/J F/G/J F/G/J F/G/J

晶片電阻

      Chip Resistor
型號          0201                  2010                2512        0402 0603 0805 1206 2010 2512
尺寸 inch  0.02L*0.01W      0.2L*0.1W        0.25L*0.12W        0.04L*0.02W 0.06L*0.03W 0.08L*0.05W 0.12L*0.06W 0.2L*0.1W 0.25L*0.12W
額定功率    1/20W                1/2W               1W        1/16W 1/10W 1/8W 1/4W 1/2W 1W
溫度係數        200ppm/℃ 200ppm/℃ 200ppm/℃ 200ppm/℃ 200ppm/℃ 200ppm/℃
額定電壓        50V 50V 150V 200V 200V 200V
過載電壓        100V 100V 300V 400V 400V 400V
溫度範圍        -55℃–+125℃ -55℃–+125℃ -55℃–+125℃ -55℃–+125℃ -55℃–+125℃ -55℃–+125℃
零阻電流        1Amp 1Amp 1Amp 2Amp 2Amp 2Amp
阻值誤差        F/G/J F/G/J F/G/J F/G/J F/G/J F/G/J
張貼在 Uncategorized | 發表留言