Optotune MR-E-2 User manual

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 1 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
MR-E-2 Development Kit
Operation Manual

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 2 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Copyright ©2019 Optotune Switzerland AG. All Rights Reserved. The MR-E-2 development kit hardware and
corresponding software Optotune Cockpit shall only be used in connection with the evaluation of the MR-15-30
and MR-10-30 mirror product families. Any other use is not permitted without the prior written authorization
of Optotune Switzerland AG.
IN NO EVENT SHALL OPTOTUNE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS MIRROR DRIVER MR-
E-2 DEVELOPMENT KIT AND ITS DOCUMENTATION, EVEN IF OPTOTUNE HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
OPTOTUNE SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE MIRROR DRIVER MR-E-2
DEVELOPMENT KIT AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
IS". OPTOTUNE HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 3 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Table of Contents
1Overview ......................................................................................................................................................... 5
2Software and System requirements................................................................................................................ 6
3Mechanical Details .......................................................................................................................................... 7
3.1 Base Unit................................................................................................................................................ 7
3.2 Head Unit............................................................................................................................................... 7
3.3 Heatsink................................................................................................................................................. 7
4Hardware Operation ....................................................................................................................................... 9
4.1 Package Contents and Description........................................................................................................ 9
4.2 Power supply specifications .................................................................................................................. 9
4.3 Hardware Connections ........................................................................................................................ 10
5Mirror Coordinate System ............................................................................................................................ 12
5.1 Explanation of the XY Coordinate System ........................................................................................... 12
5.2 Transformation to and from Spherical Coordinates............................................................................ 13
5.3 Relationship between Mirror Coordinates and Projected Points on a Rotated Screen ...................... 13
6Optotune Cockpit.......................................................................................................................................... 15
6.1 Installation of Optotune Cockpit ......................................................................................................... 15
6.2 MR-E-2 Connection.............................................................................................................................. 15
6.3 Mirror Control ..................................................................................................................................... 16
6.4 Factory Reset....................................................................................................................................... 18
6.5 Examples.............................................................................................................................................. 18
6.5.1 Closed loop static operation ........................................................................................................... 18
6.5.2 Mixed Mode Waveform Operation................................................................................................. 19
7Simple Serial Communication Mode............................................................................................................. 21
7.1 Installation of a Serial Communication Terminal ................................................................................ 21
7.2 Step-by-Step procedure....................................................................................................................... 21
7.3 List of commands available ................................................................................................................. 23
8Analog Mode................................................................................................................................................. 25
8.1 Input Pins and Signal Levels................................................................................................................. 25
9Python framework ........................................................................................................................................ 26
10 SPI Interface .................................................................................................................................................. 27
10.1 Interface .............................................................................................................................................. 27
10.2 Framing................................................................................................................................................ 28
10.3 Timing and synchronization................................................................................................................. 28
10.4 Data Structure ..................................................................................................................................... 28
10.4.1 Master Out, Slave In (MOSI) ....................................................................................................... 28
10.4.2 Master In, Slave Out (MISO) ....................................................................................................... 29
10.5 Examples.............................................................................................................................................. 29

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 4 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
10.5.1 Setting open loop to both axis and reading back X Y.................................................................. 29
10.5.2 Setting closed loop triangular to X axis and open loop sinusoidal to Y axis ............................... 30
10.5.3 Activate analogue mode ............................................................................................................. 31

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 5 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
1Overview
The MR-E-2 is a fully integrated driving solution for the Optotune MR-series beam steering mirrors. It provides
access to the full functionality of the mirrors, including open and closed loop control. The user can control the
mirror and perform operations in various modes such as waveform operation or static pointing. This document
serves as an operation manual for the mirror driver.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 6 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
2Software and System requirements
•Windows 10 or later
•USB Driver: USB 2.0 port
•Optotune Cockpit Control Software (link)
•Optional: Serial communication terminal software such as Windows Hyper-Terminal (only required for
simple serial communication mode)

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 7 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
3Mechanical Details
All numbers in the mechanical drawings are in millimeters.
3.1 Base Unit
3.2 Head Unit
The two mounting holes on the mirror head are M4 tapped.
3.3 Heatsink
Optotune provides a heatsink with each mirror head. Depending on the operation mode, the mirror head by
itself may not be able to dissipate the head generated by the driver and may shut off due to overheating. In this
case, either mount the mirror head flat on a large enough heatsink or attach the heat sink supplied by Optotune.
Attach the heatsink (2) to the mirror head (4) by inserting the M2 mounting screws (3) into the through-holes on
the mirror head and tightening them. A protective cap (1) can protect the mirror surface when not in operation.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 8 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Warning: During operation the mirror head can become hot (up to 85°C). Avoid touching
the mirror head during operation and ensure not to place heat-sensitive equipment in the
immediate vicinity of the mirror head.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 9 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
4Hardware Operation
4.1 Package Contents and Description
The figure above shows all parts contained in the MR-E-2 Dev Kit package. The driver consists of a base unit with
control electronics and connectors in a protective enclosure. A cable connects the base unit to the mirror head
containing the analog driving electronics. Also included is a power supply and a USB cable. The included push-in
type carrier board I/O Connector facilitates wiring for SPI, Analog and UART operation.
Important: Depending on how the mirror operates, the mirror head by itself may not be
able to fully dissipate the generated heat into the surrounding air and may shut off due to
overheating. Ensure proper heat-dissipation by using the heatsink supplied by Optotune or
mount the head on a large enough heat-sink with good thermal contact.
4.2 Power supply specifications
The driver hardware includes a power supply. Specifications for the power supply are:
Specifications
Value
Units
Minimum Output Voltage (Vdc)
15
Vdc
Maximum Output Voltage (Vdc)
28
Vdc
Minimum Output Current (A)
2
A
Minimum Output Power (W)
20
W
The model number of the power supply is PSAA30R-150, a replacement can be purchased directly from
Optotune.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 10 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
4.3 Hardware Connections
The back panel of the MR-E-2 base unit has three connectors. In addition to the power connector, it features a
USB type B connector allowing control through Optotune Cockpit software and for simple serial mode operation.
The mirror head is connected to the base unit on the D-sub connector labeled Mirror.
WARNING: Do not connect or disconnect the mirror head cable while the base unit is
connected to power. This will damage the driver and void warranty!
The only connector on the front panel is an I/O connector. The pin-out is given in Table 1. Odd numbered pins
are in the top row, even numbered pins in the bottom row. Use the included push-in-adapter to facilitate cable
connection (shown in the figure above). The status LED reflects the state of the driver. Red light indicates an
active error. Green light indicates that there is no active error.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 11 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Pin# in I/O Connector
Signal
Description
1
AI_X
Analog Input X axis
2
AI_Y
Analog Input for Y axis
3
GND
Circuit ground
4
GND
Circuit ground
5
SPI_MOSI
SPI Master Output Slave Input
6
SPI_CLK
SPI Clock
7
SPI_NSS
SPI Negative Slave Select
8
SPI_MISO
SPI Master Input Slave Output
9
GND
Circuit ground
10
SPI_DATA_NRDY
SPI Data Not Ready
11
-
Reserved
12
-
Reserved
13
-
Reserved
14
-
Reserved
15
-
Reserved
16
-
Reserved
17
ERROR
Indicates an active error
18
UART_TX
UART Transmit line
19
UART_RX
UART Receive line
20
GND
Circuit ground
Table 1 I/O Connector pin-out

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 12 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
5Mirror Coordinate System
5.1 Definition of the XY Coordinate System
We define a coordinate system to calibrate the internal optical feedback mechanism and relate it with physical
mirror position. This coordinate system is a cartesian coordinate system with axes X and Y. The X-axis is
perpendicular to the cable protruding from the mirror head and the Y-axis is parallel to this cable. The numerical
values on the axes are unitless and defined via the maximum deflection of the mirror in optical angles, i.e. 50°.
Along each axis, a deflection of +50° corresponds to a value of +1 and a deflection of -50° corresponds to a value
of -1. This corresponds to the projection observed on a screen if the mirror reflects a laser beam incident on its
center. For example, the analytical relationship between deflection angle θand coordinate system value along
the x-Axis is:
The figure below illustrates the relationship between deflection on-axis and coordinate system value using three
examples.
The mirror has a maximum deflection of 25° in every direction. Therefore, in the XY coordinate system a unit
circle with radius 1 contains all accessible values, as shown in gray color in the figure below.
The mirror can access every possible combination of X and Y values for both X and Y < 0.7 (black square in the
figure above). If one of the XY values exceeds 0.7, the other value must decrease, so that at any time
(the red dot in the figure above is an example). The firmware automatically reduces XY positions outside the
accessible unit circle by moving them to the nearest edge of the unit circle (green dots in the figure above). This
behavior prevents mirror and driver damage.
When driving the mirror in open loop mode, it is possible to reach angles larger than 25°, which correspond to
XY values bigger than 1. However, these angles are outside the guaranteed and calibrated range of the mirror
and calibration accuracy can vary significantly.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 13 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
5.2 Transformation to and from Spherical Coordinates
It is also possible to express the mirror position by using spherical coordinates instead of the XY coordinates
introduced above. Spherical coordinates are not available in the MR-E-2 firmware and software. In this
coordinate system, two angles define the mirror position: A polar angle between the mirror normal vector in the
deflected position and the mirror normal in the XY position (i.e. the z-axis), together with an azimuthal
angle defined as the angle between the x-axis and the projection of the mirror normal onto the xy plane.
The following equations transform XY coordinates into spherical coordinates :
The following equations transform spherical coordinates into XY coordinates:
5.3 Relationship between Mirror Coordinates and Projected Points on a Rotated Screen
As outlined above, we define the mirror coordinate system as the projection generated by a ray incident
perpendicular onto the center of the mirror in the (0,0) position on an imaginary screen at the unitless distance
away from the mirror surface. In an actual application, for example with a laser beam shining
perpendicularly onto the mirror, the pattern generated on a screen perpendicular to the laser at a distance
from the mirror will be exactly as specified in XY coordinates, scaled with the factor
.
If the mirror is oriented at an angle with respect to the projection screen, the projected pattern will be distorted.
This distortion is known as Keystone distortion. You can correct this distortion by applying a matrix
transformation to the input points, depending on the angles αand βat which the mirror is oriented with respect
to the screen. Here, α is the angle between the projection plane and the plane containing the x and z axes.
Furthermore, β is the angle between the projection plane and the plane containing the y and z axes. The
projected point is related to mirror coordinate system point via the following equation:

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 14 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Using the vector , we obtain the projected point coordinates via and . These
coordinates again need to be scaled by
.
Consider the following example. A laser beam shines on the mirror at a 45° angle with respect to the mirror
normal vector. The mirror reflects the beam onto a screen. This screen is oriented perpendicular to the beam
incident on itself. In effect, the angle between projection surface and mirror coordinate system is 45°. This will
lead to a distortion described by the following transformation matrix:
The plot below relates the projection to the initial mirror coordinates.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 15 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
6Optotune Cockpit
This section provides a short overview of the Optotune Cockpit software. It describes the main functions to
control the mirror. For a complete reference, please refer to the Optotune Cockpit Manual (link).
6.1 Installation of Optotune Cockpit
Download the Optotune Cockpit Installer from the Optotune website (link). Open the installer file and follow the
instructions on the screen.
6.2 MR-E-2 Connection
Make sure that the MR-E-2 is connected via USB to the computer and powered. Open Optotune Cockpit and click
on Connect Device.
A window will appear, allowing you to select the device. You can also change the displayed name of the device
for this session. This makes it easy to control several devices with the same computer.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 16 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
After clicking connect, the device will appear on the left side of the Optotune Cockpit window. You can add
additional devices at any time by clicking + and repeating the steps above.
6.3 Mirror Control
The two main panels for controlling the mirror are Input Signal and Control Mode. In the Control Mode window,
you can choose to operate the mirror in closed loop or open loop via the drop-down menus. The X and Y axes
are independent and can run with different control modes. After choosing the desired modes, click Set to
device to send the settings to the driver.
Advanced users can also set the P, I and D gain of the closed-loop PID controller. We recommend keeping the
standard values optimized by Optotune, unless for a specific application tuning is necessary. Contact Optotune
support if you believe that the standard PID control parameters are not suitable for your application and you are
unsure how to tune them.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 17 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Having set the control modes for both axes, you can then use the Input Signal panel to start controlling the
mirror. There are two ways to control the mirror through this Panel, either with Real Time Input on or off. If
Real Time Input is set to on, any changes in the panel are transferred directly to the driver and take effect
immediately. If it is turned off, you need to press Set to device after making changes for them to be send to the
driver.
MR-E-2 can be set to four different operational modes:
•Static value: Optotune Cockpit sends a single position or current value to the driver.
•Signal generator: The internal signal generator within the driver sends a time-dependent stream of
position or current values until it is interrupted. Available signal generating functions are Sinusoidal,
Rectangular, Sawtooth and Triangular.
•Arbitrary vector: The driver reads a set of user-defined positions or currents one after another and
sends them to the mirror.
•Analog input: The driver switches to Analog input mode (see section on analog control).
Important: Make sure that the unit type in the Signal Input panel matches the control
mode set for the corresponding axis. Closed loop control is only possible with XY unit type.
Open loop control is only possible with Current unit type.

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 18 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
6.4 Factory Reset
You can always return to factory setting by opening the Snapshot manager panel and loading snapshot 1.
Snapshot 1 contains the factory settings and cannot be overridden.
6.5 Examples
In this section we show two examples on how to control the mirror with Optotune Cockpit. The first example
includes setting both axes to closed loop control and moving the mirror to a specific point. The second example
demonstrates how to operate in mixed mode waveform operation.
6.5.1 Closed loop static operation
We will move the mirror to the position [0.2, -0.2]. First, set both axes to closed loop control in the Control Mode
panel and click Set to device.
Next, open the Signal input panel. Under Input signal X choose static value. Repeat the same step for the Y-axis.
In the Input signal X drop-down menu, choose unit type XY and set the value 0.2 either using the slider or typing
it in directly. Repeat this for the Y-axis and set a value of -0.2. The panel should now look like this:

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 19 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Now click Set to device and observe the mirror moving to the [0.2, -0.2] position.
6.5.2 Mixed Mode Waveform Operation
We will set the X-axis to closed loop triangular waveform mode with an amplitude of 0.25 and a frequency of 2
Hz. The Y-axis will operate in open loop sinusoidal waveform mode with an amplitude of 0.1 A and a frequency
of 30 Hz. We call the situation with one axis operating in closed loop and the other axis operating in open loop
mixed mode operation.
First, set the X-axis to closed loop mode and the Y-axis to open loop mode in the Control Mode panel. Click Set
to device.
Next, move to the Input signal panel. Set the input signal of the X-axis to Signal generator and activate Toggle
running. Set Unit type to XY and Shape to Triangular. Set Frequency to 2 Hz and Amplitude to 0.25. Set the input
signal of the Y-axis to Signal generator and activate Toggle running. Set Unit type to Current and Shape to
Sinusoidal. Set Frequency to 30 Hz and Amplitude to 0.15. The settings should now look like this:

MR-E-2 Development Kit Operation Manual
Rev: 1.0
PRELIMINARY
Copyright © 2019 Optotune
Page 20 of 31
No representation or warranty, either expressed or implied, is made
as to the reliability, completeness or accuracy of this paper.
Optotune AG | Bernstrasse 388 |CH-8953 Dietikon |Switzerland
Now click Set to device and observe the mirror movement.
Table of contents
Popular Microcontroller manuals by other brands

Cypress Semiconductor
Cypress Semiconductor EZ-USB GX3 CY4701 Reference Design Guide

Texas Instruments
Texas Instruments CC110 Series Design guide

Atmel
Atmel SMARTCARD XPRO user guide

Analog Devices
Analog Devices Linear Technology ADI Power DC3159A Demo Manual

Texas Instruments
Texas Instruments MSP430F67761 manual

QRPGuys
QRPGuys KX Single Lever Mini Paddle manual

Infineon
Infineon EVAL-M3-302FTOBO1 user guide

Elenco Electronics
Elenco Electronics K-20 Assembly and instruction manual

ZiLOG
ZiLOG ZNEO Series quick start guide

Silicon Laboratories
Silicon Laboratories C8051F530A user guide

APPOTECH
APPOTECH AX2228D user manual

NXP Semiconductors
NXP Semiconductors SAFE ASSURE Qorivva MPC5602P Reference manual