Successive approximation register ADC

Homebrew Circuit Explores The Mysteries Of Analog-to-Digital Conversion

When it comes to getting signals from an analog world into our computers, most of us don’t give much thought to how the hardware that does the job works. But as it turns out, there are a number of ways to skin the analog to digital conversion cat, and building your own homebrew successive approximation register ADC is a great way to dispel some of the mystery.

From his description of the project, it’s clear that [Mitsuru Yamada] wasn’t looking to build a practical ADC, but was more interested in what he could learn by rolling his own. A successive approximation register ADC works by quickly cycling through all possible voltage levels in its input range, eventually zeroing in on the voltage of the input signal at that moment and outputting its digital representation. The video below shows how the SAR ADC works visually, using an oscilloscope to show both the input voltage and the output of the internal R-2R DAC. The ADC has an input range of 0 V to 5 V and seven bits of resolution and uses nothing but commonly available 74xx series logic chips and a couple of easily sourced analogs for the sample-hold and comparator section. And as usual with one of his projects, the build quality and workmanship are impeccable.

We love these sorts of projects, which are undertaken simply for the joy of building something and learning how it works. For more of [Yamada-san]’s projects, check out his 6502-based RPN calculator, or the serial terminal that should have been.

Continue reading “Homebrew Circuit Explores The Mysteries Of Analog-to-Digital Conversion”

Raspberry Pi Pico ADC Characterized

[Markomo] didn’t find much useful information about the Raspberry Pi PIco’s analog to digital converter, so he decided to do some tests to characterize it. Lucky for us, he documented the findings and shared them. The results are in a series of blog posts that cover power supply noise, input-referred noise, signal to noise ratio, and distortions.

There are some surprising results. For example, the Pico’s low noise regulator mode appears to produce more noise than having it set for normal operation. There also appears to be a large spike in nonlinearity around certain measurements.

Continue reading “Raspberry Pi Pico ADC Characterized”

A Complete Raspberry Pi Power Monitoring System

As the world has become more environmentally conscious, we’ve seen an uptick in projects that monitor or control home energy use. At a minimum one of these setups involves a microcontroller and some kind of clamp-on current sensor, but if you’re looking for resources to take things a bit farther, this Raspberry Pi energy monitoring system created by [David00] would be a great place to start.

This project includes provides software and hardware to be used in conjunction with the Raspberry Pi to keep tabs on not just home energy consumption, but also production if your home has a solar array or other method of generating its own power. Data is pulled every 0.5 seconds from a MCP3008 ADC connected to up to five six current sensors to provide real-time utilization statistics, and visualized with Grafana so you can see all of the information at a glance.

While [David00] has already done the community a great service by releasing the hardware and software under an open source license, he’s also produced some absolutely phenomenal documentation for the project that’s really a valuable resource for anyone who wants to roll their own monitoring system. He’s even offering hardware kits for anyone who’s more interested in experimenting with the software side of things than building the PCB.

Home energy monitoring projects are certainly nothing new, but the incredible advances we’ve seen in the type of hardware and software available for DIY projects over the last decade has really pushed the state-of-the-art forward. With so many fantastic resources available now, the only thing standing between you and your own home energy monitoring dashboard is desire and a long weekend.

When Is A 10-bit A/D An 8-bit A/D?

Marketing guys love bigger numbers. Bigger is better, right? After all, Subway called it a “footlong” not an 11-incher. So when it comes to analog to digital (A/D) conversion, more bits are better, right? Well, that depends. It is easy to understand that an A/D will have a low and high measurement and the low will be zero counts and the high will result in the maximum count for the number of bits. That is, an 8-bit device will top out at 255, a 10-bit at 1023, and so on.

The question is: are those bits meaningful? The answer depends on a few factors. Like most components we deal with, our ideal model isn’t reality, but maybe it is close enough.

Continue reading “When Is A 10-bit A/D An 8-bit A/D?”

8-Channel ADC For The Raspberry Pi

The Raspberry Pi is a powerful embedded computing platform. However, for all its Linux-based muscle, it lacks one thing that even the simplest 8-bit microcontrollers usually have – analog-to-digital conversion. There are a great many ways to rectify this shortcoming, and [Chris Burgess] has brought us another – with an 8-channel ADC for the Raspberry Pi.

For the ADC, [Chris] chose the MCP3008, for its low cost and availability. In this configuration it offers 10-bit resolution and a maximum sampling rate of 200 kilosamples per second. Adafruit has a great guide on working with the MCP3008, too. With such a useful resource to hand, [Chris] was able to spin up a PCB to interface the chip to the Raspberry Pi using SPI. [Chris] took care to try to make the board to the official HAT specifications. As far as the physical aspects go, the board is to spec, however [Chris] omitted the EEPROM required for auto-configuration purposes. That said, the pads are on the board if someone wants to take the initiative to install one.

It’s a tidy build that provides something sorely missing from the Raspberry Pi, for a reasonable cost. [Chris]’s goal was to build something that would enable the measurement of analog sensors for a robot project; we’d love to hear your ideas for potential uses in the comments!

Get To Know 3½ Digit ADCs With The ICL71xx

Riffling through my box of old projects, I came upon a project that I had built in the 80’s — an Automotive Multimeter which was published in the Dutch/British Elektor magazine. It could measure low voltage DC, high current DC, resistance, dwell angle, and engine RPM and ran off a single 9V battery. Besides a 555 IC for the dwell and RPM measurement and a couple of CMOS gate chips, the rest of the board is populated by a smattering of passives and a big, 40 pin DIP IC under the 3½ digit LCD display. I dug some more in my box, and came up with another Elektor project from back then — a True RMS digital Wattmeter with a 3½ digit LCD display that could measure up to 2kW. It had the same chip too. Some more digging, and I found a digital panel meter. This had a 7 segment LED display, but the chip was again from the same family.

ICL7107 LED version
ICL7107 LED version

Look under the hood of any device with a 3½ or 4½ digit, 7 segment, LCD or LED from the ’80’s or ’90’s and you will likely spot this 40-pin DIP with the Intersil logo (although it was later also manufactured by many other fabs; Harris and Maxim among others). The chip doing all the heavy-lifting was likely to be the ICL7106 or ICL7107. These devices were described as high performance, low power, 3½ digit A/D converters containing seven segment decoders, display drivers, voltage reference and clock. In short, everything you needed to take a DC analog signal and display it. Over time, a whole series of devices were spawned:

  • 7106 – 3½ digit, 7 segment LCD
  • 7107 – 3½ digit, 7 segment LED
  • 7116 – 3½ digit, 7 segment LCD, with display HOLD (freeze)
  • 7117 – 3½ digit, 7 segment LED, with display HOLD (freeze)
  • 7126 – improved 7106
  • 7136 – improved 7126
  • 7135 – 4½ digit, 7 segment LCD

There were many similar devices available, but the ICL71xx series was by far one of the most popular, due to its easy of use, low parts count and single chip implementation. Here are several parts (linking to PDF datasheets) to illustrate my point: the TC14433/A needed several peripheral devices, ES5107 (a clone of a clone — read below), CA3162 (which has BCD output, and needs the CA3161 or similar to interface to a display), or the AD2020 (which too needed a lot of support circuitry).

The ICL71xx was the go-to device for a reason. Let’s take a look at the engineering and business behind this fascinating chip.

Continue reading “Get To Know 3½ Digit ADCs With The ICL71xx”

Analog To Digital Converter (ADC): A True Understanding

Back in the day where the microprocessor was our standard building block, we tended to concentrate on computation and processing of data and not so much on I/O. Simply put there were a lot of things we had to get working just so we could then read the state of an I/O port or a counter.

Nowadays the microcontroller has taken care of most of the system level needs with the luxury of built in RAM memory and the ability to upload our code. That leaves us able to concentrate on the major role of a microcontroller: to interpret something about the environment, make decisions, and often output the result to energize a motor, LED, or some other twiddly bits.

Often the usefulness of a small microcontroller project depends on being able to interpret external signals in the form of voltage or less often, current. For example the output of a photocell, or a temperature sensor may use an analog voltage to indicate brightness or the temperature. Enter the Analog to Digital Converter (ADC) with the ability to convert an external signal to a processor readable value.

Continue reading “Analog To Digital Converter (ADC): A True Understanding”