High relative precision voltage measurement - Page 1
Forum section: electronics / projects

author: bitdougie
author_rank: Newbie
timestamp: March 26, 2021, 07:36:48 am
content: I am working on a replacement control board for a hydraulic crimper which can crush an object like a pipe down to a set diameter, it has a total of 30mm change in diameter and must finish within +-0.1mm so an accuracy of about 0.33% or better, there is also mechanical tolerances so I am going for an order of magnitude better in my design. It has a linear position sensor on the ram and the 30mm range gives an output from 0.65V-4.5V. Attached is my drawing of the analogue front end to this sensor which will connect to an EFM8LB12F64E-C-QFP32R microcontroller using an external voltage reference ADR4533.The circuit should allow the MCU to break the 3.3V signal into 30mV ranges which are amplified to utilize the full range of the 14 bit ADC on the MCU as well as allow the MCU to run self tests on the analogue front end for calibration and thermal drift.This is my first application of analogue electronics and my second circuit board design ever so feel free to give me ideas or give an example of how this would be done in a commercial product or how you would solve this problem. Also telling me this entire design won't work and why would also be great

author: Kleinstein
author_rank: Super Contributor
timestamp: March 26, 2021, 08:07:54 am
content: The circuit looks odd at some points. The input voltage range is limited by the supply to the CMOS switch at the input. So there is no more need to have a divider after that. Usually an analog subtraction of an offset is avoided, if there is no really good reason - often a little more resolution from the ADC is easier than trying to subtract analog.There is also a rather large number of amplification stages - even if not expensive, they add errors and a simpler circuit should be possible. If possible I would avoid those extra divider and gain stages unless they are really needed. Resistors are cheap, but they can add to the drift and tolerance - so better keep it simple and have 1 or 2 bit more resolution at the ADC to do offset and gain corrections in software.A commercial product does not exclude including the same stupid mistakes as found in hobby circuits - if it works things are often kept the ways they were done before. Especially non critical circuit see things like added buffers that are not needed and only make the circuit more complicated. Sometimes it looks like they add circuitry just no not make it look too simple, so they can charge more. It is a difference if a circuit is more like low quantity (BOM cost are less important) or made for large numbers (design costs are less important).p.s. : The MCP6001 usually does not need 1 µF for decoupling. It is so slow one may not even need a cap for every OP. The HC66 switches also get away with less decoupling. Chances are one would use chips with multiple units like 74HC4066 or MCP6002.

author: bitdougie
author_rank: Newbie
timestamp: March 26, 2021, 10:44:23 am
content: Gosh yes those CMOS switches, I should have seen that it will clip my input signalVcc for those has to be at least input signal max to work over the whole range. Thank you for the feed back on the op amp stages and resistors adding noise. I should just get a higher precision ADC

author: David Hess
author_rank: Super Contributor
timestamp: March 27, 2021, 12:51:41 am
content: 30mm with 0.1mm resolution is only 1 part in 300. Even an order of magnitude more is 1 part in 3000 which is less than 12 bits. So with a 14 bit ADC, even assuming only 12 bit performance, there is no reason to do offset and gain adjustment in the analog domain unless you want to calibrate the sensors so that they all respond the same, and then it would need to be done as part of the sensor anyway.I would be more worried about noise for which I would filter in the analog domain and then use the ADC to make an integrated measurement over 0.1 seconds which will reject 50 and 60 Hz noise unless you need a faster sample rate for some reason.

author: bitdougie
author_rank: Newbie
timestamp: March 28, 2021, 05:00:48 am
content: Thanks for that David you're completely right the 14 bit ADC will give 2^n -1 which is 16,383 more than enough precision. The filter is a good point so started looking into it and am now thinking of using a first order low pass filter with fast settling as the anti-aliasing filter with a cut off at like 130hz. Will then over sample with the ADC and do the finer filtering digitally. The only unknown then would be the real time performance but the signal is f < 3Hz triangle wave if I put the machine travel into oscillation so I think the MCU will keep up with that.This is what I used as the filter reference material:https://www.ti.com/lit/an/sboa244/sboa244.pdf?ts=1616907582246&ref_url=https%253A%252F%252Fwww.ti.com%252Fdesign-resources%252Fdesign-tools-simulation%252Fanalog-circuits%252Famplifier-circuits.html

author: moffy
author_rank: Super Contributor
timestamp: March 28, 2021, 05:38:17 am
content: The LTC2400:https://www.analog.com/en/products/ltc2400.html#product-overviewIs a 24 bit ADC with built in 50/60Hz rejection filter, just add a suitable reference and SPI interface. It is good to 20 bits and easy to use, might be worth a look, it might remove the need for your analogue amplification etc.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 28, 2021, 08:36:40 am
content: With oversampling one wants some noise or backround - so there can be a thing like too much filtering on the analog side. It is still good to filter out the really fast part to keep RF interferene out and avoid aliasing. So the suggested 130 Hz limit is relatively low. How much is needed depends on the signal source. A main point with analog filering is to avoid aliasing and exceeding the linear range. Some sensors (e.g. LVDT) can have intrinsic ripple, that can be a problem or a good thing to help oversampling.The fast settling amplifier looks interesting, but may not be that suitable for a system with oversampling. It gets nonlinear when the noise / ripple exceeds a certain level. If speed is critical, just have the cross over relatively high and do the rest in the digital domain. The main part would likely be averaging over 1 power line cycle to suppress mains hum.