Direct Modulation of Vortran Stradus Diode Lasers Using Micromanager Software

[Credits:   Manoj V Mathew, Centre for Cellular and Molecular Platforms (CCAMP), Bangalore, India.
Experiments were conducted at the Central Imaging and Flow Cytometry Facility (CIFF), National Center for Biological Sciences (NCBS), Bangalore, India.]

Diode lasers are very popular these days as sources of excitation for various fluorescence microscopy applications. 

In the earlier days of this technology, it was plagued by problems like lack of reliability, inferior beam quality, and operation at lower powers. This technology has evolved rapidly over the last decade and they have come a long way. The beam quality of the latest diode lasers is very close to the ideal TEM00 mode with M2 values <1.3, which is very good. The diode lasers are now very suited for applications like confocal microscopy that demands near-perfect Gaussian beam profiles.

They have numerous advantages over the conventional gas lasers:

  1. Available in a large range of wavelengths (all standard fluorophores can be excited using commercially available diode lasers)
  2. Available at rather high optical powers (10s of milliWatts to few Watts)
  3. Consumes much less power for compared to gas lasers of same output optical power
  4. Produces much less heat
  5. Have much longer lifetimes (upto 10000 hours)
  6. System and Operation costs are lower

The biggest advantage, however, is that they can be directly modulated. You can control the laser intensity and blank (switch ON and OFF) by directly modulating the laser diode current. The blanking can be performed at very high speeds of the order of few 100 MHz. This means you can avoid the use of an external device like AOTFs for blanking and intensity modulation. This makes laser excitation based microscope (like TIRF, Confocal, SIM etc.) design, especially its laser combiner design much simpler.

In this write-up, I will describe how to configure a 'Vortran Stradus Diode Laser' using Micromanager software and directly modulate it using the software. I used a Stradus® 488-150 laser here. Figure 1848/1 shows the picture of the laser and its controller.

Figure 1848/1: Vortran Stradus 488-150 laser. A) Laser head mounted on the heat sink and B) Laser controller

The laser datasheet is shown in Figure 1848/2.

Figure 1848/2: Data sheet of Vortran Stradus 488-150 laser (Ref: Vortran Webpage)

Step 1: Hardware setup

Connect the laser head to the heatsink. Then connect the laser driver cable from the laser controller to the laser input port of at the back of the laser head. This is shown in Figure 1848/3.

Figure 1848/3: Connecting the laser driver cable to the laser input port at the back of the laser head

Interface the laser controller to the PC using an RS232 cable. The RS232C port is available at the front end of the controller If you use a normal RS232C cable you would need to have a serial port (COM1) available on your PC. The easier would be to use an RS232C to USB converter. This is what I have used. This is shown in Figure 1848/4.

Figure 1848/4: RS232C cable connected to the RS232C port of the controller

The USB port at the other end of the cable can be connected to any of the available USB port on the computer.

Step 2: Loading the device drivers

Once the system is connected to the serial port (COM1 or USB) the laser controller automatically uploads the drivers and they get installed. You can verify this by checking the 'Device Manager' on the 'Control Panel' of your computer. You will see a new COM port appear in the 'Ports(COMs and LPT)' section of the 'Device Manager'. This is shown in Figure 1848/5.

Figure 1848/5: 'Device Manager' on PC showing addition of new COM (USB) port

Note the COM port number. This would depend on your PC and the COM ports already occupied.

Step 3: Installing the Votran Software

You can now install the Votran Laser Software. This is optional. Micromanager should be able to communicate with the Laser without the need for this step. But it is good to test the system out before configuring it in Micromanager. Figure 1848/5 shows the Software Interface.

Figure 1848/5: Votran Laser Software Interface

Once the software is run, it will automatically detect the lasers connected to the computer. If it does not detect select the COM port number to which the laser is connected from the 'Add RS232C Laser' tab. The interface helps you to turn the laser ON/OFF, set the laser power, and enable external triggering of the laser. Also, the laser baseplate temperature and other parameters can be monitored.

Step 4: Configuring Micromanager Software

Before running Micromanager, close the Votran Software, else the COM port will not be available for Micromanager to communicate with the Laser.

Run 'Hardware Configuration Wizard' and add 'VLTStradus|VLTStradus' from the 'Stradus' in 'Available Devices' section. This is shown in Figure 1848/6.

