ELL14 Documentation - Polarization-Lab/ULTRASIP-FIREXAQ GitHub Wiki

ELL14 Motor

The ELL14 motor by ThorLabs (shown below) is piezo-electric motor with an angular resolution of 0.002511 degrees per motor pulse. It’s like a really small, really lightweight stepper motor. It is used to rotate the polarizer on ULTRASIP to very precise positions. MATLAB communicates with the motor over serial, specifically a microUSB to USB cable. It can be accessed through a COM port.

When first plugged in, the motor will calibrate itself, indicated by the red and green lights. The motor will be ready for operation when the red light shuts off.

More information on operation here

Command Structure

Commands are 4 bytes long:

  1. Device address, single character hex number, 0 by default
  2. First character in two character data on what you want the motor to do, example “m” in “ma” or move absolute
  3. Second character in two character data on what you want the motor to do, example “a” in “ma” or move absolute
  4. Eight hex digits to encode the parameters of the command in bytes 2 and 3, example “00004600”

For position information, byte 4 is to be 8 characters long. See following sections on how to use each code.

Command Parameters

Move commands are read as “number of motor pulses” in hex. To convert degrees to motor pulses, simply multiply the desired angle by 398.22222222 and round. Pad with zeros for positive numbers until 8 characters long.

A Note on Negative Positions

The ELL14 is capable of reading negative positions and encodes negative parameters as the two’s compliment of the respective hex positive hex code. For example: 0004600 (90 degrees) becomes FFFFBA00 (-90 degrees).

To convert to two’s compliment, subtract F by each digit and add one. Or more simply, flip each digit across this line and add one:

0 1 2 3 4 5 6 7 | 8 9 A B C D E F

For example, 00004600 becomes FFFFB9FF + 1 or FFFFBA00

Essential ELL14 Commands

  • Set Parameters

    • Set Jog (sj) -> Change jog step size
    • Set Offset (so) -> Change the ELL14 offset or home to specified angle
    • Set Velocity (sv) -> Change rotation speed. Speed is read as percent of maximum speed in hex
  • Change position

    • Move Absolute (ma) -> Move the ELL14 to the specified angle relative to the home position
    • Move Home (ho) -> Move the ELL14 to the home position, set byte 4 to 0 for CW or 1 for CCW
    • Jog (fw or bw) -> Change motor position determined by set jog (sj)
  • Request Status (use query() instead of fprintf())

    • Get Position (gp) -> get position at specified address, ex: 0gp
    • Get Offset (go) -> get offset at specified address, ex: 0go

Communicating with MATLAB: fprintf vs query

Two functions are helpful for sending commands to the ELL14 after connecting to the device using the COM port, fprintf() and query()

fprintf() is useful when sending position commands and for setting parameters. To use fprintf(), structure the inputs like so:

fprintf(ELL14, “%s”, command info)

query() is similar to fprintf() but can receive information from the specified device. query() is useful when receiving information from the ELL14. Structure commands like so:

query(ELL14, “%s”, command info)

It is also possible to assign device output to a variable by doing the following:

var = query(ELL14, “%s”, command info)

ELL14 Communications Protocol Manual

For more information on communicating with the ELL14, see the ThorLabs ELLx Communications Protocol