News:

Let's find out together what makes a PIC Tick!

Main Menu

Differential ADC Converter

Started by shantanu@india, Feb 09, 2024, 10:46 AM

Previous topic - Next topic

shantanu@india

Hi,
I need to digitize a 4-20mA signal to 12/16 bits using an ADC chip with SPI/I2C interface. what's the best option with smallest footprint?
I've 24-bit HX711 strain gauge ADC's in stock which work perfectly with load cells. But are they a good choice for 4-20mA?
Has anyone used MCP3201?
Thanks.
Regards
Shantanu

trastikata

Quote from: shantanu@india on Feb 09, 2024, 10:46 AMI need to digitize a 4-20mA signal to 12/16 bits using an ADC chip with SPI/I2C interface. what's the best option with smallest footprint?

Hello shantanu,

many PICs have differential ADC inputs and 12b resolution, or you are using different MCU type?

shantanu@india

Hi Trastikata,
In this case the PIC(18F24K22) is already selected & doing display & communication.
The ADC has to be stand alone
Regards
Shantanu

top204

#3
Is it important to actually have 12-bit or 16-bit accuracy, or just 12-bit or 16-bit values?

If memory serves, the current loop communications mechanisms were around long before 12-bit and 16-bit ADCs were, so it should work with a 10-bit ADC. Then the 10-bit ADC value can be scaled up to a 12-bit or 16-bit value with a few multiplications, or some over-sampling if the coms are not too fast.

A differential mechanism can be made by a simple circuit at the front of the ADC that makes 0 V the middle value of the ADC, and negative voltages give a reading below that, and positive voltages give a reading above that. I think it is called DC offset?


Stephen Moss

Quote from: shantanu@india on Feb 09, 2024, 10:46 AMI've 24-bit HX711 strain gauge ADC's in stock which work perfectly with load cells. But are they a good choice for 4-20mA?
I have not used it so can't say if they are a good choice or not over another device, but the data sheet does indicate that a particular gain setting on Ch.A corresponds to an input signal of +/- 20mV so if you can run your current signal through a 1 ohm resistor and connect the ADC's differential inputs across it should that not then give a suitable 4 - 20mV input?
Thus, unless I am missing something I don't see why it would not work.

I have not used the MCP3201 either so cannot say if that would be the better option but I did notice the datasheet states it has a Pseudo differential input, I am not sure what that means but I would assume it samples both signals separately and then subtracts one result from the other whereas, the HX711 appears to connect the inputs to a differential amplifier and measure the resulting differential output.
If that is the case then would think the HX711 is the better option as by measuring two signals and subtracting them would not the result from the MCP3201 have twice the quantisation error thereby making it's result less accurate then that of the HX711?   

See_Mos

#5
From the original post I suspect you already have a strain gauge with 4 to 20 mA output?

If so then it is as simple as using a resistor to convert the loop current to a voltage then using AtoD to digitise the voltage.  A 250 ohm resistor will give a voltage of 1 to 5 volts or 25 ohms 0.1 to 0.5  volt etc.

In the analogue world it is usual to use a low value resistor and an amplifier circuit with two presets, one for zero and the other for span or maximum. In the digital world this can be done in software of course but then some other method is needed to enable calibration.

See_Mos

#6
I think originally the 4 to 20mA loop was designed as a method of daisy chaining one or more readout devices such as analogue meters.

ken_k

Hi Shantanu.
In answer to your question, has anyone used a MCP3201? Many years ago I use the MCP3201 and the MCP3202 they both gave very satisfactory performance.
As far as physical size goes there are SOT23 16 bit ADC's with a built in voltage references. What sort of data update speed is required? Regarding the HX711's I've never tried them.

John Lawton

However 12bit resolution with the MCP3201 isn't that high. If you want more I can recommend the MCP3562R which also has true differential inputs but it is a larger device.

In any case, if your unit isn't completely floating you will need to be aware of the common mode voltage of your current loop.

GDeSantis

#9
Alternately, the MCP3553 offers 22-bit A/D resolution, incorporates an SPI interface and offers automatic internal offset and gain calibration.

JonW

#10
Quote from: John Lawton on Feb 13, 2024, 10:52 AMHowever 12bit resolution with the MCP3201 isn't that high. If you want more I can recommend the MCP3562R which also has true differential inputs but it is a larger device.

In any case, if your unit isn't completely floating you will need to be aware of the common mode voltage of your current loop.

That's a good point about the CMV John and i would also be worried about isolation.  I have not used 4 to 20mA signalling but have used current monitors with high common mode voltages. It may be easier to use a current monitor IC over a resistor that can handle the common mode range. Something like the LTC4151 has 80V common mode input and a 12bit ADC in the same package.  You could easily isolate the digital IO using opto isolators too.

What about using a high linearity analog matched opto like HCNR201 from Broadcom, this would provide good isolation to your digital side and become a single ended output, you would then  have isolation from transients etc  and only need a single ended ADC.  Page 12/15 on the datasheet has isolated line powered schematics. 

John Drew

Quote from: See_Mos on Feb 12, 2024, 10:11 PMI think originally the 4 to 20mA loop was designed as a method of daisy chaining one or more readout devices such as analogue meters.
I reckon it might even be a descendant of the standard 20-40mA loop current for connection of teleprinters?
In the 70s I had a Teletype Model 15 teleprinter and later a Siemens Model 100 hooked up to a encoder/decoder and a transceiver. At that time my Ham shack was in my caravan and you could hear it thumping away a 100m from my home especially when the carriage returned.
John

ken_k

The problem of galvanically isolated inputs seemed to keep rearing it's head while I was working  the best working solution always seemed to be using a small DC to DC power supply, digital isolator and a ADC/SPI chip for each input, it always seemed like way too many components.
I hope more chips like the MAX22530 are produced in the future that incorporate the isolated DC supply ADC and SPI interface in a single package.
I have no idea if the MAX22530 could be used or how good it is.
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX22530-MAX22532.pdf

MAX22530.jpg

See_Mos

John could be right about the teleprinter interface.  I seem to recall the Creed machines.

Back when I was designing robotic TIG welders I used an opto isolated opamp the downside being that both sides required split power supplies.  I am away at the moment so don't have access to the diagrams and part number.

Any way Shantanu has not verified yet if he has a strain gauge with 4-20mA output or if he needs to interface to the actual strain cells.  If it is the latter then AtoD conversion does not come into play as the interface ICs already mentioned have  I2C digital outputs