Author Topic: Looking for a MCU with “accurate” ADC  (Read 6742 times)

0 Members and 1 Guest are viewing this topic.

Offline T.Topic starter

  • Newbie
  • Posts: 3
  • Country: at
Looking for a MCU with “accurate” ADC
« on: August 17, 2018, 08:30:26 am »
Hello!

I need to measure several voltages and temperatures for monitoring, fan control, over temperature shutdown and under voltage shutdown. The measurements do not need to be very precise, but total error should less than ±5% (1% of range and 4% of reading) for a temperature range of -20°C to 65°C. Since the voltage divider also has an error, the ADC must have a less than 1% offset error and less than 3% gain error.

First I thought that this is a relaxed specification, since most modern MCU have multi-channel ADCs with 10 Bit or more resolution, but then I tried sum-up the error of the internal reference, temperature drift and long term drift. Either I could not found the specification (e.g. ADC is only specified for TA = 25°C or short after calibration) and/or the internal reference voltage was very inaccurate with up to 4% error.

Can anybody recommend a MCU with good ADC with >7 input channels?
Alternative a MUX ADC.

-Thomas
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #1 on: August 17, 2018, 09:00:33 am »
First I thought that this is a relaxed specification, since most modern MCU have multi-channel ADCs with 10 Bit or more resolution, but then I tried sum-up the error of the internal reference, temperature drift and long term drift. Either I could not found the specification (e.g. ADC is only specified for TA = 25°C or short after calibration) and/or the internal reference voltage was very inaccurate with up to 4%

Check MSP430, those with factory calibration data segment in the flash. Feeling tells that reference/ADC calibration will "fix" your problem. BTW many other uC have factory cal data for their bandgap reference.  Drift of bandgap and ADC combined usually is 100 ppm/oC or so.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: Looking for a MCU with “accurate” ADC
« Reply #2 on: August 17, 2018, 09:28:03 am »
The Analog Devices ADuC parts have some very high spec analog peripherals, though you do pay for the privilege.
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 3464
  • Country: us
Re: Looking for a MCU with “accurate” ADC
« Reply #3 on: August 17, 2018, 09:50:05 am »
Hello!

I need to measure several voltages and temperatures for monitoring, fan control, over temperature shutdown and under voltage shutdown. The measurements do not need to be very precise, but total error should less than ±5% (1% of range and 4% of reading) for a temperature...

I'm not sure I agree with your calculation of total error based on the sum of independent errors.   You may well be over estimating the error of 1% + 5%.   Lots of references on this subject as it occurs frequently.   Here's just one: http://lectureonline.cl.msu.edu/~mmp/labs/error/e2.htm

Edit: Maybe a trivial example will help you see that.   Flip a coin.   The error in coming up heads is 50%.  If you flip two coins, the error in coming up both heads is not 100%.
« Last Edit: August 17, 2018, 09:56:12 am by jpanhalt »
 
The following users thanked this post: schmitt trigger

Offline T.Topic starter

  • Newbie
  • Posts: 3
  • Country: at
Re: Looking for a MCU with “accurate” ADC
« Reply #4 on: August 17, 2018, 12:27:04 pm »
The MSP430 looks very promising.

ADuC is an overkill. (too expensive to big packet)

I forgot to to mention: the price should be below 2$ and the packet should be small (20 to 32 PINs)

ogden is rigth. Self calibration will fix my problem, but it needs to be periodic calibration.
Since the monitoring can't be stopped, the calibration has to be done in between the normal measurement.
With calibration a STM32 should be fine to.
 

Offline snarkysparky

  • Frequent Contributor
  • **
  • Posts: 414
  • Country: us
Re: Looking for a MCU with “accurate” ADC
« Reply #5 on: August 17, 2018, 12:35:58 pm »
put a stable voltage reference on the board and read it periodically.  Calibrate on the fly..
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4221
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Looking for a MCU with “accurate” ADC
« Reply #6 on: August 17, 2018, 12:52:40 pm »
...or pick a microcontroller which lets you use an external reference directly. Many micros give the choice of using the supply, the internal reference, or an external reference voltage.

Online wraper

  • Supporter
  • ****
  • Posts: 16834
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #7 on: August 17, 2018, 01:10:19 pm »
Look at Silicon Labs EFM8BB series and if not sufficient at EFM8LB series. You could also get rig of some external components needed because analog part is quite flexible. Specs in the datasheets are given at full operating temperature range.
« Last Edit: August 17, 2018, 01:18:04 pm by wraper »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8167
  • Country: fi
