Author Topic: Problems with internal temperature sensor - MCP3561  (Read 7518 times)

0 Members and 1 Guest are viewing this topic.

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #25 on: July 14, 2021, 09:40:10 pm »
Once calibrated, with internal shunt the variation remains at an acceptable noise level (40count -> 11uV).

The name "antialising" is actually misleading, better to call "OPA protector against ADC charge kickback". Microchip's adc's are not so aggressive like TI, but still there is switching capacitor load present.
Although in the case of this test it is not necessary, the antialiasing filter exists (R41+C32), but I chose to buffer with the opamp for the CH0 input.
I can add one more filter to the opamp output, but I don't believe it makes much difference.



Another possible issue - reference driver mcp6002 may oscillate.
The Vref is clean, as it should.
The MCP6002 is on a voltage follower setup, as indicated in Figure 7-1 of the datasheet (page 77).

Maybe you have to continue to bet on the quality of the signal that arrives at the ADC...
The problem is that with an external shunt and after making 60 averages, I still have a noise level of 50uVpp. If it was just 10uVpp it was already acceptable for my application.

Why would you expect the offset to be 0? Did you calibrate the ADC? While the drift spec for offset on these Microchip parts is great, the initial offset is something like +- a few thousand counts. If I did the math right, the datasheet claims +- 900uV offset, which would be +-12500 counts or so at 24 bits. I don't see a problem with your measurement given that, and the 39 count variation seems very good also. I've used MCP3914 before and the analog specs are impressive, although the amount of silicon bugs and various garbage requiring ugly workarounds is less than ideal.
Hi.

I think 900uV doesn't match that many ADC counts.
I don't know which Vref you used to do the math, but in my case the Vref is 2.5V.

(900uV*2^23)/2.5 = ~3020count


This is generally a really bad idea, keep one and only solid ground plane, and low-pass filter the AVDD for the chip if you want to improve PSRR (which honestly might not be needed, you already get good PSRR as-is, so if your 3V3 is quiet enough as-is you might be better without).

It is good practice to separate the powers.
All the digital part on one side and the analog part on the other.

I also separated the communication lines with 100R resistors to reduce the current peaks that could affect the measurements with the internal stability of the ADC.

These are just some practices that I'm used to in other projects, but I don't think they have such a negative impact as you suggest.

Deep down this is also corroborated on pages 79/80 of the datasheet.
As much as possible I tried to follow the directions as much as possible...




Thanks for the answers.

I'll go ahead with some more tests and I'll update here.
« Last Edit: July 14, 2021, 09:49:58 pm by Dave_PT »
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #26 on: July 14, 2021, 10:31:48 pm »
I am using the MCP6N16 (U9) to measure the voltage drop across a 20R resistor with a 48X gain.
Then the signal goes through an LPF and is buffered to the ADC.

At this moment at the sensor resistance (20R) the voltage drop is ~460uV. Power comes from a 3V battery and a series resistor.

When the signal is converted by the ADC, it varies between 77237 and 77876, ie ~640 ADC counts, which translates to ~190uVpp.

This noise is much higher than expected...

Any idea?



Signal - ADC RAW
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 779
  • Country: ca
Re: Problems with internal temperature sensor - MCP3561
« Reply #27 on: July 14, 2021, 10:41:32 pm »
Another possible issue - reference driver mcp6002 may oscillate.
The Vref is clean, as it should.
The MCP6002 is on a voltage follower setup, as indicated in Figure 7-1 of the datasheet (page 77).
Probably, you are referring to MCP6V91 voltage follower, but there is no capacitive load. I see C29/C30 and it's make difference. What capacitance over there, on Vref, Vdd & Vaa?
 Also, "clean" - on what scale, there is microVolts and scope is useless at that level.

 If it's me, I'd prefer BIG capacitor at Vref+, 10+ uF or more, and change circuits to:
 

Offline uer166

  • Frequent Contributor
  • **
  • Posts: 872
  • Country: us
Re: Problems with internal temperature sensor - MCP3561
« Reply #28 on: July 14, 2021, 11:01:41 pm »
It is good practice to separate the powers.
..
Deep down this is also corroborated on pages 79/80 of the datasheet.
As much as possible I tried to follow the directions as much as possible...

Filtering power is fine, what I meant is, splitting the ground planes that are not galvanically isolated is a not fine. This has been discussed ad-nauseam here in other threads, but basically the datasheet here is plain incorrect, you will verifiably get worse performance if you split the ground planes per their recommendation. Maybe it was something an intern wrote that kept being copy/pasted, maybe they just don't bother to fix it or care, but in such a mixed signal system as yours you'd be much better off keeping a solid ground plane, separating the analog/digital signals, ensuring all traces have a reference plane underneath, and filtering AVCC if you wish at the point of load.
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #29 on: July 15, 2021, 07:27:53 am »
Also, "clean" - on what scale, there is microVolts and scope is useless at that level.
I wrote "clean" because the Vref doesn't oscillate like you suggested  ;D.
The noise level in C33 is in the order of 2mVpp. But in this realm I don't know if I believe in the oscilloscope.


Probably, you are referring to MCP6V91 voltage follower, but there is no capacitive load. I see C29/C30 and it's make difference. What capacitance over there, on Vref, Vdd & Vaa?
Vref = 10nF, after the voltage follower and next to the MCP3561 pin. The noise level is ~3mVpp.

Vdd = 10uFx1 + 1uFx1 + 100nFx6, as you can see, 1uF and 100nF next to Vdd pins. The noise level is ~6mVpp.

Van = 10uFx1 + 1uFx1 + 100nFx5, with 1uF and 100nF next to the IC power pins. The noise level is ~5mVpp.

Separe power rails:


If it's me, I'd prefer BIG capacitor at Vref+, 10+ uF or more

Well, it's something I can test simply... I'll do it to test.
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #30 on: July 15, 2021, 07:35:03 am »
Filtering power is fine, what I meant is, splitting the ground planes that are not galvanically isolated is a not fine. This has been discussed ad-nauseam here in other threads, but basically the datasheet here is plain incorrect, you will verifiably get worse performance if you split the ground planes per their recommendation. Maybe it was something an intern wrote that kept being copy/pasted, maybe they just don't bother to fix it or care, but in such a mixed signal system as yours you'd be much better off keeping a solid ground plane, separating the analog/digital signals, ensuring all traces have a reference plane underneath, and filtering AVCC if you wish at the point of load.

It's not worth opening the discussion here too much, but separate plans are recommended by several manufacturers and have their supporters.
It's like having a star shaped ground.
One example I've worked with recently was TI's ADS1299. A frontend for EEG measurement and the recommendation is also to have separate ground, even following the EVB design.

I'm not completely disagreeing with you, I understand what you're saying too, but it makes some sense to me the use of separate grounds.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 779
  • Country: ca
Re: Problems with internal temperature sensor - MCP3561
« Reply #31 on: July 15, 2021, 01:15:54 pm »
Probably, you are referring to MCP6V91 voltage follower, but there is no capacitive load. I see C29/C30 and it's make difference. What capacitance over there, on Vref, Vdd & Vaa?
Vref = 10nF, after the voltage follower and next to the MCP3561 pin. The noise level is ~3mVpp.
You can't put a cap at the OPA output, read DS mcp6002 - paragraph 4.3 Capacitive Loads
This is always a problem,  I know only a few specifically designed OPA that may handle 10uF w/o series resistance.
Setting series resistance with common OPA creates an error. Probably, offset may be calibrated out for constant sampling rate
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #32 on: July 15, 2021, 02:17:18 pm »
You can't put a cap at the OPA output, read DS mcp6002 - paragraph 4.3 Capacitive Loads
This is always a problem,  I know only a few specifically designed OPA that may handle 10uF w/o series resistance.
Setting series resistance with common OPA creates an error. Probably, offset may be calibrated out for constant sampling rate

Yes sure.
I was going to put an RC of 100R + 10uF, similar to what Microchip has in the voltage ref app note.
« Last Edit: July 15, 2021, 02:23:48 pm by Dave_PT »
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #33 on: July 15, 2021, 09:10:42 pm »
Yes sure.
I was going to put an RC of 100R + 10uF, similar to what Microchip has in the voltage ref app note.

At first glance it's hard to tell apart, but I would say the end result is slightly worse.
Same test condition, result in a noise ADC count of 644.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6899
  • Country: ca
Re: Problems with internal temperature sensor - MCP3561
« Reply #34 on: July 15, 2021, 09:49:34 pm »
There is the MCP3x6x Rev. B silicon errata with Data-Ready work around, looks like you're supposed to use the newer MCP3561R  :palm:
 

Offline Dave_PTTopic starter

  • Frequent Contributor
  • **
  • Posts: 315
  • Country: pt
    • DavidMartinsEngineering
Re: Problems with internal temperature sensor - MCP3561
« Reply #35 on: July 16, 2021, 12:13:22 pm »
There is the MCP3x6x Rev. B silicon errata with Data-Ready work around, looks like you're supposed to use the newer MCP3561R  :palm:
Worth trying.
The pinout is the same and it already has the internal Vref.
I believe that the changes must not have been just these and that at least the clock problems are also resolved.
 

Offline MasterT

  • Frequent Contributor
  • **
  • Posts: 779
  • Country: ca
Re: Problems with internal temperature sensor - MCP3561
« Reply #36 on: January 16, 2022, 05:54:06 pm »
 I tested two more adc PCM4202   & MAX11270. Same prototyping technics, similar voltage regulators, decoupling, RC network etc.
Short summary:
                                 Noise    Linearity (HD-2 & HD-3)
1. Rate 62.5 ksps
     MCP3561R        -130   -122
     MAX11270         -124   -122 (SNR flour limit)
     PCM4202           -115   -110

2. Rate 4 ksps
     MCP3561R        -140   -124
     MAX11270         -130   -128
     PCM4202           --------------

What is interesting, that microchip outperform audio legend from TI PCM4202 with huge difference.  Max11270 has impressive linearity data, check it out:



 
The following users thanked this post: Dave_PT


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf