5.10 17 point calibration option
6 REAL TIME, SERIAL and ANALOG DATA OUTPUT
6.1 Serial data output
Eye tracker data can be output through an RS232 port, labeled “Serial Out” on the model 5000 Eye Tracker Control Unit. The port is set to 57600 baud, 8 data bits, 1 stop bit, no parity. Other baud rates are also possible (consult ASL for details).
6.1.1 Interface Cable
The model 5000 Eye Tracker Control Unit “Serial Out” connector is a 9 pin male D type. Only "Transmit", "Receive", and "Ground" lines are used.
SERIAL OUT Signal
3 --- serial data from host to 5000CU 2 --- serial data from 5000CU to host 5 --- Ground
An example is shown below of wiring for a cable to connect the eye tracker “Serial Out” port to a standard 9 pin COM port on a PC.
9 pin female 9 pin female 2 --- 2
3 --- 3 5 --- 5
6.1.2 Protocol and data format
The data output port can be set to use either a demand mode or a streaming mode. In the demand mode, the host computer requests a data field by transmitting a single byte of any value. In response, the eye tracker transmits a field of data. After a data request is received from the host, the eye tracker PC will begin to transmit the requested field within one update interval.
In the streaming mode, no data request is required. Data will continually stream from the “SERIAL OUT” port. The data is encoded, however, so that the first byte of a data field can be identified.
Encoding of the standard 8 byte data field is shown below
Note that most significant bit of the first data field byte is always set (1). The most significant bit of all other bytes in the data field are always reset (0). For the standard data set, the encoded data field is 10 bytes long rather than 8 bytes. The host computer must find 10 sequential bytes starting with a byte whose most significant bit is 1, then decode the data by reversing the encoding process shown above. Sample source code for decoding streaming data can be provided by ASL upon request.
The standard data buffer consists of the 8 bytes listed in Table 6-1.
Table 6-1. Standard Serial Out data feild byte description
1 Status (0 = normal, >0 = error condition)
2 Pupil diameter, most significant byte (0=loss)
3 Pupil diameter, least significant byte
4 <Used only by model 501 system with EYEHEAD Integration>
5 Point of gaze horizontal coordinate most significant byte (scene monitor coordinates)
6 Point of gaze horizontal coordinate least significant byte
7 Point of gaze vertical coordinate most significant byte
8 Point of gaze vertical coordinate least significant byte
Note that if using the streaming mode, the above list shows the data after decoding. Each coded data field read by the host will consist of 10 bytes.
The system can also be set to provide alternate data buffer contents. The buffer contents and the output mode (demand or streaming) are controlled by a value in the e5000.cfg file. View e5000.cfg (in the same directory as e5Win) with a text editor. Find the line that reads:
serial_data_output_format_type=
For the standard 8 byte output buffer, in demand mode, set the value after the equal sign to 1. For the same buffer contents, but in streaming mode, set the value to 129. For other alternatives, consult ASL. Resave the file as e5000.cfg.
6.2 Analog data output
Two channels of analog output are available on the eye tracker control unit port labeled “Analog I/O”. One analog channel outputs a voltage corresponding to the horizontal eye position coordinate, and the other outputs a voltage corresponding to the vertical eye position coordinate. The voltages are proportional to the horizontal and vertical positions of the point of gaze cursor on the scene monitor and the digital gaze coordinates. Pupil diameter is not normally output, but when no pupil is recognized, the analog outputs are set to a specific default value.
Although the maximum voltage swing on each channel is from 0 to 12V, when the cursor is within the scene monitor display space the swing is actually from +3V to +9V. The voltage should exceed 9 V only if the subject looks beyond the part of the scene shown at the bottom or right edge of the scene camera image, or if the system mistakes some extraneous reflection for a pupil or CR and produces nonsense data. Normally, approximately 3V from both channels corresponds to the upper left corner of the scene monitor, and 9V from both channels corresponds to the lower right corner. The center of the scene monitor screen should correspond to about +6V.
The analog outputs do respond when in "Set target" or "Check target" point modes. For example the “Set target” function, which allows the point of gaze cursor to be controlled with the mouse, can be used to check the precise correspondence between any point in the scene image and the analog outputs.
Analog outputs are on pins 3 (vertical) and 4 (horizontal) of the nine pin connector, and signal ground is on pins 6-9. The entire pinout list for the nine pin "analog I/O" connector is shown in a table at the end of this section.
The analog output will reflect averaging (number of fields to be average is specified in "System settings" dialog window, under config menu) as does the digital data and the scene monitor cursor. The scene monitor cursor position as well as the analog values will freeze at their last position during pupil or CR loss for a number of fields specified in the e5000.cfg file ("eye_position_blink_filter_value =”), and will then jump to a default value until the pupil is once again recognized. This is to prevent blinks from causing the values to “jump”, as previously explained in section 5.4. The default analog values are approximately 3 Volts (corresponding to the point of gaze cursor at the upper left corner of the scene monitor). The default for the number of fields during which the value will freeze during losses is "eye_position_blink_filter_value=12". Simply edit the e5000.cfg file (with any text editor) to change this to any desired value. Setting it to
zero will cause the values to immediately jump to the default value during any field in which the pupil is not recognized. In other words, neither the scene monitor cursor nor the analog values will freeze at their previous value for any period of time during pupil losses, but will go to the default position for the entire period during which the pupil is not recognized.
Note that the “blink_filter” value is a number of fields, not a time. When running at 60 Hz, 12 fields corresponds to about 200 msec, but at 240 Hz it only corresponds to about 50 msec. The value must be adjusted depending on the update rate being used. Setting the number of fields to be averaged to either 0 or 1 disables averaging.
The analog values remain “live”, rather than showing target positions, during calibration.
Table 6-2. Analog I/O connector
Pin Function
1 (not currently implemented) 2 (not currently implemented) 3 Vertical eye position 4 Horizontal eye position 5 +12V