IRCAM_SERIAL_ILLUMINATE

Section: User Commands (1)
Updated: Oct 2012
Index Return to Main Contents
 

NAME

ircam_serial_illuminate - illuminate the IR camera with either LEDs or a Laser, controlled by USB-serial-port (DTR/RTS).

 

DESCRIPTION


 
 INTRO:  ircam_serial_illuminate is used to control the IRCAM light exposure: either a geometric LED/lamp-board or a white LED,
         bulb via one of the control pins of a serial(or USB-serial) port. This makes remote and automated testing more useful.
         The 'torch' is a 4W white LED MR16 bulb which may be positioned to be in focus, out of focus, or very-out-of-focus.
         The LED/lamp board is a geometric pattern of selectable, regulated, variable-brightness, IR/Red/Green/Blue LEDs or 
         tiny filament bulbs behind 1mm pinholes, dimly illuminated, giving a black-body spectrum.
         To view the illumination levels, use the webcam which looks up at the dewar-window: ircam_inspect_focus. 
 
 USAGE:  ircam_serial_illuminate  OPTIONS
    -s   DEVICE    use serial port DEVICE. [default: /dev/ttyUSB_611033].
    -l   STATE     set LED/Lamp board to STATE. [Values: 0,1].
    -t   STATE     set torch (white LED) to STATE.   [Values: 0,1].
    -z             turn off everything. Equivalent to '-l0 -t0'.
    -c             detect adapter on serial port (check loopback: DTR->CTS). Then leave everything off.
    -b             blink LEDs for diagnostics: red (Lampboard,DTR) 1 s on; 2 s off; yellow (Torch, RTS) inverted.
    -q             fail quietly: even if the loopback DTR->CTS fails on -l/-t, exit 0 anyway.
    -h             show this help.
    -p             print state of outputs (read back from port). (Also happens if no args given).
 
 EXIT STATUS:
     0             on success.
     1             on error.
     2             if serial port, or circuit not found, or loopback fails (unless -q).
 
 WIRING:  This is the circuit used, connected to a DE9-F connector. RTS is the trigger; RI is for readback.
          The unusual pairing of DTR/CTS is used to detect whether this custom circuit is plugged into the port.
          Serial port signals swing ~ +/- 10V. Control lines logic 1 is positive (though Tx/Rx are inverted).
 
                                               +-----+-------------------[ 4W White LED  ]----+-- +12V
  #7 RTS -->---+                YELW LED       c     | BC109,            [ MR16 bulb 12V ]    |       
               |-----/\/\/\/\------|>|-------b{      c BD135                                  |       
  #9 RI  --<---+       2k2        a   k        e---b{                       [ LED / LAMP ]    |       
                                                     e     +--------+-------[ BOARD 12V  ]----+       
  #4 DTR -->---+                 RED LED             |     c        |       [ IR/Red/... ]            
               |-----/\/\/\/\------|>|-------------------b{         c                                 
  #8 CTS --<---+       2k2        a   k              |     e------b{   BC109,BD135 (NPN)              
                                                     |              e  DARLINGTON PAIR                
  #5 GND --------------------------------------------+--------------+---------------------------- GND 
 
 
 DIAGNOSTICS:  To read the current status from the serial port, use 'statserial'. For example:
      X=0x$(statserial -x /dev/ttyUSB_611033); echo RI:$(($X&0x80)), CTS:$(($X&0x20)), RTS:$(($X&0x4)), DTR:$(($X&0x2))
 
 BUGS: * Sometimes, on USB serial ports, the loopback detection fails, falsely. Re-invoke the program.
       * Invocation with -c to check causes all outputs to be turned off; State isn't preserved.
       * Just checking the 'saved' state (-p) changes the outputs.
       * Using the loopback check changes the outputs. Maybe better to use TxD + RxD, or DSR/DCD?
       * This version of the program was compiled with BUGGY_HARDWARE = 1.
 
 SEE ALSO: pb_serial_trigger, 'setserial -g /dev/ttyS*', statserial, tty_ioctl.
 

 

AUTHOR

The author of ircam_serial_illuminate and this manual page is Richard Neill, <ircam#AT(spamblock)#richardneill.org>
Copyright Oct 2012; this is Free Software (GPL v3+), see the source for copying conditions.

 

SEE ALSO

ircam_inspect_focus(1), pb_serial_trigger(1), ircam_init(1)


 

Index

NAME
DESCRIPTION
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 16:21:52 GMT, November 19, 2013