adc 4 bit using hsipce

25
EEE K57 | IC design | January 6, 2016 FLASH ADC 4 BIT IC DESIGN PROJECT TRN VIẾT NGHĨA NGÔ NHT QUANG INSTRUCTOR: NGUYỄN VŨ THNG

Upload: vn-tran

Post on 12-Apr-2017

83 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: ADC 4 bit using HSIPCE

EEE K57 | IC design | January 6, 2016

FLASH ADC 4 BIT IC DESIGN PROJECT

TRẦN VIẾT NGHĨA

NGÔ NHẬT QUANG

INSTRUCTOR: NGUYỄN VŨ THẮNG

Page 2: ADC 4 bit using HSIPCE

PAGE 1

CONTENTS

1.INTRODUCTION ..................................................................................................................................... 2

2. BASIC CONCEPT ................................................................................................................................... 2

2.1 input voltage range ............................................................................................................................... 2

2.2 resolution .............................................................................................................................................. 2

2.3 quantization .......................................................................................................................................... 2

2.4 Conversion Mode ................................................................................................................................. 3

2.5 ideal adc ................................................................................................................................................ 4

2.6 perfect ADc .......................................................................................................................................... 4

2.7 offset error ............................................................................................................................................ 5

2.8 gain error .............................................................................................................................................. 6

2.9 Full scale error ...................................................................................................................................... 8

3. DESIGN REQUIREMENT ..................................................................................................................... 8

4. THEORY DESIGN .................................................................................................................................. 9

FLASH CONVERTER ............................................................................................................................ 9

2 STAGE OPEN LOOP COMPARATOR ............................................................................................10

SIMPLE INVERTING COMPARATOR .................................................................................................10

COMPARATOR USING A DIFFERENTIAL AMPLIFIER ...................................................................11

TWO-STAGE COMPARATOR ..............................................................................................................13

BINARY ENCODER ..............................................................................................................................14

5. REAL DESIGN AND STIMULATION ................................................................................................15

FLASH CONVERTER .............................................................................................................................15

VOLTAGE REFERENCE ........................................................................................................................16

comparator .................................................................................................................................................16

15 4 ENCODER ........................................................................................................................................17

STIMULATION RESULT ........................................................................................................................18

PERFECT DIGITAL OUTPUT .............................................................................................................18

AT 5v -10oc ............................................................................................................................................18

AT 3v 100oc ...........................................................................................................................................21

6. COMMENT .............................................................................................................................................24

7. REFERENCES ........................................................................................................................................24

Page 3: ADC 4 bit using HSIPCE

PAGE 2

1.INTRODUCTION

An ADC is an electronic system or a module that has analog input, reference voltage input and digital

outputs. The ADC convert the analog input signal to a digital output value that represents the size of the

analog input comparing to the reference voltage. It basically samples the input analog voltage and produces

an output digital code for each sample taken

2. BASIC CONCEPT

2.1 INPUT VOLTAGE RANGE

The input voltage range of an ADC is determined by the reference voltage (VREF) applied to the ADC. A

reference voltage can be either internal voltage or external voltage by applying a voltage on an external pin

of the microcontroller. Generally reference voltage can be selected by configuring the corresponding

register’s bit field of the microcontroller. ADC will saturate with a analog voltage higher than the reference

voltage, so the designer must make sure that the analog input voltage does not exceed the reference voltage.

The input voltage range is also called as conversion range.

If ADC runs in signed mode (the mode produces signed output codes), it allows negative analog input

voltages. In such cases the analog input range is from –VREF to +VREF.

An ADC which accepts both positive and negative input voltages is called as bipolar ADC whereas an

ADC that accepts only positive input voltage is called as unipolar ADC.

2.2 RESOLUTION

The entire input voltage range (from 0V to VREF) is divided into a number of sub-ranges. Each sub range

is assigned a single output digital code. A sub range is also called LSB (least significant bits) and the

number of sub ranges is usually in powers of two. The total number of sub ranges is called the resolution of

the ADC. For an example, an ADC with eight LSBs has the resolution of three bits (23 = 8). If an ADC’s

resolution is three bits then it also means that the code width of the output is three bits.

2.3 QUANTIZATION

The LSB is determined if input analog voltage lies in the lowest sub-range of the input voltage range. For

example, consider an ADC with VREF as 2V and resolution as three bits. Now the 2V is divided into eight

sub-ranges, so the LSB voltage is within 250mV. Now an input voltage of 0V as well as 250mV is assigned

to the same output digital code 000. This process is called as quantization.

Page 4: ADC 4 bit using HSIPCE

PAGE 3

2.4 CONVERSION MODE

A conversion mode determines how the ADC processes the input and performs the conversion operation. A

standard ADC has basically two types of conversion modes.

1. Single ended conversion mode.

2. Differential conversion mode.

SINGLE ENDED CONVERSION MODE

In single ended conversion, only one analog input is taken and the ADC sampling and conversion is done

on that input. In single ended conversion ADC can be configured to operate in unsigned or signed

mode.The analog is connected to ADC has non-inverting(+) input and inverting(-) input which should be

differently connected under signed or unsigned mode.

For example in signed mode of operation, the single-ended input may be given to the non-inverting input of

the ADC and the inverting input of the ADC is grounded. In this case the reference voltage is from – VREF

to + VREF, which means it allows negative input voltages.

In unsigned single-ended mode, the single-ended input is given to the non-inverting input of the ADC as

before and the inverting input of the ADC is supplied with some fixed voltage value VFIXED which is

usually half of the reference voltage minus a fixed offset) as shown below. In this case the input voltage

range is from 0V to VREF, which means it does not allows negative input voltages.

Page 5: ADC 4 bit using HSIPCE

PAGE 4

DIFFERENTIAL CONVERSION MODE

In differential conversion mode, two analog inputs are taken and applied to the inverting and non-inverting

inputs of the ADC, either directly or after doing some amplification by selecting some programmable

amplification stages (gain amplifier stage). Differential conversions are usually operated in signed mode,

where the MSB of the output code acts as the sign bit. Also the reference voltage is from - VREF to

+VREF for signed mode.

2.5 IDEAL ADC

An ideal ADC is just a theoretical concept, and cannot be implemented in real life. It has infinite resolution,

where every possible analog input value gives a unique digital output from the ADC within the specified

conversion range. An ideal ADC can be described mathematically by a linear transfer function

2.6 PERFECT ADC

To define a perfect ADC, the concept of quantization must be used. Due to the digital nature of an ADC,

continuous output values are not possible. The perfect ADC performs the quantization process during

conversion. This results in a staircase transfer function where each step represents one LSB.

It is obvious that an input voltage of 0V produces an output code 000. At the same time, an input voltage of

250mV also produces the same output code 000. This explains the quantization error due to the process of

Page 6: ADC 4 bit using HSIPCE

PAGE 5

quantization. As the input voltage rises from 0V, the quantization error also rises from 0LSB and reaches a

maximum quantization error of 1LSB at 250mV. Again the quantization error increases from 0 to 1LSB as

the input rises from 250mV to 500mV.

This maximum quantization error of 1LSB can be reduced to ±0.5LSB by shifting the transfer function

towards left through 0.5LSB.

2.7 OFFSET ERROR

The offset error is defined as the deviation of the actual ADC’s transfer function from the perfect ADC’s

transfer function at the point of zero to the transition measured in the LSB bit.

When the transition from output value 0 to 1 does not occur at an input value of 0.5LSB, then we say that

there is an offset error. With positive offset errors, the output value is larger than 0 when the input voltage

is less than 0.5LSB from below. With negative offset errors, the input value is larger than 0.5LSB when the

first output value transition occurs. In other words, if the actual transfer function lies below the ideal line,

there is a negative offset and vice versa.

Page 7: ADC 4 bit using HSIPCE

PAGE 6

2.8 GAIN ERROR

The gain error is defined as the deviation of the last step’s midpoint of the actual ADC from the last step’s

midpoint of the ideal ADC, after compensated for offset error. After compensating for offset errors,

applying an input voltage of 0 always give an output value of 0. However, gain errors cause the actual

transfer function slope to deviate from the ideal slope. This gain error can be measured and compensated

for by scaling the output values.

Page 8: ADC 4 bit using HSIPCE

PAGE 7

If the transfer function of the actual ADC occurs above the ideal straight line, then it produces positive gain

error and vice versa. The gain error is calculated as LSBs from a vertical straight line drawn between the

midpoint of the last step of the actual transfer curve and the ideal straight line.

Page 9: ADC 4 bit using HSIPCE

PAGE 8

2.9 FULL SCALE ERROR

Full scale error is the deviation of the last transition (full scale transition) of the actual ADC from the last

transition of the perfect ADC, measured in LSB or volts. Full scale error is due to both gain and offset

errors.

3. DESIGN REQUIREMENT

Techique: 0.6um v

Vdd: 3 – 5V v

Vi : 0 -> 3V v

Accuracy: 3% v

Temperature: -10 , 100 (Celsius) v

Pspend: =< 1mW v

Frequency: >= 20MHz v

Page 10: ADC 4 bit using HSIPCE

PAGE 9

4. THEORY DESIGN

FLASH CONVERTER

Flash ADCs (sometimes called parallel ADCs) are the fastest type of ADC and use large numbers of

comparators. The input signal is applied to all the comparators at once, so the thermometer output is

delayed by only one comparator delay from the input, and the encoder N-bit output by only a few gate

delays on top of that, so the process is very fast. An N-bit flash ADC consists of 2N resistors and 2N –1

comparators arranged as in Figure Fig 1. Each comparator has a reference voltage which is 1 LSB higher

than that of the one below it in the chain. For a given input voltage, all the comparators below a certain

point will have their input voltage larger than their reference voltage and a “1” logic output, and all the

comparators above that point will have a reference voltage larger than the input voltage and a “0” logic

output.

The 2N –1 comparator outputs therefore behave in a way analogous to a mercury thermometer, and the

output code at this point is sometimes called a thermometer code. Since 2 N –1 data outputs are not really

practical, they are processed by a decoder to generate an N-bit binary output. The architecture uses large

numbers of resistors and comparators and is limited to low resolutions, and if it is to be fast, each

comparator must run at relatively high power levels. Hence, the problems of flash ADCs include limited

resolution, high power dissipation because of the large number of high speed comparators and relatively

large (and therefore expensive) chip sizes. In addition, the resistance of the reference resistor chain must be

kept low to supply adequate bias current to the fast comparators.

Page 11: ADC 4 bit using HSIPCE

PAGE 10

2 STAGE OPEN LOOP COMPARATOR

SIMPLE INVERTING COMPARATOR

Low gain ⇒ Poor resolution

VTRP = f (VDD )+ process parameters

Page 12: ADC 4 bit using HSIPCE

PAGE 11

COMPARATOR USING A DIFFERENTIAL AMPLIFIER

Gain is still low for a comparator

Page 13: ADC 4 bit using HSIPCE

PAGE 12

vP < vN

Assume vN is a fixed DC voltage

1. vO starts to decrease, M3-M4 mirror

is valid so that I1 = I2 = ISS/2 .

2. VOL' = vN - VGS2 + VDS2

when M2 becomes non-sat. we have

VDS2(sat) = VGS2 - VT so that

V OL' = vN - VT 2

3. For further decrease in vO, M2 is nonsat

and therefore the VGS2 can increase

allowing the sources of M1 and M2 to

fall(as vP falls)

4. Eventually M5 becomes non-sat and I5

starts to decrease to zero. M2 becomes a

switch and vO tracks VS2(VDS5) all the

way to VSS.

VOL = VSS.

vP > vN

1. Current in M1 increases and

current in M2 decreases.

