[Igor] made a VU meter with LEDs using 8 LEDs and 8 comparators. This is a fast way to get one of 8 bits to indicate an input voltage, but that’s only the equivalent of a 3-bit analog to digital converter (ADC). To get more bits, you have to use a smarter technique, such as successive approximation. He shows a chip that uses that technique internally and then shows how you can make one without using the chip.
The idea is simple. You essentially build a specialized counter and use it to generate a voltage that will perform a binary search on an unknown input signal. For example, assuming a 5 V reference, you will guess 2.5 V first. If the voltage is lower, your next guess will be 1.25 V. If 2.5 was the low voltage, your next guess will be 3.75 V.
The process repeats until you get all the bits. You can do this with a microcontroller or, as [Igor] shows, with a shift register quite simply. Of course, you can also buy the whole function on a chip like the one he shows at the start of the video. The downside, of course, is the converter is relatively slow, requiring some amount of time for each bit. The input voltage also needs to stay stable over the conversion period. That’s not always a problem, of course.
If that explanation didn’t make sense, watch the video. An oscilloscope trace is often worth at least 1,000 words.
There are, of course, many ways to do such a conversion. Of course, when you start trying to really figure out how many bits of resolution you have or need, it gets tricky pretty fast.
Omw of those things I feel “I know all about” but didn’t really know how it worked.
I wonder how hard it would be to add a capture and hold circuit? Presumably that could be as simple as a capacitor you sample gently… Maybe even via a buffer.
The sample-and-hold circuits was one of the first things I learned in University, when I was learning about opamps.
Never used the knowledge anymore, because there are so many dedicated chips out there. ;) Even multiplexed ones.
And many of the microcontrollers I used have multiple analog inputs. But they have only one ADC, and the inputs are actually multiple sample-and-hold circuits, which are sampled serially one after another.
I need this to help me make decisions in my life. My binary searches tend to be weighted.
I submit that navigating through life is all about successive approximation… albeit without a sample-and-hold at your input.
Not new, of course … the Radio Shack Color Computer used successive comparison to read the joystick potentiometers.
Not old enough. My company used it in the late 70s and early 80s for geophysical data acquisition.
Comparators seem a little overkill for an LED VU meter.
I guess gone are the days of using a ladder of resistors to trigger a few transistors.
Or a ULN2803 (or actually ULN2801A) to keep things nice and compact. This was the first VU meter I built, an eon ago. I tried using Schmitt triggers, but it just didn’t look right.
“The input voltage also needs to stay stable over the conversion period.” This is where sample-and-hold circuitry comes into play at the analog input.
or lm3914 ..15..16..Uaa170 180 etc etc
I thought they were obsolete until a couple of weeks ago, but there seem to be plenty of sources.
“specialized counter” — Why not just use a standard counter and sweep the voltage range quickly? (Disclaimer: I’m a software guy, who probably is an idiot wrt hardware.)
By using a binary search the result can be found in only log2(n) iterations. On the other hand, your method would involve simpler hardware (no DAC required, just a ramp generator, comparator, and digital counter). I think this approach is called a Slope Converter and they have some advantages. A similar technique called a Dual Slope Converter is often used to make a digital voltmeter.
To make a direct software comparison, imagine using a reverse lookup table and, starting at the very beginning, having to test each entry one at a time until you found the right one. On the other hand, if the table is sorted then you would start in the middle and answer the question, “higher or lower?” and divide the range in half until you’ve tested all of your address bits.
When first Sound Blaster came out ADCs were still expensive so Creative build discrete SAR ADC to handle Microphone input with MC1408 DAC and LM393 comparator.
SB 2.0 (CT1350) re-engineered diagram https://www.vogons.org/viewtopic.php?p=1095522 , same deal with SB 1.5 (CT1320) clone Snark Barker.
This is not how “real” successive approximation works. For “real” successive approximation the input voltage is compared with a one bit DA converter (i.e half the reference voltage) and depending on the result half of the Vref is either subtracted or not from the value under test. The remaining signal is then amplified by two and fed back to the same comparator to get the next bit.
Or, at least, that was how it was done 40 years ago. The versions used in microcontrollers these days work with switching capacitors and dividing (collecting?) the charge on a capacitor.
R-2R DAC’s generally do not work very well because they are very sensitive for resistor tolerances. Simplified, for a 10 bit DAC (resolves one out of 1024) you need 0.1% resistors. For a 16-bit DAC you would need 1/65535 = 15ppm resistors. It’s possible with hand sorting, but not fit for integrating onto an IC. Also note this tolerance includes the inherent parasitic resistances such as wiring and the FET channel resistance.
@paulvdh said: “This is not how “real” successive approximation works. For “real” successive approximation the input voltage is compared with a one bit DA converter (i.e half the reference voltage) and depending on the result half of the Vref is either subtracted or not from the value under test. The remaining signal is then amplified by two and fed back to the same comparator to get the next bit.”
Well… arguably – yes. See here for one detailed step-by-step explanation:
Successive-Approximation ADC
https://en.wikipedia.org/wiki/Successive-approximation_ADC
A go-to reference on the SAR ADC is:
The Data Conversion Handbook, 2005 by Analog Devices Inc. (ADI)
You can freely download this 34,754 KB tome at the link below. This is a truly free download. You do not even need to enter your Email address!
The 2004 hardcover version of this book is 976 pages long, weighs 3.99 pounds, and costs $60.11-$98.22 USD used on Amazon:
https://www.amazon.com/Data-Conversion-Handbook-Analog-Devices/dp/0750678410
The Data Conversion Handbook, Edited by Walt Kester, Newnes, 2005, ISBN 0-7506-7841-0.
PDF version: By Analog Devices, Inc. 2004 (Walt Kester, Editor), ISBN-10 0-916550-27-3.
The Data Conversion Handbook is written for design engineers who routinely use data converters and related circuitry. Comprising Data Converter History, Fundamentals of Sampled Data Systems, Data Converter Architectures, Data Converter Process Technology, Testing Data Converters, Interfacing to Data Converters, Data Converter Support Circuits, Data Converter Applications, and Hardware Design Techniques, it may be the ultimate expression of product “augmentation” as it relates to data converters. The last chapter discusses practical issues, including common pitfalls and solutions related to the non-ideal properties of passive components.
The Analog-Digital Conversion book is available for download:
Chapter 1: Data Converter History (pdf)
Chapter 2: Fundamentals of Sampled Data Systems (pdf)
Chapter 3: Data Converter Architectures (pdf)
Chapter 4: Data Converter Process Technology (pdf)
Chapter 5: Testing Data Converters (pdf)
Chapter 6: Interfacing to Data Converters (pdf)
Chapter 7: Data Converter Support Circuitry (pdf)
Chapter 8: Data Converter Applications (pdf)
Chapter 9: Hardware Design Techniques (pdf)
Index (pdf)
Analog-Digital Conversion – zip file of entire book
https://www.analog.com/media/en/training-seminars/design-handbooks/Data-Conversion-Handbook/analog_digital_conversion.zip
Saved as: analog_digital_conversion.zip 34,754 KB