Dual Slope Analog-to-Digital Converter

Analog-to-digital conversion has been increasingly important since the dawn of the digital era. There are actually dozens of different conversion techniques employed by electrical engineers, each with their own advantages and disadvantages.
The particular methodology used in this Demonstration is called dual slope; for a long time this was the primary mode of analog-to-digital conversion. Dual slope operates by using an integrator circuit to integrate the voltage signal for a specific length of time () and then integrate a reference voltage (±5 V) to get a linear slope toward 0 V, recording the amount of time it takes to get to 0 V from the first integration. The integration of the constant voltage creates a linear voltage ramp toward 0 V, so by recording the time it takes to get to 0 V from the last part of the integration of the signal, it gives you a value proportional to the top part of the integration of the signal (as with a linear voltage ramp, time is proportional to voltage). Although this gives you a time proportional to the voltage of the integration (because the first integration is for a constant duration every time and is relatively short), it also gives a value relatively proportional to the signal ().
In this Demonstration, the parts of the sine wave () that are integrated and the voltage created from the first integration itself are in red, and the constant slope downward is in blue.
The first integration goes from 0 V to some voltage () after integrating the voltage signal for a specific amount of time, then the second integration goes from that voltage () to 0 V with a constant, linear slope and records/outputs the length of time it takes to reach 0 V from .
The formula for how an op-amp integrator circuit works is , where is the resistance and is the capacitance. Integrating a constant voltage gives . Only a single-input signal is considered.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Dual slope is a spin-off of the simplest types of analog-to-digital conversion, as shown in the Demonstration "Analog-to-Digital Conversion Algorithm with a Single Slope". Single slope operates by using a capacitor to create a linear voltage ramp to compare the actual signal to, and then recording the time it takes the linear ramp to reach the signal (as it is a linear voltage ramp, the time it takes is linearly proportional to the voltage itself). The problem with single slope is that it uses a capacitor as its method of integration; this requires a very consistent capacitor that does not accumulate errors over time (drift), which is not only very difficult to do, but very expensive. Interestingly enough, dual slope fixes this problem by having the capacitors do two integrations, one after another rather than just one. First the integrator integrates the signal, then it integrates a constant voltage; because these integrations happen directly after one another, you can set them to be the same (the first one goes from 0 V to and the second goes from to 0 V) so you get . Because these integrations happen thousands of times per second, you can assume that the resistor and capacitor remain constant during one pair of integrations, so you can cancel the values on both sides. This makes dual slope very reliable with high fidelity, as it no longer depends very much on the fidelity of the capacitor (typically a very finicky component).
[1] P. Horowitz and W. Hill, The Art of Electronics, Cambridge: Cambridge University Press, 1998.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+