Re: Looking for a MCU with “accurate” ADC
« Reply #8 on: August 17, 2018, 01:45:23 pm »
Your target accuracy should be easy to achieve. You are almost there with uncalibrated, lowest cost internal references on most MCUs, but as you have found out, not quite.

For low unit cost but higher and more risky development costs, go for calibrating the inaccurate internal reference. Plus side is, you calibrate all effects including reference, ADC and external components at once. Only long-time drift is left. Minus side is, developing the calibration equipment and code takes some time.

I have done this a few times: a peltier-based oven and software-controlled, calibrated power supply (or a lower-accuracy controllable power supply coupled with higher accuracy software-readable multimeter) can easily generate you test vectors in about an hour - the oven needs to be sized for the batch size so that the calibration doesn't slow down your manufacturing process, causing more cost than it saves.

In my case, I needed to measure voltages between 2.5 and 4.2V at temperatures between -20 degC and +60 degC using cheap MCUs, so IIRC, the test vector for the calibration setup was something like this:
T1 = +3 degC
T2 = +25 degC
T3 = +50 degC

V1 = 2.6V
V2 = 3.4V
V3 = 4.1V
(each voltage measured at each temperature)

Then, using extrapolation and interpolation, I'd get:
- Voltage offset
- Voltage gain
- Temperature coefficient for voltage offset
- Temperature coefficient for voltage gain


If this sounds tedious and/or risky, or you are not comfortable creating such a complex manufacturing line, consider using external reference already specified well within your tolerance over worst case conditions. Do the same for the resistor divider. As your reference will be costing at least $1, you can easily upgrade your $0.001 1% resistors to $0.05 0.1% resistors. Sometimes, you can find 0.5% resistors almost for 1% prices.

And, indeed some microcontrollers come with manufacturer calibration data for the reference and ADC. With your own setup, you can do better (and calibrate for external effects as well), and are not locked in to these few product lines that provide such data. But the cost and risk in building your own calibration line is self-evident.

In your case, however, a simple single offset compensation, even without temperature compensation, could be enough to satisfy your requirements. This would be easy in production, using one single software-readable DMM and a bit of code.
« Last Edit: August 17, 2018, 01:47:37 pm by Siwastaja »
 

Online wraper

  • Supporter
  • ****
  • Posts: 16834
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #9 on: August 17, 2018, 01:56:26 pm »
You are almost there with uncalibrated, lowest cost internal references on most MCUs, but as you have found out, not quite.
EFM8BB has ± 1.8% vref in full -40o +85(or 125)oC temperature and full Vcc range starting from $0.30
« Last Edit: August 17, 2018, 02:11:16 pm by wraper »
 

Offline Gribo

  • Frequent Contributor
  • **
  • Posts: 629
  • Country: ca
Re: Looking for a MCU with “accurate” ADC
« Reply #10 on: August 17, 2018, 02:03:13 pm »
There is also the MSP430AFE2xx family. Basically, a Sigma Delta ADC with an MCU. It also supports external VREF.
I am available for freelance work.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #11 on: August 17, 2018, 02:03:23 pm »
ogden is rigth. Self calibration will fix my problem, but it needs to be periodic calibration.

No. It does not need to be periodic. Those on-die references does not drift away over time so much (at given temperature). Your <= 4% application will be fine definitely. You want two point temperature calibration and compensation, that's it.
 

Online splin

  • Frequent Contributor
  • **
  • Posts: 999
  • Country: gb
Re: Looking for a MCU with “accurate” ADC
« Reply #12 on: August 18, 2018, 01:06:21 am »
You can use almost any MCU with an ADC - you'd have to be trying quite hard to not meet +/-5% without calibration!  Don't let the tail wag the dog - choose the micro based on more important factors such as familiarity, development tools, support, availability etc.

The internal references are often rather poor so if it isn't accurate enough then amost all (all?) MCU's allow you to use Vdd as the reference - either through an analog supply voltage pin Vdda (or the like) or directly from Vdd (Vdda may be internally connected to Vdd on small packages). Many low cost regulators are available with output tolerances of +/-2% including initial tolerance and full temperature range. Eg. the AP2022 cost < 7 cents:

https://www.avnet.com/shop/us/products/diodes-inc/ap2202r-33tre1-3074457345631341369?CMP=EMA_Octopart_inventoryfeed_VSE?aka_re=1

Additional error will come from output load current regulation, amongst others, but that may well not be much of an issue as the load current will be often be pretty constant when you are taking measurements with the ADC. Noise may be an issue but lots of averaging may suffice.

If that isn't good enough the AS431 (or AP431S) is a 2.5V .5% reference with maximum .4% deviation over -40 to +85C. It costs < 4 cents:

https://www.avnet.com/shop/us/products/diodes-inc/as431antr-g1-3074457345625002707?CMP=EMA_Octopart_inventoryfeed_VSE

There are many other TL431 variants but this has the best temperature spec as far as I can see and is also the cheapest.

If you don't want to spare an ADC input to measure the reference you could use it to supply the micro directly (<100mA) or buffered using a transistor or even a voltage regulator. This has the extra benefit of saving the cost of the regulator. Be aware though that TL431 references can be a bit tricky wrt stability so some care would be required.

All solutions will have long term drift to contend with but this is often poorly, or not specified for low cost devices. I don't think I've ever seen a drift spec greater than 120ppm per sqrt(1000) hours for references which equates to .08% over 5 years so probably not a big concern. When specified it is usually at 25C so a regulator running rather hotter would likely be worse so some Arrenhius calculations might be in order.

Your 1% offset allowance is very high - I expect most MCU ADCs have specs of 2 or 3 LSBs offset at most so < .3% for a 10 bit device and probably rather less than .1% for most.

I'd be careful about your 1% allowance for voltage divider error; if the divider ratio is 1:9 or less the error approaches twice the tolerance of each resistor. So a 1% error would require each resistors to remain within .5% of nominal over life which is a challange unless you are buying relatively expensive parts. Eg. Yaego RT series .1% thin film are around 4 cents, but look at the specs for the various drift factors: .5% max for soldering, another .5% for 1000hrs load life at 70C, add .5% max for humidity exposure, plus .5% for low temperature exposure, vibration, board flexing etc. etc.

And then there's the shelf life stability, assuming the resistors spend most of their life at benign temperatures - but that is rarely specified for lower cost parts. You could easily get to 2% or more over the life of the equipment depending on which factors you choose to include. In reality you are extremely unlikely to suffer such drift but 1% is easily possible.

Vishay Beyschlag 25ppm .1% MMA0204 cost around 15 cents from Digikey but have much better stability specs so .5% total drift over life should be easily achievable.
 
The following users thanked this post: thm_w, JPortici

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26875
  • Country: nl
    • NCT Developments
Re: Looking for a MCU with “accurate” ADC
« Reply #13 on: August 18, 2018, 01:59:38 pm »
Can anybody recommend a MCU with good ADC with >7 input channels?
Look at NXP LPC1000 series together with a low thermal drift regulator.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3138
  • Country: ca
Re: Looking for a MCU with “accurate” ADC
« Reply #14 on: August 18, 2018, 03:28:54 pm »
By the description of your tasks (and by your requirements) you don't need much. The internal VREF may be very inaccurate (probably adequate for fan control, but still won't meet your suggested requirements). if you have a regulated power supply, you can use VDD as a voltage reference. It will be accurate enough coupled with almost any ADC in the market. Most ADCs will let you to use VDD as a reference. If not, you can always measure either a single point VDD/2 or multiple references (such as 0.25*VDD and 0.75*VDD) and scale all the other measurements accordingly.

Nearly any MCU with analog function (such as a small $0.50 PIC) will do the job.
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: Looking for a MCU with “accurate” ADC
« Reply #15 on: August 20, 2018, 03:01:52 am »
STM32's ADCs have factory calibration data, as well as a vref channel that you can use to constantly update and scale your reading accordingly.

In my projects i just have the vref channel setup so that it reads the reference whenever other adc readings are taking, and then it always scales the data output accordingly.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Looking for a MCU with “accurate” ADC
« Reply #16 on: August 22, 2018, 01:44:04 am »
 

Online wraper

  • Supporter
  • ****
  • Posts: 16834
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #17 on: August 22, 2018, 01:53:44 am »
Take a look on this one
Nice AD, and Full LCD support

http://www.ti.com/product/msp430f6736a?keyMatch=mcu%2024%20bit%20adc&tisearch=Search-EN-Everything
Twice of the max acceptable price and 3 times more pins than needed (op asked for small footprint). And who cares about LCD which is not there.
Quote
I forgot to to mention: the price should be below 2$ and the packet should be small (20 to 32 PINs)
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Looking for a MCU with “accurate” ADC
« Reply #18 on: August 22, 2018, 12:15:25 pm »
Also you can check 8051F350, and PIC18F87J72
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #19 on: August 22, 2018, 09:07:54 pm »
Also you can check 8051F350, and PIC18F87J72

 :palm:  Which part of requirement "packet should be small (20 to 32 PINs)" you did not understand?
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Looking for a MCU with “accurate” ADC
« Reply #20 on: August 22, 2018, 09:15:25 pm »
I would also prefer calibrating the internal ADC - in fact I would even forgo the entire analog chain and calibrate against the actual input signal directly as a transfer function. You don't even need to know the actual transfer function, just assume a polynomial since all transfer function can be approximated using its term-truncated Taylor series. Run usual program directly but program a unity transfer function coefficients first during calibration, inject some known signals and record the outputs, now solve for the coefficients in the polynomial transfer function and write them into the nonvolatile configuration memory.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Looking for a MCU with “accurate” ADC
« Reply #21 on: August 24, 2018, 05:23:13 pm »
I didn't read anything about low pin count or packing, did you?


"

Looking for a MCU with “accurate” ADC
« on: August 17, 2018, 06:30:26 pm »
Say ThanksReplyQuote
Hello!

I need to measure several voltages and temperatures for monitoring, fan control, over temperature shutdown and under voltage shutdown. The measurements do not need to be very precise, but total error should less than ±5% (1% of range and 4% of reading) for a temperature range of -20°C to 65°C. Since the voltage divider also has an error, the ADC must have a less than 1% offset error and less than 3% gain error.

First I thought that this is a relaxed specification, since most modern MCU have multi-channel ADCs with 10 Bit or more resolution, but then I tried sum-up the error of the internal reference, temperature drift and long term drift. Either I could not found the specification (e.g. ADC is only specified for TA = 25°C or short after calibration) and/or the internal reference voltage was very inaccurate with up to 4% error.

Can anybody recommend a MCU with good ADC with >7 input channels?
Alternative a MUX ADC.

-Thomas"
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Looking for a MCU with “accurate” ADC
« Reply #22 on: August 24, 2018, 06:35:11 pm »
I didn't read anything about low pin count or packing, did you?


"

Looking for a MCU with “accurate” ADC
« on: August 17, 2018, 06:30:26 pm »
Say ThanksReplyQuote
Hello!

I need to measure several voltages and temperatures for monitoring, fan control, over temperature shutdown and under voltage shutdown. The measurements do not need to be very precise, but total error should less than ±5% (1% of range and 4% of reading) for a temperature range of -20°C to 65°C. Since the voltage divider also has an error, the ADC must have a less than 1% offset error and less than 3% gain error.

First I thought that this is a relaxed specification, since most modern MCU have multi-channel ADCs with 10 Bit or more resolution, but then I tried sum-up the error of the internal reference, temperature drift and long term drift. Either I could not found the specification (e.g. ADC is only specified for TA = 25°C or short after calibration) and/or the internal reference voltage was very inaccurate with up to 4% error.

Can anybody recommend a MCU with good ADC with >7 input channels?
Alternative a MUX ADC.

-Thomas"


What about this post from OP?

The MSP430 looks very promising.

ADuC is an overkill. (too expensive to big packet)

I forgot to to mention: the price should be below 2$ and the packet should be small (20 to 32 PINs)

ogden is rigth. Self calibration will fix my problem, but it needs to be periodic calibration.
Since the monitoring can't be stopped, the calibration has to be done in between the normal measurement.
With calibration a STM32 should be fine to.

[edit] Funny that you did not even try to use search to find where sentence I mention "packet should be small (20 to 32 PINs)" comes from  :-DD
« Last Edit: August 24, 2018, 06:36:51 pm by ogden »
 

Offline vini_i

  • Regular Contributor
  • *
  • Posts: 81
Re: Looking for a MCU with “accurate” ADC
« Reply #23 on: August 24, 2018, 08:10:47 pm »
Quote
Since the monitoring can't be stopped, the calibration has to be done in between the normal measurement.

True calibration before installation and recalibration after operation is performed in a controlled environment. The device would have to be removed, attached to reference equipment, verified, adjusted, reverified, and then put back in service. It is not practical to try and calibrate equipment that is performing measurements.

Because you are using a uC it is possible to create a script that interacts with the uC and reference equipment. This could make the calibration/recalibration super fast but the device would still have to be removed from operation.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: Looking for a MCU with “accurate” ADC
« Reply #24 on: August 24, 2018, 10:02:43 pm »
[edit] Funny that you did not even try to use search to find where sentence I mention "packet should be small (20 to 32 PINs)" comes from  :-DD

No-one should need to search a page to find all the requirements of someone asking for help, they should be in the first post.  If they change, or additional requirements need to be added then the first post should be amended.  It prevents exactly this kind of thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf