---
title: The Analog of Things Part 3
slug: the-analog-of-things-part-3
docTags: 
createdAt: 2023-07-25T21:26:59.447Z
---



![](https://api.archbee.com/api/optimize/Qn-KnoMlHMwLEOpt8DNF3/HWRQn0Xo63BLRZ5jbA2HR_image.png "Analog of things")

When working off a project that you found online, we are often happy with the result once we see the analog value is being read and then converted. Case in point in Part 2 ([The Analog of Things Part 2](docId:1O0QYrHqR9wqC64AW4cNL)), the moment we measured the 0.275mV on the sensor and then saw the 27.5 'C on the LCD display, we were happy - it's working.

Performing analog to digital conversion however is not that simple, especially when you are looking for accuracy. The 8BIT ADC for example has a lower resolution than a 10BIT or 12BIT ADC. The higher resolution may require a more accurate way to read the input value and ensure that the minor "step" that was converted to a digital value is not actually noise.

In most cases when you are getting to grips with ADC, you are using the single-ended input. There are a number of reasons for this.

- In most cases its performance is sufficient
- The code required to implement the solution is simpler&#x20;
- Less wiring requirements
- It's cheaper

:::hint{type="info"}
You may notice that from time to time real-world elements are mentioned. If you are going to have a successful career in this field, understanding the factors driving the success of a design is essential.
:::

The inherent issue with the single-ended approach is that the moment the application is measuring a voltage differential in the mV spectrum, the noise or interference it generates automatically negates the value of its advantages.



## Basic Concepts

:::hint{type="success"}
Single-ended and differential refer to the reference for a voltage. Single-ended is referred to as ground while differential is referred to as a secondary input or reference voltage.&#x20;
:::



**Single Ended**: In this application. they are designed to be connected to the same ground level as the microcontroller and to provide their measurement result as an analog
voltage signal on a single wire referenced to this common ground. All basic ADCs support single-ended operation.

**Differential**: A differential ADC measures the voltage difference between two inputs, one of which is the sensor, and the second is a reference voltage.

## Implementation

There is also the consideration that you may need to dust off a maths textbook to remember of these things worked. Shown below is the formula used to perform the calculation and to derive the value.

::Image[]{src="https://api.archbee.com/api/optimize/Qn-KnoMlHMwLEOpt8DNF3/vQCGffo5yLhYp3vqZJmUV_image.png" size="48" width="235" height="44" position="center" caption="Single Ended" showCaption="true"}



::Image[]{src="https://api.archbee.com/api/optimize/Qn-KnoMlHMwLEOpt8DNF3/euAqAH5xOthWQdXtZ4qwI_image.png" size="54" width="331" height="39" position="center" caption="Differential Calculation" showCaption="true"}

## Test it Out

If you are starting to focus on analog systems, working with these various options would assist in determining which is the best route to follow. There are a number of fixes that can be implemented to get around the noise and inherent drawbacks of a single-ended system.

Where a differential system is needed, the [Radix Duo](https://www.haventechnik.biz/products/Radix-Duo-16Fxxx-p552220913) with a [PIC16F1784](https://www.microchip.com/en-us/product/PIC16F1784) included offers this feature integrated with the device. You also have integrated opamps on the micro, so potentially a low part-density application could be achieved.

::Image[]{src="https://api.archbee.com/api/optimize/Qn-KnoMlHMwLEOpt8DNF3/uAHA5dYPKIA4DkehdkGGs_image.png" size="70" width="809" height="640" position="center" caption="Radix DUO - PIC16F1784" showCaption="true"}

## References

Fortunately, there is help, and a reference is provided below.

[https://ww1.microchip.com/downloads/en/DeviceDoc/Differential-and-Single-Ended-ADC-WhitePaper-DS00003197A.pdf](https://ww1.microchip.com/downloads/en/DeviceDoc/Differential-and-Single-Ended-ADC-WhitePaper-DS00003197A.pdf)
