Sunteți pe pagina 1din 6

SIMULATION OF ADC AND DAC CIRCUITS

(ALTERNATIVE COURSEWORK TO RFID HARDWARE TESTING)


DEADLINE 17 APRIL 2020

1. INTRODUCTION

The last part of the coursework was supposed to be the building, testing and demonstration of
an actual RFID reader board, worth 13% of your total module mark. As this is no longer
possible due to the coronavirus outbreak, instead of that you are now required to submit a
report on the simulation of (a) a 3-bit flash ADC and (b) a 3-bit resistor-string DAC, as
described in this document.

The report should contain a very brief introduction, the screenshots of the captured circuits
and the simulations results, QUANTITATIVE explanations of the results, and conclusions.
The length should be between 1000 and 1500 words.

BEFORE YOU DO ANY SIMULATION, YOU SHOULD THOROUGHLY FAMILIARISE


YOURSELF WITH ADC/DAC THEORY, AND ESPECIALLY THAT OF THE FLASH
ADC AND THE RESISTOR-STRING DAC. You should see the following documents,
available on 'GCULearn / Learning Resources / A/D and D/A Conversion Processes':

- For a basic summary of general ADC/DAC theory, see "adc-dac basic summary.pdf".

- For the flash ADC see "Floyd Ch13 - Introduction to Digital Signal Processing.pdf".
HOWEVER, NOTE THAT THE FLASH ADC PRESENTED THERE USES
QUANTISATION BY TRUNCATION WHILE THE ONE YOU WILL SIMULATE
USES QUANTISATION BY ROUNDING. THE DIFFERENCE IS THAT IN YOUR
CASE, THE FIRST RESISTOR IS 0.5 R AND THE LAST ONE IS 1.5 R, INSTEAD OF
BEING ALL THE SAME VALUE R.

- For the resistor-string DAC see "The Art of Electronics 3rd ed [2015] (Horowitz &Hill)
CH13 - Digital meets Analog.pdf" (section 13.2.1).

2. SIMULATION OF A 3-BIT FLASH ANALOGUE-TO-DIGITAL CONVERTER

(a) Capture in Multisim the 3-bit flash ADC shown in figure 1. The key components are
listed in Table 1.

Table 1 - Main components for the circuit of figure 1


Database Group Family Component
Master Database Analog ANALOG_VIRTUAL COMPARATOR_IDEAL
Master Database CMOS CMOS_5 4532BD_5V
Master Database Sources POWER_SOURCES V_REF1
Master Database Sources SIGNAL_VOLTAGE_SOURCES DC_INTERACTIVE_VOLTAGE
Master Database Sources POWER_SOURCES VCC
Master Database Sources POWER_SOURCES GROUND
Vin

Vref 8.0V

V: --
V
R8 U7
15kΩ

R7 U6
10kΩ

VCC
4V R6 U5
10kΩ 5.0V
U9
V1 5 EIN
4 I7
R5 U4 3 I6
I5 EOUT
Key = A 10kΩ 2
1 I4 GS
15
14
13 I3
12 I2 O2 6
11 I1 O1 7
10 I0 O0 9
R4 U3
10kΩ 4532BD_5V

R3 U2
10kΩ

R2 U1
10kΩ

R1
5kΩ

Fig. 1 - 3-bit flash ADC

(b) Double-click on the variable voltage source 'V1' and set the maximum value to 8 V, and
the increment to 2.5% (corresponding to 0.2 V). Also double-click on the reference
voltage and set it to 8 V. Change the font size of the voltage probe text box to 12
(double-click on the text box and then on the Appearance tab).

Note: To hide the name of each of the comparators, double click on it, then on the
Display tab, and uncheck Show values. To show the Probes toolbar, on the main menu,
click View > Toolbars > Place probe. To reduce clutter on the probes, click the 'gear'
icon on the toolbar and select Instantaneous only. To hide the probe names on the digital
probes, double click on them and select Hide RefDes.

