nonolith / CEE

The Analog Multitool
http://nonolithlabs.com/cee
46 stars 5 forks source link

current sense singularity #25

Open itdaniher opened 12 years ago

itdaniher commented 12 years ago

The MAX9919 has a mathematical singularity at VCM = 2V, causing a nonlinear offset in current measurement.

Most of this should be solvable in software with an if.. tree for common mode voltage dependent offsets.

This problem only presents itself as a functional impairment sourcing current with a common mode voltage of almost exactly 2V.

This problem will be resolved in the next hardware iteration of the CEE.

itdaniher commented 12 years ago

This issue stems from an unclean transition from the low-range level shifter to the high-range level shifter in the MAX9919 family of parts.

For future reference, possible replacements must...

Based on these guidelines, it looks like the AD8210 is one of the more suitable replacements, but comes in at 4x the price of the MAX9919.

itdaniher commented 12 years ago

Changes implemented in the AD8210 branch.

It looks like a lookup table spanning at least 1v..3v might be the best solution for CEE V1.0.

darchons commented 12 years ago

Maybe you can use a differential amplifier like this? http://en.wikipedia.org/wiki/Opamp_applications#Differential_amplifier

itdaniher commented 12 years ago

The 9919/8210 are specialized differential amplifiers offering a high common mode voltage range with a setpoint for zero.

Current sense is just a subset of differential amps.

darchons commented 12 years ago

That's true, but IMO for Vcm from 0V to 5V, a regular opamp will be cheaper and can potentially perform better. To set the zero point you can just connect Rg to your reference instead of ground.

itdaniher commented 12 years ago

After running some numbers, a difference amp built from a decent opamp and resistor array would be cheaper than the AD8210, but not the MAX9919. Thanks for the suggestion, I figure I'll give it a shot.

itdaniher commented 12 years ago

This sweep highlights the issue. Channel A is unloaded.

itdaniher commented 12 years ago

Solution implemented in V1.1 branch at 9963531d81643a5a3b8690bdebb3f378605e9643.

This remains an issue for V1.0, but is not noticeable during normal use.

itdaniher commented 12 years ago

The discrete CSA in V1.1 has a common mode error of up to 10% of full scale voltage when made with 1% parts. Higher precision parts are considerably more expensive.

The LT1999-50 was explored, but has a large DC offset and nontrivial common mode gain error.