Figure 1848/6: Adding the Laser to Micromanager Hardware Tree

Add the laser and press 'Next'. Now, configure the COM port settings:

  1. Value: COM port number
  2. BaudRate:19200
  3. AnswerTimeout:5000

Figure 1848/7 shows the COM port settings for Micromanager to properly communicate with the Laser Controller.

Figure 1848/7: Device COM port settings

Finish the 'Hardware Configuration Wizard' by setting parameters for other devices added if any.

In the front panel of Micromanager select 'Shutter' as 'VLTStradus'. Check the 'Shutter Auto' checkbox. This is shown in Figure 1848/7

Figure 1848/7: Micromanager shutter configuration

This will help the software to blank the laser in sync with the camera acquisition by sending commands to the laser to directly modulate the diode current.

Now press the '+' button on 'Group' to add and configure the laser parameters. The Votran laser parameters can be found under the 'Shutters' section of the 'Group Editor'. This is shown in Figure 1848/8.

Figure 1848/8: Group Editor

Add the required parameters to the front panel. This is shown in Figure 1848/9.

Figure 1848/9: Micromanager front panel with Laser control parameters added

Select 'ON' on the 'Laser Emission' control and set the laser intensity in milliWatts. Then switch the  'Laser Emission' OFF. Leave the rest of the parameters as in Figure C. Now the system is ready for acquisition.

Video 1848/1 shows the laser in action controlled by the Micromanager software.

Logarithmic interval based time-lapse muliD acquisition was used to generate the switching pattern seen in Video 1848/1. The parameters used for the Logarithmic interval is shown in Figure 1848/10.

Figure 1848/10: Parameters used for Logarithmic interval based time-lapse muliD acquisition as seen in Video 1848/.

Micromanager Script for Tile Scanning with 3 Point Z Correction

[Credits:  Manoj V Mathew
Experiments were conducted at the Central Imaging and Flow Cytometry Facility (CIFF), National Center for Biological Sciences (NCBS), Bangalore, India.]

A couple of months ago a start-up-company approached me seeking help in building a low-cost slide digitizer for pathology applications. One of the issues they faced is the amount of time it took them to scan a single slide, which runs into more than a 1000 tiles at 20X mag. What adds most to this time is the Z drift compensation (software based) which needs to be performed on every tile or every few tiles.

This got me interested in writing a micromanager script for tile scanning with a built in three point Z correction option. In most applications where low magnification is used, like in the case of pathology scanners, it is not the Z drift that is the main culprit. The slide is tilted by a small amount when it is mounted. When tile scanning over the whole slide or a very large ROI using an automated XY stage, this tilt results in the image going out of focus. This tilt can be measured and corrected by providing a variable offset to the Z drive for each tile. This gives very good results even without the need for a time-consuming Z drift compensation algorithm. A hardware based (IR light used to locate the coverslip) would be a better solution for this problem, but then it is expensive.

The script can be downloaded from my GitHub Page.

The script is written to be independent of the hardware you use.The script will work if the micromanager configuration file has the camera, Z drive, and the XY motorized stage loaded.  In our setup I used a Nikon Tie, with an Hamamatsu Flash 4 V2 Camera and Prior Proscan III XY sample stage. The screen shot of the micromanager Hardware Configuration used is shown Figure B1451/1.

Figure B1451/1: Micromanager Hardware Configuration

For the script to work, you should make sure that the XY stage and the Camera are oriented right. If you move the joystick left, the stage should move left, if you move the joy stick up, the stage should move up and so on. If this is happening then the stage is configured right. Now if you check the live image and you see the same thing with respect to the stage movement, then the camera is oriented right as well. If not you might have to rotate your camera, 90 or 180 degrees. Also, make sure that a single axis motion of the stage results in a single axis motion in the camera image. Else the camera is slightly tilted. Make sure to set the microscope port to the one that has the camera connected and that the illumination is set to the required intensity.

Before you run the script enter the following system parameters in the script :

  1. Objective magnification (multiplied by intermediate magnification if used)
  2. Number of columns of pixels in the camera chip
  3. Number of rows of pixels in the camera chip
  4. Pixel size of the camera in micrometers
  5. Percentage overlap required between tiles for seamless stitching (10% usually works)

When you run the script the following happens:

  1. A GUI pops up requesting you to select the folder where you want to store the images. Select a folder to store the tiles. 
  2. The live window turns ON 
  3. A dialog pops up requesting you to move the stage to the bottom right (of the ROI on the slide you want to image) and adjust the focus manually to the optimal focus.
  4. Once you move the stage to the appropriate location and click OK another dialog pops up requesting you to move the stage to the top right (of the ROI on the slide you want to image) and adjust the focus manually to the optimal focus.
  5. Again you move the stage to the appropriate location and click OK another dialog pops up requesting you to move the stage to the top left (of the ROI on the slide you want to image) and adjust the focus manually to the optimal focus.
  6. This marks the three corners of the rectangle (ROI) you intend to image and measures the optimal Z focus at each corner.
  7. From the system parameters and the data obtained from the three corners, the script calculates the following: a. the size of each tile, b. No: of columns of the tile matrix, c. No: of rows of the tile matrix, d. the fixed X and Y stage offset for each tile and e. the linearly variable Z offset for each tile.
  8. The stage and Z drive is offset for each tile and an image is acquired and saved in the specified folder. The images are consecutively named using integers in '.tif' format. The first tile will be named 1.tiff and the last one (No: columns of tile matrix X No: of rows of the tile matrix).tif. 

The images can be stitched using the stitching plugin in FIJI.

For stitching in FIJI select: Plugins->Stitching->Grid/Collection Stitching

In Grid/Collection Stitching use the parameters as shown in Figure B1451/2.

Select Type=Grid:row-by-row. Select Order=Right&Down.

Figure B1451/2: Grid Collection  Parameters

Click OK and configure the stitching parameters as shown in Figure B1451/3.

Figure B1451/4: Image stitiching parameters

The micromanager script computes the column and row sizes of the tile matrix. This is printed while the script executes.

We had some very old blood smears. I imaged few of them using the micromanager script and stitched the tiles using FIJI. A screen shot of one of the stitched images is shown in Figure B1451/3. The figure shows the screen shot of an image of a blood smear slide imaged at 30X (20x Objective and 1.5X intermediate magnification). The image is a stitch of 779 (41x19) tiles, spanning an area of approximately 2cmX1cm of the slide.

Figure B1451/4: Screen shot of a stitched image of 779 (41x19) tiles, spanning an area of approximately 2cmX1cm of the slide

Another such image is in Figure B1451/4. This figure shows the screen shot of an image of a blood smear slide imaged at 15X (10x Objective and 1.5X intermediate magnification). The image is a stitch of 780 (52x15) tiles, spanning an area of approximately 4.5cmX1.5cm of the slide.

Figure B1451/5: Screen shot of a stitched image of 780 (52x15) tiles, spanning an area of approximately 4.5cmX1.5cm of the slide

It can be seen from both the above images that the 3 point Z correction algorithm has maintained the Z focus. It was observed that the Z focus was maintained for the entire area of a standard slide. However, the ability to stitch very large tile matrices was limited using the FIJI plugin. For stitched image sizes greater than 4GB the stitching plugin gives an error. So tiling more than around 800 tiles was difficult. This can be improved by reducing the bit depth of the camera while acquisition or downsampling post acquisition. 

Generating Trigger Signals Using Arduino

[Credits: Manoj V Mathew. Experiments were conducted at the Central Imaging and Flow Cytometry Facility (CIFF), National Center for Biological Sciences (NCBS), Bangalore, India.]
For conducting the external trigger experiments on the sCMOS camera, we used the Tektronix AFG 3252 which costs about USD 12,000. I realized that the maximum frequency I required to trigger the sCMOS camera was not more than 25KHz. I could do this with a much cheaper trigger source. That is when I stumbled upon the Arduino.
So what is Arduino? 
Let me quote from the Arduino Web Page. "Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing."
The excellent thing about the Arduino is that for what it offers it is really inexpensive. We got an Arduino UNO R3 which cost us only about USD 20 !
Arduino hardware is open source. Complete documentation, electronic connection diagrams, PCB layouts etc. are available.
The board offers 14 Digital Input Output (DIO) pins. Of the 14, 6 can be used to generate Pulse Width Modulation (PWM) signals to mimic an analog output. It has 6 analog input pins with individual 10bit Analog to Digital Converters (ADC). It is a tiny powerful package. Arduino can be programmed by connecting it to a computer through a USB interface. Quoting Arduino Webpage . "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software. A sketch is a name that Arduino uses for a program. It's the unit of code that is uploaded to and run on an Arduino board."
Once a program is loaded (burned) into the Arduino ROM, you do not need not keep it connected to the computer. It can run on a 5v power supply. When you turn the power ON the code executes. You can restart the code by pushing the reset button on the Arduino Board.
I used Arduino UNO R3 to create a clock to trigger the Hamamatsu Flash 4 sCMOS camera. The Arduino setup is shown in Figure B10.

Figure B10: Arduino Uno setup for generating trigger signals

Two single strand wires with pin connectors on both ends were used to connect one of their ends to the Arduino board and the other end to a coaxial cable.  The coaxial cable had crocodile clips on one end and SMA on the other. The SMA connector was connected to the Ex. Trig input of the sCMOS camera.
The program used to generate the trigger signals is shown in Figure B11.

Figure B11: Arduino sketch used to generate PWM signals. (Original Sketch)

The code works by configuring a Digital Input Output (DIO) pin to operate in the output mode. The output DIO pin is then switched between logic high and logic low for set time periods defined by Off-Time and On-Time of a PWM wave. The On time and Off time are calculated in the code from the required frequency and duty cycle. The example program in Figure B11 generates a PWM signal with frequency 1KHz and duty cycle 20%.
A screen shot of a trigger signal generated is shown in Figure B12 below. The code was programmed to generate 500Hz. The oscilloscope was set to 50 Ohms impedance and infinite persistane to observe jitter.

Figure B12: Oscilloscope screen shot of trigger signal at 500Hz

There are few things we can observe here:
  1. The peak to peak amplitude produced by the digital pin is about 3.3 volts
  2. At small frequencies like 500Hz used here the time jitter is almost negligible.
  3. There is an amplitude jitter of about 350V
  4. The generated frequency is slightly lower than 500 Hz (488.9 Hz). This because this code computer the ON and OFF delays solely based on output frequency and does not consider the internal delays. 
A slightly modified version of the sketch that includes a correction factor for the internal delay can be downloaded from my GitHub Page.
This code works well for frequencies from 0 Hz to about 8Khz. For frequencies greater than 8 kHz the time jitter is too large as can be seen in Figure B13. It shows an Oscilloscope screen shot of the Arduino output when the code is made to generate 10 kHz. This sketch worked really well for trigerring the Hamamatsu Flash 4 V2 camera during our several tests with this camera.  

Figure B13: Oscilloscope screenshot shows the large time jitter for frequencies greater than 8KHz

A better way to generate high frequency is to divide the onboard clock using the built in timer of Arduino Uno. The ATmega processor on Arduino Uno uses a 16MHz clock. 
I have modified a sketch available on the Arduino Forum to generate high frequencies. 
The sketch can be downloaded from my GitHub page. The minimum frequency we can generate by this method is 31.5 kHz and a maximum frequency of 8 MHz. You can run the sketch by editing the Frequency variable in the sketch. The signal is output on pin 11. Figure B14 shows an oscilloscope screenshot of 1 MHz signal generated using the sketch. The oscilloscope is operated at infinite persistence. 

Figure B14: Oscilloscope screen shot of a 1MHz signal generated using Arduino Uno by dividing the onboard clock.

As you can see the timing jitter is negligible at this high frequency. 

Figure B15: Oscilloscope screenshot of 8MHz signal

Figure B15 shows an oscilloscope screenshot of 8 MHz signal generated using the sketch. The oscilloscope is operated at infinite persistence. 8 MHz is the maximum frequency that can be generated using this sketch. At 8MHz the output is no longer a square wave due to the on negligible capacitance effects in the circuits at high frequency. However, as can be seen from the figure the time jitter even in this case is negligible and hence this signal can be used for timing and triggering applications. 
There are few points you need to note when you use this sketch to generate high frequencies:
  1. The sketch can generate a minimum frequency of 31.5 kHz and maximum frequency of 8MHz.
  2. The frequency can only be varied in discrete steps by dividing the onboard clock by integer steps ranging from 2 to 510
  3. The signal is output on pin 11 of the DIO pins since we used Timer 2.