(c) Run an interactive simulation. By pressing 'A' or 'shift-A' on your keyboard, you can
increase or decrease the input voltage. You can see the so-called 'thermometer code' at
the output of the comparators go up and down. The priority encoder changes this to
straight binary code. Check that the output code corresponds to the input voltage
according to the formulas from theory.

Note: VREF is 8 V, and 1 LSB = (VREF / 2N ) = (8 / 23 ) = 1 V. As in this version of the


circuit the quantisation is done by rounding, the first transition happens at 0.5 LSB (=
0.5 V), and every 1 LSB increment thereafter. (See "adc-dac basic summary.pdf".)

(d) Take a representative screenshot of the simulation working (with READABLE VALUES
in the digital and voltage probes) and include it in your report, along with a
QUANTITATIVE explanation.

3. SIMULATION OF A 3-BIT RESISTOR-STRING DIGITAL-TO-ANALOGUE


CONVERTER

Vref 8.0V
VCC
5.0V
R17
10kΩ S8

+ -
R16
S7
10kΩ

+ -
R15
S6
10kΩ

+ -
R14
S5
10kΩ

+ - OPAMP_3T_VIRTUAL
R13
S4 U10
10kΩ V
V: --
+ -
R12
S3
10kΩ
VCC
+ -
5.0V R11
S2
10kΩ

+ -
R10
10kΩ S1
S11 S10 S9

Key = 2 Key = 1 Key = 0 + -

R3 R2 R1
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7

10kΩ 10kΩ 10kΩ U8


DCD_3TO8
~G
A
B
C

B2 B1 B0

Fig. 2 - 3-bit resistor-string DAC

(a) Open a new design and capture the 3-bit resistor-string DAC shown in figure 2. The key
components are listed in Table 2. (You need to increase the sheet size: right-click on the
sheet, then on the Workspace tab and change the sheet size to 'B'.)

Note: The values of Ron and Roff for the voltage-controlled SPST switches need to be
changed. Double click on the part and then click on the Value tab. Enter "0.0001 m" for
Ron and "10000M" for Roff. You can do this with the first one, and then just copy and
paste it seven times using [Ctrl-C] and [Ctrl-V].
Table 2 - Main components for the circuit of figure 2
Database Group Family Component
Master Database Analog ANALOG_VIRTUAL OPAMP_3T_VIRTUAL
Master Database Misc Digital TIL DCD_3TO8
Master Database Basic SWITCH VOLTAGE_CONTROLLED_SPST
Master Database Basic SWITCH SPST
Master Database Sources POWER_SOURCES V_REF1
Master Database Sources SIGNAL_VOLTAGE_SOURCES DC_INTERACTIVE_VOLTAGE
Master Database Sources POWER_SOURCES VCC
Master Database Sources POWER_SOURCES GROUND

(b) Double-click on the reference voltage and set it to 8 V. Change the font size of the
voltage probe text box to 12 (double-click on the text box and then on the Appearance
tab).

Note: To show the Probes toolbar, on the main menu, click


View > Toolbars > Place probe. To reduce clutter on the probes, click the 'gear' icon on
the toolbar and select Instantaneous only. To hide the probe names on the digital probes,
double click on them and select Hide RefDes.

(c) Run an interactive simulation. Use the switches to set a binary value for the input code
and check that the value of the output voltage agrees with the formulas from theory.
VREF is 8 V, and 1 LSB change in the input code corresponds to a voltage change of
(VREF / 2N ) = (8 / 23 ) = 1 V.

(d) Take a representative screenshot of the simulation working (with READABLE VALUES
in the digital and voltage probes) and include it in your report, along with a
QUANTITATIVE explanation.

4. SIMULATION OF THE ADC AND THE DAC TOGETHER

(a) Open a new design, change the sheet size to 'B', and then copy and paste the previous
two designs (the ADC and the DAC) and connect them together as shown in figure 3, so
that the output of the ADC will be driving the input of the DAC (delete the three DAC
input switches).

(b) Change the font size of the voltage probe text box to 22 (double-click on the text box and
then on the Appearance tab).

(c) Start an interactive simulation. As you increase the voltage on the variable voltage source
(using the 'A' key), you will see that the input voltage of the ADC changes in a
continuous way, but the output voltage of the DAC changes in discrete steps, as it is
quantised. The output voltage of the DAC should be the same as the ADC input voltage,
but rounded to the closest integer, as the ADC uses quantisation by rounding.
(d) Take a representative screenshot of the simulation working (with READABLE NON-
ZERO VALUES in the two voltage probes) and include it in your report, along with a
QUANTITATIVE explanation.

Vin

V: 0 V
Vref 8.0V V Vref 8.0V

VCC
5.0V
R8 U7 R17
15kΩ 10kΩ S8
0

+ -
R7 U6 R16
S7
10kΩ 0 10kΩ 1

+ -
VCC
R6 U5 R15
5.0V S6
10kΩ 0 10kΩ 1

U9
0V EIN
5 + -
4 I7
R5 U4 3 I6 R14
V1 I5 EOUT S5
10kΩ 0
2
1 I4 GS
15
14 0 10kΩ 1

Key = A 13 I3
12 I2 O2 6
11 I1 O1 7 0 OPAMP_3T_VIRTUAL
I0 O0 + -
10 9
R4 U3 R13
4532BD_5V S4 U10
10kΩ 0
0
10kΩ 1
V

+ -
R3 U2 R12
S3
10kΩ 0 10kΩ 1
V: 0 V
+ -
R2 U1 R11
S2
10kΩ 0 10kΩ 1

+ -
R1 R10
10kΩ S1
5kΩ 1

+ -

Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
U8
DCD_3TO8

~G
A
B
C

Fig. 3 - ADC and DAC connected together

5. OBTAINING THE TRANSFER FUNCTION OF THE ADC

(a) Open a new design, change the sheet size to 'B', and then copy and paste the previous
design (the combined ADC+DAC).

(b) As shown in figure 4, replace the variable voltage source with a piecewise linear voltage
source. The details of this part are in Table 3.

Table 3 - Details for the piecewise linear voltage source


Database Group Family Component
Master Database Sources SIGNAL_VOLTAGE_SOURCES PIECEWISE_LINEAR_VOLTAGE

(c) The piecewise linear voltage source will be used to produce a ramp voltage: a linearly
increasing input voltage to the ADC. Double-click on the part and then click on the
Value tab, and set the second row in the table (the first should be zeros) to Time = 0.008
and Voltage = 8. This means that the input voltage to the ADC will go from 0 to 8 V in
8 ms.

(d) Name (by double-clicking on them) the traces for the ADC input voltage and the DAC
output voltage as "Vin" and "Vo", respectively.
(e) Set up a transient analysis, with TSTART = 0, TSTOP = 0.008 and TMAX = 1e-05. On the
Output tab, remove all the signals from the Digital graph box, and leave the two voltage
probe signals in the Analog graph box.

Vref 8.0V V Vref 8.0V

VCC
5.0V
R8 U7 R17
15kΩ 10kΩ S8

+ -
Vin R7 R16
U6
S7
10kΩ 10kΩ

+ -
VCC
R6 U5 R15
5.0V S6
10kΩ 10kΩ
U9
V2 5 EIN
+ -
4 I7
R5 U4 3 I6 R14
I5 EOUT S5
10kΩ 2
1 I4 GS
15
14
10kΩ
13 I3
12 I2 O2 6
11 I1 O1 7 OPAMP_3T_VIRTUAL
I0 O0 + -
10 9
R4 U3 R13
4532BD_5V S4
10kΩ 10kΩ Vo V

+ -
U10
R3 U2 R12
S3
10kΩ 10kΩ

+ -
R2 U1 R11
S2
10kΩ 10kΩ

+ -
R1 R10
10kΩ S1
5kΩ

+ -

Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
U8
DCD_3TO8

~G
A
B
C

Fig. 4 - Circuit for obtaining the ADC transfer function

(f) Run the simulation. You should get a graph similar to figure 5. Take a screenshot of the
circuit and the graph and include them in your report, along with and EXPLANATION
OF THE GRAPH.

Fig. 5 - ADC transfer function

S-ar putea să vă placă și