The Analog of Things Part 3
๏ปฟ
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๏ปฟ), 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
- Less wiring requirements
- It's cheaper
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.
๏ปฟ
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.
๏ปฟ
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.
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.
๏ปฟ
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 with a 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.
Fortunately, there is help, and a reference is provided below.