You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

56 lines
1.1 KiB

  1. Setup
  2. -----
  3. Total input current Ic (amps)
  4. LA-55 with ~200 turns, 1k burden.
  5. Voltage output is Vc = (Ic / 1000 * 1k) = Ic
  6. LA-55 output goes to trimmable offset opamp,
  7. trimmed to 0 when DAC command is 32768.
  8. -> NOTE: DC offset changes a ton (200mV!) when the LA-55 is
  9. saturated one way versus the other, then returned to zero.
  10. Will try implementing a degauss feature, to see if the DC offset
  11. always settles to the same amount. Result: seems to work.
  12. R36 = 1k (shouldn't matter)
  13. IC3A:
  14. R37 = 1k, R38 = 3.3k -> scales up by 4.3
  15. IC3B:
  16. R39 = 100k
  17. R40 = 100k
  18. R41 = 100k
  19. R42 = 100k
  20. Reference:
  21. R43 and R44 are a pot, trimmed so R43 == R44 -> VREF1.25 = 1.25V.
  22. So
  23. ADC12V+ = 1.25 - (4.3 * Vc)
  24. = 1.25 - 4.3 Ic
  25. PIC input value (PICV) is:
  26. 0 = 0V
  27. 2048 = 2.5V
  28. PICV = (ADC12V+ * 2048 / 2.5)
  29. PICV = (1.25 - 4.3 Ic) * 2048 / 2.5
  30. PICV = 1024 - 3522.6 Ic
  31. Ic = (1024 - PICV) / 3522.6
  32. Computed by adc12_to_current()
  33. Scaling
  34. -------
  35. DAC can do about ±20A. DAC command (DACC) is:
  36. 0 = -20A
  37. 65536 = +20A
  38. DACC = 32768 * (1 + Ic / 20)
  39. Computed by current_to_dac()
  40. Code
  41. ----