Changes between Initial Version and Version 1 of LaserRev2Commissioning


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

--

Legend:

Unmodified
Added
Removed
Modified
  • LaserRev2Commissioning

    v1 v1  
     1Up to [[Laser_PC_Board_Designs]]
     2
     3== Board Status ==
     4
     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 ||
     10
     11== Initial Checkout ==
     12
     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)
     20
     21== Hardware TODO ==
     22
     23* Disconnect pins 6, 8 of J9 on backplane (remove global enable and inhibit connections).
     24Inhibit (pin 8) to GND shuts down supply.
     25
     26== Firmware TODO ==
     27
     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]]
     34
     35not yet complete:
     36
     37* SC:  Implement boot loader for firmware updates
     38* SC/LTC:  Improve LED display operation
     39
     40== Test Log ==
     41
     42''''2013-10-29, hazen'''
     43
     44EFUSE setting missing from SysCtrl Makefile.  Had to fix WLS_CTRL missing symbol in sysctrl.h.
     45Programmed 2nd System Controller board.
     46
     47Laser/TEC board 2 seems good now.  Program with current firmware/fuses.
     48
     49
     50''''2013-04-01, hazen'''
     51
     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:
     55
     56{{{
     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
     74 
     75}}}
     76{{{
     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
     90
     91}}}
     92Lots of 0002 values.  Should add a filter on the temp sensor input.
     93
     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.
     97
     98''''N.B. someone changed the laser set points to 30 deg C'''.
     99
     100
     101''''2013-03-29, hazen'''
     102
     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.
     105
     106Claim from BIDMC is that with channels 0-7 on the box exhibits non-understood failure modes.
     107Documentation [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/TestLogFiles/3-20-2013_Test_summary.doc here]
     108[http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/TestLogFiles/3-20-2013_Laser_Stability_Summary.ppt here]
     109
     110Run overnight with channels 0-3 set to 1200mA and 4-7 set to 2200mA.  Output at 9am:
     111
     112{{{
     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
     125
     126}}}
     127Hmm.
     128
     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:
     131''''https://edf.bu.edu/svn/edf/LaserBox'''.
     132
     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.
     135
     136''''2012-10-05, hazen'''
     137
     138Final things... fix LTC front-panel LED to correctly indicate laser "on".
     139Add temperature setpoint to EEPROM and set to 19 degrees by default.
     140
     141''''2012-10-04, hazen'''
     142
     143Trying to get timer interrupts working sensibly on SC.  Check fuses:
     144
     145{{{
     146  LFUSE = E1   Clock = 1MHz internal osc
     147  HFUSE = DE   JTAG disabled, BOOTSZ = 11  BOOTRST=0
     148  EFUSE = FF   (ATMega103 compatibility OFF)
     149
     150}}}
     151Problem was software... it works now.  Implement laser scan at power up
     152and status auto-scan for front panel LED.
     153
     154''''Laser/TEC:'''
     155
     156Proposed changes:
     157* HFUSE bit 3 -> 0  (EEPROM preserved on chip erase)
     158Change this on the LTC.
     159
     160''''2012-10-03, hazen'''
     161
     162Much firmware work
     163
     164''''2012-10-01, hazen'''
     165
     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.
     170
     171Power up.  Channels 2, 3 still behave badly.  Seems as if U23 and U29 are dead.
     172Replace U29.  No more spare parts for U23 :(
     173
     174Oops.  DAC channel addresses are backwards.  Laser 0 is channel 3 etc.
     175
     176Test ''''board#2'''.  Perform assembly ECOs.  All laser drivers now work OK.
     177Blue LEDs don''t work.
     178
     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.
     183
     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 :( :(
     187
     188Board 3 commissioned and working (TECs not yet tested).
     189Firmware fixes:  ADC glitching cured.  Full status command ''L' implemented
     190in LTC and SC firmware.
     191
     192''''2012-09-28, hazen'''
     193
     194Change R105 to 35k to fix over-temp range.  Laser turns on.
     195No indication of light output, but temp goes up a bit.
     196
     197Running laser 1.  Fan on.  Current = 1.5A.  PWM = -64.
     198Temp very slowly falling at 20 deg C.
     199
     200Current scaling 0.5V = 1A.
     201DAC is 0x000-0xFFF for 0-2.5V.
     202
     203{{{
     204  0200 = 0.03V = 0.62A
     205  0400 = 0.62V = 1.25A
     206  0600 = 0.96V = 1.87A
     207  0800 = 1.25V = 2.50A
     208
     209}}}
     210Test P-only temp regulation loop in software.  Works ~ ok.
     211
     212''''2012-09-27, hazen'''
     213
     214{{{
     215 LT ATMega164A 16kB flash = 8k words = 0x2000  now 0x0e32
     216 SC ATMega64 64kB flash  = 32k words = 0x8000  now 0x1463
     217
     218}}}
     219Draft [[FlareLaserControlSpec]]
     220
     221Add PWM code from old firmware.  Works!  Command ''P' takes 16-bit value, +/-128.
     222Freq is fixed at 8kHz. 
     223
     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.
     226
     227Values outside above range give 100% duty cycle.
     228
     229Connect a laser assembly.  Reasonable things happen when I play with the PWM settings.
     230
     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.
     234
     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.
     238
     239Run a test under the following conditions:
     240
     241* no fan
     242* TEC PS set to 3.2V
     243* Set PWM to -16 for 4 minutes, then to 0 for 4 minutes
     244
     245See [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/TestLogFiles/test1.pdf PDF plot]
     246
     247Working on laser.  Can''t turn it on because temp is out of range (stat = 0xd).  This is because the resistors are wrong.
     248
     249''''2012-09-26, hazen'''
     250
     251Write laser enable code, add "E" command to SysCtrl.
     252Modify Laser/TEC code to deassert LC_SHDN.
     253
     254Now the laser driver works!  Current is controlled linearly by the DAC.
     255
     256''''2012-09-25, hazen'''
     257
     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.
     261
     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.
     265
     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.
     268
     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.
     272
     273Reconnect OPA635 output. Connect LPWR to -5V supply.  Attach dummy load and power up slowly.
     274AOK, no current, all laser-related voltages near zero.
     275
     276Reinstall in crate with external laser supply.  AOK.  Now the challenge is to get all
     277the interlocks dealt with so the laser turns on...
     278
     279Check inputs of U12:
     280
     281{{{
     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
     287
     288}}}
     289Sigh. Start with TEMP_FAIL.  No sensor, so need to short 1-2 on J12.  OK now.
     290
     291I_SHUTDOWN comes from backplane INTERLOCK.  Off to the system controller.  Eeek!  This is an OR of many many things:
     292
     293{{{
     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
     300
     301}}}
     302
     303''''2012-09-13, hazen'''
     304
     305Power ''B' jumpered on LTB board 1 top channel.
     306
     307Now working:
     308* Bidirectional MODBUS communications (with some ugly 5ms delays)
     309* ADCs on LTC
     310* Remote reset
     311
     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.
     314
     315Jumper power on 2nd channel and repeat test -- same results :(
     316
     317Double-check:
     318* package markings on U14, U16 (both SOT-23).
     319* orientation of U14
     320* pinout of Q6
     321
     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.
     325
     326''''There should probably be a series resistor on U14 output'''.
     327
     328
     329''''2012-09-11, hazen'''
     330
     331Give up on bootloader for now, on with hardware testing.  Current non-working version at ohm:Proj/Frangioni/LaserDriver/Firmware and ../Software/Rev2.
     332
     333Need to get ModBus working.
     334
     335''''2012-09-08, hazen'''
     336
     337Next step is bootloaders.  Here are some candidates:
     338
     339* [http://www.hhhh.org/wiml/proj/avr/ssbl.html SSBL]
     340* [http://kavr.sourceforge.net/ KAVR]
     341
     342For the SC a more elaborate version (can be in C) is needed to provide remote
     343loading of the LT boards.
     344
     345''''2012-09-07, hazen'''
     346
     347Working on ''''System Controller'''
     348
     349''''Remove R5, R6 on Laser/TEC board to isolate I2C busses'''.
     350
     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!
     354
     355''''2012-09-06, hazen'''
     356
     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.
     360
     361{{{
     362  FUSES:  L = 0xe1  (unchanged)
     363          H = 0xd9  (was 0x99)
     364          E = 0xff  (was 0xfd)
     365
     366}}}
     367Now blinky lights on DB-9 work!
     368
     369''''2012-09-05, hazen'''
     370
     371Looking at [http://ohm.bu.edu/~hazen/DataSheets/Atmel/doc8160.pdf ATmega64A datasheet]
     372
     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.
     376
     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:
     379
     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
     385
     386With correctly installed fixes as above, it works (avrdude can read the chip ID).
     387
     388Meanwhile, found [http://www.linuxquestions.org/questions/programming-9/serial-ioctl-221632/ this thread]
     389code which controls the DTR line, which we will need to operate the
     390
     391''''2012-09-04, hazen'''
     392
     393Initial checkout of Laser/TEC board.  Install latest avr-libc and gcc-avr for Ubutuntu 10.04.
     394
     395''''Add m164 support to avrdude'''.  Copy /etc/avrdude.conf to ~/.avrduderc.  Copy "m128p" section
     396as "m128" and change signature bytes.
     397
     398Now this incantation works:
     399
     400{{{
     401  sudo avrdude -p m164 -P usb -c avrispmkII -U flash:w:main.hex
     402
     403}}}
     404Create a blinky light program; doesn''t work.  Maybe the fuses?
     405Currently the fuses are:  L: 0x62  H: 0x99.  Check data sheet, seems fine.
     406
     407''''Must disable JTAG'''.  Set JTAGEN fuse = 1 (hfuse=0xd9):
     408
     409{{{
     410  sudo avrdude -p m164 -P usb -c avrispmkII -t
     411  avrdude> w hfuse 0 0xd9
     412  avrdude> q
     413
     414}}}
     415Now the blinky lights work fine!
     416
     417Create DAC code from twitest.c on avr-libc page.  Works!
     418DAC ramps from 0..2.5V.
     419
     420''''Initial System Controller Checkout'''
     421
     422Apply +12V to pins 30, 32 of VME.  5V is OK (need heatsink connection on VRs).
     423Install jumper J9 to power USB/serial thingy.
     424
     425USB device enumerates correctly as (4) /dev/ttyUSBx devices.
     426Avrdude can''t talk to the uC though:
     427
     428{{{
     429 hazen@EDF-PC-1:~/AVR/SysCtrl$ sudo avrdude -p m64 -P usb -c avrispmkII
     430 
     431}}}
     432{{{
     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.
     439
     440}}}
     441Investigate tomorrow.
     442
     443
     444''''2012-08-31, hazen'''
     445
     446Order the following for test setup:
     447
     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:  [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/ControlTest/ControlTest.pcb PCB] [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/ControlTest/ControlTest_pcb.pdf PDF]
     450 * Schematic: [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/ControlTest/ControlTest.sch SCH] [http://ohm.bu.edu/~hazen/Frangioni_Public/Laser/ControlTest/ControlTest_sch.pdf PDF]
     451* Digi-Key order 33928003 with various parts for above, including NTC 10K thermistors (Digi-Key BC2301-ND,
     452 * [http://ohm.bu.edu/~hazen/DataSheets/Vishay/ntcle100.pdf Vishay NTCLE100E3103JB0]
     453* 3x SparkFun FTDI basic USB/serial adapter 5V
     454
     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.
     456