Changes between Initial Version and Version 1 of LaserRev2Commissioning

Nov 8, 2013, 10:17:54 AM (9 years ago)
Eric Hazen



  • LaserRev2Commissioning

    v1 v1  
     1Up to [[Laser_PC_Board_Designs]]
     3== Board Status ==
     5||''''Board''' ||'''Status''' ||'''Notes''' ||
     6|| 1 || OK? ||U23 spare found on bench and installed  ||
     7|| 2 || Brick ||Need top UC replaced (fuses botched) ||
     8|| 3 || OK ||All laser drivers tested OK ||
     9|| 4 || OK ||All laser drivers tested OK ||
     11== Initial Checkout ==
     13* Take care of Laser/TEC board ECOs:  [[LaserTecV2ECOs]]
     14* Provide safe dummy loads for laser and TEC (25 ohms @ 1W resistor) on J6,J7,J8,J9 and J11,J14,J17,J20
     15* Connect thermistors or 10k resistors to J12,J15,J18,J21 two each, pin 1 common.
     16* Install jumper JP1 if there is only one 5V supply.
     17* Install jumpers in pins 2-3 of JP2-JP9 (8 places) to use only one LASER power supply on LPWRB
     18* Remove R5 and R6 to isolate I2C bus from backplane
     19* Connect fans if desired to J10/J13/J16/J19 (pin 1-12V pin2-sense pin3-GND)
     21== Hardware TODO ==
     23* Disconnect pins 6, 8 of J9 on backplane (remove global enable and inhibit connections).
     24Inhibit (pin 8) to GND shuts down supply.
     26== Firmware TODO ==
     28* SC/LTC: Zero DAC on laser disable, restore on enable [[partial]]
     29* SC:  Keep array of DAC settings
     30* SC:  Implement auto-scan of laser status [[done]]
     31* SC:  Implement status LEDs [[partial]]
     32* SC/LTC: temperature setpoint in EEPROM [[done]]
     33* SC/LTC: Firmware version somewhere [[done]]
     35not yet complete:
     37* SC:  Implement boot loader for firmware updates
     38* SC/LTC:  Improve LED display operation
     40== Test Log ==
     42''''2013-10-29, hazen'''
     44EFUSE setting missing from SysCtrl Makefile.  Had to fix WLS_CTRL missing symbol in sysctrl.h.
     45Programmed 2nd System Controller board.
     47Laser/TEC board 2 seems good now.  Program with current firmware/fuses.
     50''''2013-04-01, hazen'''
     52Look at temperature sensor with scope (J12-2 with J11-1 as GND).  See lots of narrow multi-volt transients.
     53Running with fans 0,1 turned off to hopefully get some baseline on the error rate.  (File ~/Rev2/test5.txt).
     54Things heat up quickly:
     57 >l
     58 0 OK ON I=1220mA T=33.5C H=59.6C Q=48.0C DT=35 TEC=-140*
     59 1 OK ON I=1220mA T=32.7C H=55.3C Q=47.9C DT=27 TEC=-108
     60 2 ERR OFF I=0mA T=33.9C H=51.3C Q=43.9C DT=39 TEC=-156*
     61 3 OK ON I=1225mA T=32.0C H=44.5C Q=42.1C DT=18 TEC=-72
     62 4 OK ON I=2255mA T=34.3C H=54.9C Q=52.8C DT=43 TEC=-172*
     63 5 OK ON I=2255mA T=34.4C H=53.9C Q=52.5C DT=44 TEC=-176*
     64 6 OK ON I=2255mA T=33.0C H=56.8C Q=50.1C DT=29 TEC=-116
     65 7 OK ON I=2255mA T=32.9C H=47.2C Q=45.5C DT=28 TEC=-112
     66 8 ERR OFF LT1 I=0mA T=30.8C H=33.2C Q=0.0C DT=0 TEC=0
     67 9 ERR OFF I=0mA T=22.4C H=32.3C Q=38.1C DT=0 TEC=0
     68 10 OK OFF I=0mA T=28.7C H=30.3C Q=35.9C DT=0 TEC=0
     69 11 OK OFF I=0mA T=28.5C H=29.8C Q=33.5C DT=0 TEC=0
     70 12 NC 0
     71 13 NC 0
     72 14 NC 0
     73 15 NC 0
     77 >h 0 11
     78 0:  0x0100 0x0100 0x0100 0x0100
     79 1:  0x0000 0x0000 0x0000 0x0000
     80 2:  0x0002 0x0002 0x0002 0x0002
     81 3:  0x0000 0x0000 0x0000 0x0000
     82 4:  0x0002 0x0002 0x0000 0x0000
     83 5:  0x0002 0x0002 0x0002 0x0002
     84 6:  0x0000 0x0000 0x0000 0x0000
     85 7:  0x0000 0x0000 0x0000 0x0000
     86 8:  0x0001 0x0001 0x0001 0x0001
     87 9:  0x0002 0x0002 0x0000 0x0000
     88 10:  0x0000 0x0000 0x0000 0x0000
     89 11:  0x0000 0x0000 0x0000 0x0000
     92Lots of 0002 values.  Should add a filter on the temp sensor input.
     94''''Add 2.2uF''' in parallel with R103, R104 etc on all four channels of the first board.
     95Modify laser_test.c to turn fans on if any hot or Q temp is above 50 deg C.
     96Let run for a while and keep an eye on it.
     98''''N.B. someone changed the laser set points to 30 deg C'''.
     101''''2013-03-29, hazen'''
     103''''Summary:'''  Saw one spurious TEMP_FAIL trip.  Possibly due to noise on the thermistor input (not filtered, doh!)
     104Firmware updates completed and put in svn.
     106Claim from BIDMC is that with channels 0-7 on the box exhibits non-understood failure modes.
     107Documentation [ here]
     108[ here]
     110Run overnight with channels 0-3 set to 1200mA and 4-7 set to 2200mA.  Output at 9am:
     113 0 OK ON I=1225mA T=31.6C H=43.8C Q=34.9C DT=16 TEC=-64
     114 1 OK ON I=1220mA T=30.9C H=37.5C Q=34.1C DT=10 TEC=-40
     115 2 OK ON I=1220mA T=31.9C H=39.3C Q=33.9C DT=19 TEC=-76
     116 3 OK ON I=1230mA T=30.7C H=33.9C Q=32.9C DT=7 TEC=-28
     117 4 OK ON I=2255mA T=31.6C H=38.9C Q=39.8C DT=16 TEC=-64
     118 5 OK ON I=2255mA T=31.3C H=36.1C Q=38.2C DT=13 TEC=-52
     119 6 OK ON I=2255mA T=31.4C H=39.0C Q=35.7C DT=14 TEC=-56
     120 7 OK ON I=2260mA T=31.6C H=31.4C Q=31.9C DT=14 TEC=-56
     121 8 OK OFF I=0mA T=24.7C H=25.3C Q=0.0C DT=0 TEC=0
     122 9 OK OFF I=0mA T=23.9C H=24.8C Q=24.9C DT=0 TEC=0
     123 10 OK OFF I=0mA T=23.8C H=24.2C Q=24.4C DT=0 TEC=0
     124 11 OK OFF I=0mA T=23.0C H=23.4C Q=24.2C DT=0 TEC=0
     129''''Firmware:'''  tarball Firmware directory on volta as Firmware_2013-03-29.tar.gz.
     130rsync from ohm and rebuild.  Seems OK.  Put into svn at:
     133Add command ''F' to control fans.  Add command 'A' to read ADCs on system controller.
     134Add command ''T' to read ADC and convert to deg C.
     136''''2012-10-05, hazen'''
     138Final things... fix LTC front-panel LED to correctly indicate laser "on".
     139Add temperature setpoint to EEPROM and set to 19 degrees by default.
     141''''2012-10-04, hazen'''
     143Trying to get timer interrupts working sensibly on SC.  Check fuses:
     146  LFUSE = E1   Clock = 1MHz internal osc
     147  HFUSE = DE   JTAG disabled, BOOTSZ = 11  BOOTRST=0
     148  EFUSE = FF   (ATMega103 compatibility OFF)
     151Problem was software... it works now.  Implement laser scan at power up
     152and status auto-scan for front panel LED.
     156Proposed changes:
     157* HFUSE bit 3 -> 0  (EEPROM preserved on chip erase)
     158Change this on the LTC.
     160''''2012-10-03, hazen'''
     162Much firmware work
     164''''2012-10-01, hazen'''
     166Testing channels 1-3 on board#1.
     167Change R118, R131, R144 to 36k.  Replace U19.  Install jumpers JP4-9 pins 2-3.
     168Make test gizmo with 10k resistor to substitute for laser thermistor to
     169bypass OVER_TEMP logic.
     171Power up.  Channels 2, 3 still behave badly.  Seems as if U23 and U29 are dead.
     172Replace U29.  No more spare parts for U23 :(
     174Oops.  DAC channel addresses are backwards.  Laser 0 is channel 3 etc.
     176Test ''''board#2'''.  Perform assembly ECOs.  All laser drivers now work OK.
     177Blue LEDs don''t work.
     179Work on PSU control for laser power.  Open up PSU, remove laser module,
     180change position of "Inhibit" switch.  Now it is normally off.
     181Add "P" command to system controller.  "P 1 1" turns on the laser PSU, "P 1 0"
     182turns it off.  "P 0 x" should control WLS PSU but it doesn''t work.
     184''''Blew it!'''  Bricked channel 0 (and therefore the whole board) on
     185board#2 by programming the fuses incorrectly in the uC.  Set this board
     186aside.  Have to replace the uC to fix it :( :(
     188Board 3 commissioned and working (TECs not yet tested).
     189Firmware fixes:  ADC glitching cured.  Full status command ''L' implemented
     190in LTC and SC firmware.
     192''''2012-09-28, hazen'''
     194Change R105 to 35k to fix over-temp range.  Laser turns on.
     195No indication of light output, but temp goes up a bit.
     197Running laser 1.  Fan on.  Current = 1.5A.  PWM = -64.
     198Temp very slowly falling at 20 deg C.
     200Current scaling 0.5V = 1A.
     201DAC is 0x000-0xFFF for 0-2.5V.
     204  0200 = 0.03V = 0.62A
     205  0400 = 0.62V = 1.25A
     206  0600 = 0.96V = 1.87A
     207  0800 = 1.25V = 2.50A
     210Test P-only temp regulation loop in software.  Works ~ ok.
     212''''2012-09-27, hazen'''
     215 LT ATMega164A 16kB flash = 8k words = 0x2000  now 0x0e32
     216 SC ATMega64 64kB flash  = 32k words = 0x8000  now 0x1463
     219Draft [[FlareLaserControlSpec]]
     221Add PWM code from old firmware.  Works!  Command ''P' takes 16-bit value, +/-128.
     222Freq is fixed at 8kHz. 
     224* Positive values 0-127 give duty cycle 0-100% on PWM-.  PWM+ is L.  This HEATS the laser.
     225* Negative values -1...-128 give duty cycle 0-100% on PWM+.  PWM- is L.  This COOLS the laser.
     227Values outside above range give 100% duty cycle.
     229Connect a laser assembly.  Reasonable things happen when I play with the PWM settings.
     231Experimenting to determine time constant of TEC assembly response.
     232Create new C program "laser_test" with a command to read pairs (pwm,seconds)
     233and log the hot / cold / Q temperature readings at 1Hz to a file.
     235The time constant for response to a step change in heat/cooling is something like 2 minutes.
     236So, a PID which updates at 1Hz or so should be plenty fast.
     237For testing/simulation, the PID for one channel can be run on the host computer at this rate.
     239Run a test under the following conditions:
     241* no fan
     242* TEC PS set to 3.2V
     243* Set PWM to -16 for 4 minutes, then to 0 for 4 minutes
     245See [ PDF plot]
     247Working on laser.  Can''t turn it on because temp is out of range (stat = 0xd).  This is because the resistors are wrong.
     249''''2012-09-26, hazen'''
     251Write laser enable code, add "E" command to SysCtrl.
     252Modify Laser/TEC code to deassert LC_SHDN.
     254Now the laser driver works!  Current is controlled linearly by the DAC.
     256''''2012-09-25, hazen'''
     258Back from TWEPP.  Wire bench supply to Laser/TEC board and judiciously apply 3V with
     259dummy load connected to 2nd channel.  AOK, nothing hot, no current.  But, there is no
     260Analog -5V.
     262Disconnect laser and tec supplies in crate from backplane and power up.
     263Observe that LPWR is being pulled down to -4V even though it is disconnected from the supply.
     264This is consistent with current flowing through the C-E junction of Q6.
     266Look at channels 2, 3 which have never had laser power applied.  Same effect... I/O pins
     267of OPA365 are at -4.5V or so.
     269Remove OPA365 on channel 0 (U14).  Replace with new one, but cut output trace to Q6.
     270Output can draw no DC current now.  Attach bench supplies to -5V and +5V and power up carefully.
     271All as expected... all op-amp pins are at ~ GND.
     273Reconnect OPA635 output. Connect LPWR to -5V supply.  Attach dummy load and power up slowly.
     274AOK, no current, all laser-related voltages near zero.
     276Reinstall in crate with external laser supply.  AOK.  Now the challenge is to get all
     277the interlocks dealt with so the laser turns on...
     279Check inputs of U12:
     282  1 (I_SHUTDOWN) = 1  now 0
     283  2 (nENABLE)    = 1  now 0 under SysCtrl E command
     284  8 (UC_SHDN)    = 1
     285  3 (TEMP_FAIL)  = 1  now 0
     286  4 (OVER_CURR)  = 0
     289Sigh. Start with TEMP_FAIL.  No sensor, so need to short 1-2 on J12.  OK now.
     291I_SHUTDOWN comes from backplane INTERLOCK.  Off to the system controller.  Eeek!  This is an OR of many many things:
     294  /FAN_FAIL         0     via backplane PS control J9 - 5    OK
     295  TEMP_ALARM_IN     1     via backplane PS control J9 - 7    can drive L with uC
     296  AC_FAIL_IN        1     via backplane PS control J9 - 4    can drive L with uC
     297  LASER_SHUTDOWN   float  from SysCtrl uC                    drive L with uC
     298  INTERLOCK_SW_NC   1     J2 pin 8 (front panel)             Tied to GND
     299  /INTERLOCK_SW_NO  0
     303''''2012-09-13, hazen'''
     305Power ''B' jumpered on LTB board 1 top channel.
     307Now working:
     308* Bidirectional MODBUS communications (with some ugly 5ms delays)
     309* ADCs on LTC
     310* Remote reset
     312Laser drive circuit doesn''t work.  U14 gets hot, and inputs sit at -4V.
     313Cut trace to U14-3 and the R45/R48 node goes to expected V, U14-3 stays at -4V.
     315Jumper power on 2nd channel and repeat test -- same results :(
     318* package markings on U14, U16 (both SOT-23).
     319* orientation of U14
     320* pinout of Q6
     322All seems OK.  One possible concern is the power-up sequence.
     323If the Laser power comes on before the +/-5V power, large currents
     324may flow through into the output pin of U14 protection circuits.
     326''''There should probably be a series resistor on U14 output'''.
     329''''2012-09-11, hazen'''
     331Give up on bootloader for now, on with hardware testing.  Current non-working version at ohm:Proj/Frangioni/LaserDriver/Firmware and ../Software/Rev2.
     333Need to get ModBus working.
     335''''2012-09-08, hazen'''
     337Next step is bootloaders.  Here are some candidates:
     339* [ SSBL]
     340* [ KAVR]
     342For the SC a more elaborate version (can be in C) is needed to provide remote
     343loading of the LT boards.
     345''''2012-09-07, hazen'''
     347Working on ''''System Controller'''
     349''''Remove R5, R6 on Laser/TEC board to isolate I2C busses'''.
     351Both SC and LT boards installed, with ribbon cable unplugged power comes on
     352as expected.  Make minimal firmware for SC which initializes 2nd uart at 2400 baud.
     353Make receiver for LT which displays digit LSB on LED... works!
     355''''2012-09-06, hazen'''
     357Working on system controller.  Make blinky light thing using front-panel LED outputs (DB-9).
     358In order to make port G work, have to turn off ATmega103 compatibility.  Turn off JTAG for
     359good measure too.
     362  FUSES:  L = 0xe1  (unchanged)
     363          H = 0xd9  (was 0x99)
     364          E = 0xff  (was 0xfd)
     367Now blinky lights on DB-9 work!
     369''''2012-09-05, hazen'''
     371Looking at [ ATmega64A datasheet]
     373Even though the SPI Programming interface re-uses the SPI I/O module, there is one important
     374difference: The MOSI/MISO pins that are mapped to PB2 and PB3 in the SPI I/O module are not
     375used in the Programming interface. Instead, PE0 and PE1 are used for data in SPI Programming mode as shown in Table 27-13.
     377So, the programming interface is mis-wired.  Unfortunately PE0 and PE1 are shared with UART#1,
     378but there are 1k series resistors.  Here is a proposed set of ECOs to fix this, along with RESET issue:
     380* R8 - install 100 ohms.
     381* R1 - install 10k
     382* R7 - remove
     383* Jumper J10-1 to J1-4
     384* Jumper J10-3 to J1-1
     386With correctly installed fixes as above, it works (avrdude can read the chip ID).
     388Meanwhile, found [ this thread]
     389code which controls the DTR line, which we will need to operate the
     391''''2012-09-04, hazen'''
     393Initial checkout of Laser/TEC board.  Install latest avr-libc and gcc-avr for Ubutuntu 10.04.
     395''''Add m164 support to avrdude'''.  Copy /etc/avrdude.conf to ~/.avrduderc.  Copy "m128p" section
     396as "m128" and change signature bytes.
     398Now this incantation works:
     401  sudo avrdude -p m164 -P usb -c avrispmkII -U flash:w:main.hex
     404Create a blinky light program; doesn''t work.  Maybe the fuses?
     405Currently the fuses are:  L: 0x62  H: 0x99.  Check data sheet, seems fine.
     407''''Must disable JTAG'''.  Set JTAGEN fuse = 1 (hfuse=0xd9):
     410  sudo avrdude -p m164 -P usb -c avrispmkII -t
     411  avrdude> w hfuse 0 0xd9
     412  avrdude> q
     415Now the blinky lights work fine!
     417Create DAC code from twitest.c on avr-libc page.  Works!
     418DAC ramps from 0..2.5V.
     420''''Initial System Controller Checkout'''
     422Apply +12V to pins 30, 32 of VME.  5V is OK (need heatsink connection on VRs).
     423Install jumper J9 to power USB/serial thingy.
     425USB device enumerates correctly as (4) /dev/ttyUSBx devices.
     426Avrdude can''t talk to the uC though:
     429 hazen@EDF-PC-1:~/AVR/SysCtrl$ sudo avrdude -p m64 -P usb -c avrispmkII
     433 avrdude: stk500v2_command(): command failed
     434 avrdude: stk500v2_command(): unknown status 0xc9
     435 avrdude: stk500v2_program_enable(): cannot get connection status
     436 avrdude: initialization failed, rc=-1
     437          Double check connections and try again, or use -F to override
     438          this check.
     441Investigate tomorrow.
     444''''2012-08-31, hazen'''
     446Order the following for test setup:
     448* Test board to substitute for system controller for initial checkout.  This board provides header access to power supply, communications and WLS signals to allow checkout of the crate/backplane/PSU without commissioning the new system controller
     449 * Layout:  [ PCB] [ PDF]
     450 * Schematic: [ SCH] [ PDF]
     451* Digi-Key order 33928003 with various parts for above, including NTC 10K thermistors (Digi-Key BC2301-ND,
     452 * [ Vishay NTCLE100E3103JB0]
     453* 3x SparkFun FTDI basic USB/serial adapter 5V
     455NOTE:  Pin 3 of U1 must be lifted and wired to pin 1 of J4.  This will allow the DTR line on the FTDI serial adapter to control the transmit enable U1.