From 5568dec4ad8f0420f0a8605406fb6b3a0e4567c8 Mon Sep 17 00:00:00 2001 From: jim Date: Fri, 5 Dec 2008 02:13:46 +0000 Subject: [PATCH] notes git-svn-id: https://bucket.mit.edu/svn/nilm/zoom@7010 ddd99763-3ecb-0310-9145-efcb8ce7c51f --- notes/20081104.txt | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 notes/20081104.txt diff --git a/notes/20081104.txt b/notes/20081104.txt new file mode 100644 index 0000000..a777d1c --- /dev/null +++ b/notes/20081104.txt @@ -0,0 +1,55 @@ +Setup +----- + +Total input current Ic (amps) + +LA-55 with ~200 turns, 1k burden. +Voltage output is Vc = (Ic / 1000 * 1k) = Ic +LA-55 output goes to trimmable offset opamp, + trimmed to 0 when DAC command is 32768. + + -> NOTE: DC offset changes a ton (200mV!) when the LA-55 is + saturated one way versus the other, then returned to zero. + + Will try implementing a degauss feature, to see if the DC offset + always settles to the same amount. Result: seems to work. + +R36 = 1k (shouldn't matter) +IC3A: + R37 = 1k, R38 = 3.3k -> scales up by 4.3 +IC3B: + R39 = 100k + R40 = 100k + R41 = 100k + R42 = 100k +Reference: + R43 and R44 are a pot, trimmed so R43 == R44 -> VREF1.25 = 1.25V. + +So + ADC12V+ = 1.25 - (4.3 * Vc) + = 1.25 - 4.3 Ic + +PIC input value (PICV) is: + 0 = 0V + 2048 = 2.5V + + PICV = (ADC12V+ * 2048 / 2.5) + PICV = (1.25 - 4.3 Ic) * 2048 / 2.5 + PICV = 1024 - 3522.6 Ic + Ic = (1024 - PICV) / 3522.6 + +Computed by adc12_to_current() + +Scaling +------- +DAC can do about ±20A. DAC command (DACC) is: + 0 = -20A + 65536 = +20A + + DACC = 32768 * (1 + Ic / 20) + +Computed by current_to_dac() + +Code +---- +