S12X ADC

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
Post Reply
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

S12X ADC

Post by jharvey »

This is migrated from here. viewtopic.php?f=53&t=1294&start=20

Ah, so your interpretation of Table A-14's "Total input capacitance" is that's it's the ADC capacitance, not the total input the ADC can handle. Such that the pin has 10pF and the sample and hold cap is 12pF. My initial interpretation was that a high capacitance would cause a large inrush of current to the sample and hold cap, which would couple to other channels. Causing the energy in that channel to be diminished, resulting in the potential being lower than it really should be, and therefor would have a certain level of error. I was thinking if the connected capacitance was more than that spec, the switching inrush currents would exceed the 2.5mA injection current.

If injection current is the DC current, than 5v/1k doesn't match the spec noted. I believe that the injection current references the induced currents from the two adjacent channels. My first interpretation of that injection current was that the internal cap had an ESR that would be buggered if you measured a 5V signal with more than 1k.

From page VERR = K * RS * IINJ What's K? I'm guessing it's a constant of some sort, but I don't know what it is. Perhaps it's A-14's Kp or Kn, I don't know which it might be, as they are 100 times different from each other. I also don't know how to calculate the sum of injected currents.

Basically the sample and hold cap makes accurate measurement a difficult task. There are several sources of error and I would suspect that the 10 bits of accuracy, are really more like 8 bits usable. Unless you can balance several variable just right, and the datasheet doesn't give an excess in detail about how to do those predictions. Something as simply as changing the muxing speed, can change the injected currents, and input noise floor of the ADC.

I'm not crazy horny about that P+H here. It creates many sources error that raise the noise floor for the ADC. I can see how much of this can be calibrated via software by connecting a battery, and adjusting component parts or muxing speeds, until the signal in your log viewer becomes stable. So I guess your hands on experience will produce the best results.

Perhaps a basic schematic with suggested cap values and resistor could be done with Dia or paint, and posted here. ;)
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: S12X ADC

Post by Fred »

It's not my interpretation, it clearly states it in the manual where I told you it did. Then it gives you the exact formula for working out the minimum capacitance for the pin. Pretty straight forward stuff.

In early June last year while in China I noticed that the ADC readings didn't match the voltage at the pin. I fixed the configuration, which was wrong, on the 13th of June 2010. This improved things a lot, but there remained an error, which I couldn't explain. It turns out that it was this, too high of an output impedance presented to the input of the micro because of too high a series resistance used and too low of cap values used. That system was fixed up after I left to use more correct values and they are happy and have no issues anymore.

The docs are very clear about what to use, there isn't any discussion necessary, however you're free to post diagrams and talk about it if you want :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply