Hochschule Kempten      
Fakultät Elektrotechnik      
Interface Electronics       Fachgebiet Elektronik, Prof. Vollrath      

Interface Electronics

Laboratory 02: LTSPICE DAC analysis instructions

Prof. Jörg Vollrath

Start 9.11.2026


Overview

This is a laboratory to simulate sample and hold circuit and binary weighted DAC errors.
Since Breadboard circuits controlled by an Ardino are used the following assumptions are made.
Each sample and hold pulse is tsample=20us.
VDD = 3.3V.
Csample = 50pF.
The circuits are using a CD4007 transistor model.

8 Bit ADC DAC Test Starting Point


The schematic shows a 8-bit ADC DAC System.
Download the circuit.
This is the starting point for this laboratory.
Implement the circuit and simulate a ramp and a sine signal. Extract INL, DNL and SNR.

SH Investigation


The schematic SignalTest.asc shows operational amplifier and sample and hold circuit connected in series.
The SH circuit SampleHold.asc uses CD4007 transistors.
C1 and R5 are parasitic elements.
Measure INL, DNL and FFT of Vin, V1, V2 and Vout.
Investigate the impact of sampling time, C1 and R5 to INL, DNL and SNR.
GroupIdentifierBoxLab 02GroupIdentifierBoxLab 02
A11***87 LT1C1=0.1pF, R5=300kB11***16 SJ11C1=0.1pF, R5=200k
A12***13 GA1C1=0.1pF, R5=300kB12***49 TG11C1=0.1pF, R5=200k
A21***17 KC2C1=0.1pF, R5=100kB21***87 SH12C1=0.1pF, R5=400k
A22***83 AI2C1=0.1pF, R5=100kB22***51 PN12C1=0.1pF, R5=400k
A31***98 DG3C1=0.05pF, R5=100kB31***93 AM13C1=0.05pF, R5=200k
A32***08 BS3C1=0.05pF, R5=300kB32***66 SA13C1=0.05pF, R5=200k
A41***86 MN4C1=0.05pF, R5=100kB41***22 LG14C1=0.05pF, R5=400k
A42***02 RM4C1=0.05pF, R5=100kB42***33 TG14C1=0.05pF, R5=400k
A51***60 SS5C1=0.5pF, R5=100kB51***68 AP15C1=0.5pF, R5=200k
A52***06 AF5C1=0.5pF, R5=300kB52***36 SS15C1=0.5pF, R5=200k
A61***22 PL6C1=0.5pF, R5=100kB61***07 DM16C1=0.5pF, R5=400k
A62***14 MV6C1=0.5pF, R5=100kB62***28 MM16C1=0.5pF, R5=400k
A71***11 BA7C1=1pF, R5=300kB71***08 DM17C1=1pF, R5=200k
A72***64 ST7C1=1pF, R5=300kB72***62 PV17C1=1pF, R5=200k
A81***28 MH8C1=1pF, R5=100kB81***xx XX18C1=1pF, R5=400k
A82***28 MH8C1=1pF, R5=100kB82***xx XX18C1=1pF, R5=400k
A91***xx XX9B91***xx XX19
A92***xx XX9B92***xx XX19
AA1***xx XX10BA1***xx XX20
AA2***9A JV10BA2***9B JV20
This switch SampleHold.asc is used in the SignalTest.asc circuit.
Putting this circuit at the output of the 8Bit_ADC_DAC_pipe.asc allows investigation of INL, DNL and SNR along the signal chain.

Adjust the control signals accordingly.
Extract the simulated values with Read Raw File .
Document and discuss INL and DNL values.

Simulate a sine signal test (Periods: 11,111,251,499,1111,3919).
Extract the simulated values with Read Raw File .
Calculate FFT values.
Document and discuss FFT, INL, DNL and SNR values.

Finding the impact of R5 and C1 on INL, DNL and SNR requires a lot of simulations.
Reasonable values of R and C can be found starting with a series of values using a factor of 10: 1f, 10f, 100f, 1p.
Interval search can help too: 1f, 10p, 0.1p and then either 10f or 1p.
Multiple students working together can improve productivity.

SH Error Theory

OpAmp
Voltage follower
Switch
CLK coupling
SampleHold
C1
Switch
RC
SampleHold
R5
\( \frac{V_{out}}{V_{in}}=\frac{1}{1+\frac{1}{v(f)}} \) \( dV = VDD \frac{1}{(1+\frac{C_S}{C_1})} \) t > RC (B+1) ln(2)
A pulsed ramp test.

The accuracy of the voltage follower is dependent on the voltage gain which is depending on the frequency.
\( \frac{V_{out}}{V_{in}} = \frac{1}{1+\frac{1}{v(0.1 \cdot f_t)}} = \frac{1}{1+\frac{1}{10}} = \frac{1}{1.1} = 0.9 \)
The CLK signals couples to the sample and hold voltage.
The switch on time limits the possible voltage swing with the RC time constant.

A sine signal test can have worse SNR results for higher frequencies.
A normal ramp signal test has small step size and will only show CLK coupling.
A pulsed ramp test with 0V or VDD between consecutive cycles can show all the error contributions.

Sample and Hold Simulation


The analog signal V(in1y) (red) is the input to a DAC after a switch between signal and GND. Control signal sampley coupling can be seen.
V(out) is the signal after the ADC, DAC combination going into the signal chain measurement.
V(v1) (green) shows the operational amplifier limit of 500ns rise/fall time.
V(V2) (blue) shows the RC (R5=50k) time constant of the switch and the sampling capacitance Cs=50pF and the coupling of V(sample) via C1=1pF. V(sample1) creates a short spike.
V(voutx) (pink) shows the same time constant at the output.
For a given circuit only the pulse time for the switch and the sampling capacitance can be varied.
The maximum sampling capacitance is limited by the drive capability of the operational amplifier.

Acquisition has to be controlled via the start, stop, step parameters.

For the example picture above a zero output is followed by the required level.
The step period is 160E-6
Sampling is controlled via the start parameter assuming the change of V(v1) happens at 0ns:
V(in1y, red) can be sampled during the second half of the period start: 0..80E-6
V(v1, green) can be sampled 10us later during the second half of the period start: 10..90E-6
V(v2, blue) can be sampled 20us later during the second half of the period and switch ctrl signal is high again, switch is open start: 40..120E-6
Preferable before the next switch is activated: 50E-6.
V(voutx) can be sampled 80us later during the second half of the period: 120E-6.

A full documentation needs:
rampV(node)startstopstep INL min, maxDNL min, maxFile
name
327.68m
327.68m rtz
sine frequencysine
periods
V(node)startstopstep Signal
magnitude
Total
noise
magnitude
Harmonics Total
noise
magnitude
without
harmonics
File
name
16.7846679687511

8-Bit R2R DAC Schematic

Investigate Errors in the R values of the 8 Bit R2R Circuit.
Download the circuit.
Add it to the 8 Bit ADC DAC set up.
Simulate a ramp test and a sine test.
Change R(last digit) by 50% and look at INL, DNL and SNR.

4. 8-Bit cyclic R2R DAC Schematic


The schematic shows a 8-bit cyclic R2R DAC.
The Resolution can be scaled up with a fixed number of control lines.
Download the circuit.
Add it to the 8 Bit ADC DAC set up.
Simulate a ramp test and a sine test.

Use individual R,C values for sample and hold circuit.

Extract the simulated values with Read Raw File .
Document and discuss INL and DNL values.

Simulate a sine signal test.
Extract the simulated values with Read Raw File .
Calculate FFT values.
Document and discuss FFT, INL, DNL and SNR values.

Please submit via email to joerg.vollrath@hs-kempten.de until 30.11.2026 a report covering this laboratory.



Deliverables

8_BitADC_DAC_pipe circuit with SignalTest circuit:
Signal investigation: Vin, V1,V2,Vout
Ramp, ramp with RTZ and sine signal (111, 1111 periods).

8_BitADC_DAC_pipe circuit with ScaleR2RDACa (SignalTest) circuit:
Signal investigation: Vin, V1,V2,Vout
Ramp, ramp with RTZ and sine signal (111, 1111 periods).

32 simulations 15 min each for a group of 2.

Please submit via email to joerg.vollrath@hs-kempten.de until 30.11.2026 a report covering this laboratory.


Additional Information

Video Instructions LTSPICE ADC DAC Test Circuit

This video presents the download and run of LTSPICE files.
Search for "Vollrath InEl"
Open LTSPICE presentation.
Go to "Scalable behavioral 4 Bit DAC", "Scalable behavioral 4 Bit ADC", "Test for 4 Bit ADC and DAC" slides and download circuits (.asc) and (.asy) presented to you after clicking on the circuit.
Run the sine simulation and view V(in1),V(out).
Create a pulse voltage source:
V1 in1 0 PULSE(0 1 0 655.36u 655.36u 0 1310.72u)
Run a ramp simulation.

Duration 10:52 min

01:20: : Download schematics for schematics
04:10: : Download symbols for 4Bit_ADC_DAC_pipe.asc, 4Bit_ADC_pipe.asc, 4Bit_DAC_pipe.asc, sample_hold.asc, Switch.asc,WS2011_Prob4.asc
05:00: : Sine input
05:35: : Output signal
06:30: : LTSPICE FFT
07:30: : Ramp
09:35: : Voltage source

Video Instructions LTSPICE INL, DNL FFT Analysis

This video presents the analysis of LTSPICE simulation files.
Run the ADC DAC test simulation in LTSPICE with a ramp.
Extract the simulated values with Read Raw File .
Use analysis buttons to:
  • Show extracted values
  • Map values to integers
  • DAC INL, DNL analysis
  • ADC histogram analysis
Run the ADC DAC test simulation in LTSPICE with a sine signal.
Extract the simulated values with Read Raw File .
Use the integer values for a FFT analysis.

How can you extract only less 16*1024 values?
Describe the changes in the FFT results?

Duration 13:48 min

00:28: : Read LTSPICE raw data
04:15: : Start time 0, Stop time 655.36E-6, Time step: 40.96E-6
04:58: : First data
05:50: : Map to integer
06:25: : DNL INL graph
07:13: : Histogram with smaller step size 5.12E-6
08:10: : Map to integer
08:42: : ADC histogram analysis
09:20: : Simulate sine
09:50: : Read data values
11:05: : Histogramm test
11:40: : Copy values
12:00: : ADC FFT Javascript, Fill input data field, read integer values
12:50: : SNR 11.87-(-13.89) dB = 25.76 dB  ENOB = (15.76-1.76)/6.02 = 4
13:16: : Sine histogram INL and DNL

Simulation R2R DAC


The schematic shows a 4-bit R2R DAC.
We will use it in the ADC DAC simulation to see some errors.
Create a symbol and hook it up to the ADC DAC test circuit from last week.
Modify the resistance values. For example 1.5k, 2.5k, 1.3k, 1.7k.
Simulate a ramp test.
Extract the simulated values with Read Raw File .
Calculate INL, DNL with any tool. Document and discuss INL and DNL values.

Simulate a sine signal test.
Extract the simulated values with Read Raw File .
Calculate FFT, INL, DNL with FFT webpage and paste the extracted values from LTSPICE into the input field.
Document and discuss FFT, INL, DNL and SNR values.


Duration 6:34 min

00:34: : Include R2R DAC
01:52: : Simulate real R2R DAC
02:23: : Modify R values: R6 1.3k, R9 1.5k
03:16: : Read, mapto integer, copy values to FFT, process
04:29: : SNR 12.09-(-6.75) dB = 18.84 dB
04:55: : Ramp test
05:28: : Step 40.96E-6
06:07: : INL and DNL with error

Video Instructions LTSPICE .Measurement

This video presents the analysis of LTSPICE simulation files with a .measure statement.
Run the ADC DAC test simulation in LTSPICE with a ramp.
Insert SPICE directive:
.meas trans OUT00 FIND V(vout) AT=81.92us
After simulation "View","SPICE Error log" will show the result.
Multiple measurement statements can be placed into a file.
After simulation "File","Execute .MEAS script" generates the results.
A 10-bit data converter should have about 16384 measurement values. Data extraction can be difficult and quite time consuming.

Duration 5:55 min

00:44: Measurement statement
01:35: First measurement statement: .meas trans OUT00 FIND V(vout) at t=20.48u
05:20: .meas script