2. Mirroring of M3-M4 will

cause vO to approach VDD .

3. VOH' = VDD - VDS4(sat)

VOH' = VDD - √(𝐈𝟒

𝛃𝟒)

VOH' = VDD - √(𝐈𝟓

𝐊𝐩 ′ (𝐖𝟒

𝐥𝟒))

VOH ' = VDD - √(𝐈𝟓

𝐊𝐩 ′ (𝐖𝟑

𝐥𝟑))

4. Finally, vO ‘ VDD causing the

mirror M3-M4 to no longer be

valid and

VOH ≈ VDD.

(I2 = I4 = 0 , I3 = I1 = I5)

Page 14: ADC 4 bit using HSIPCE

PAGE 13

TWO-STAGE COMPARATOR

Combine the differential amplifier stage with the inverter stage.

• Sufficient gain.

• Good signal swing

Page 15: ADC 4 bit using HSIPCE

PAGE 14

BINARY ENCODER

After minimized

x0 = c1 + c2 + c2'c3 + c4 + c8 + c3'c4'c6 + c2'c4'c6'c7 +

c2'c3'c4'c5 ;

x1 = c1 + c2 + c2'c3 + c4 + c5'c6'c7'c8'c12 +

c2'c3'c4'c5'c6'c7'c8'c9 + c3'c4'c5'c6'c7'c8'c10 +

c2'c4'c5'c6'c7'c8'c10'c11 ;

x2 = c1 + c2 + c3'c4'c6 + c3'c4'c7'c8'c11'c12'c14 + c2'c3'c4'c5 +

c2'c3'c4'c5'c6'c7'c8'c9 + c3'c4'c5'c6'c7'c8'c10 +

c2'c3'c4'c6'c7'c8’c10'c11'c12'c13 ;

x3 = c1 + c2'c3 + c2'c4'c6'c7 + c2'c4'c6'c8'c10'c12'c14'c15 +

c2'c3'c4'c5 + c2'c3'c4'c5'c6'c7'c8'c9 + c2'c4'c5'c6'c7'c8'c10'c11 +

c2'c3'c4'c6'c7'c8'c10'c11'c12'c13 ;

Page 16: ADC 4 bit using HSIPCE

PAGE 15

Logic to gates:

5. REAL DESIGN AND STIMULATION

FLASH CONVERTER

Page 17: ADC 4 bit using HSIPCE

PAGE 16

VOLTAGE REFERENCE

COMPARATOR

Page 18: ADC 4 bit using HSIPCE

PAGE 17

15 4 ENCODER

Page 19: ADC 4 bit using HSIPCE

PAGE 18

STIMULATION RESULT

PERFECT DIGITAL OUTPUT

AT 5V -10OC

Add all bits up

Page 20: ADC 4 bit using HSIPCE

PAGE 19

Power avanware:

Page 21: ADC 4 bit using HSIPCE

PAGE 20

Average consumption:

Accuracy

Page 22: ADC 4 bit using HSIPCE

PAGE 21

AT 3V 100OC

Accuracy

Page 23: ADC 4 bit using HSIPCE

PAGE 22

Power

Page 24: ADC 4 bit using HSIPCE

PAGE 23

Average consumption

Page 25: ADC 4 bit using HSIPCE

PAGE 24

6. COMMENT

The project in general is a successful one. We now can understand and modify the circuit to meet further

demands. In the period of researching for the project, we learned to accompany and do team work as well

as solving difficult situation that requires a lot of readings, a lot of calculations that we had not experienced

in solving problems in text books. We feel like we are ready to accept more challenge in further study and

more comprehensive project in the future

7. REFERENCES

1. Adel S. Sedra, Kenneth C. Smith Microelectronic Circuits 2009

2. ADC Performance Parameters - Convert the Units (Texas Instruments)

3. Design of a 1.5-V, 4-bit Flash ADC using 90nm Technology (International Journal of Engineering

and Advanced Technology)

4. Prof. Niknejad ‘s lecture about ADC design