Arduino controller for Thorlabs LDC200C Series

As my daily job is being a physics PhD student at the Advanced Optical Imaging Group, some good spin-off projects appear which can be released into the open source wilderness. The story starts with a 405nm diode laser, which we installed into a Thorlabs LDC205. The problem with this super controller that there is no RS232 or USB connectivity. Just 3 BNC connectors (1,2,3). As we want to computerize our dSTORM controls, the LDC has to be pimped…Current_Controller_A2-780

The idea was to use an Arduino Uno R3 to control the driver:

  • LD Rem -> TTL logic, Laser On (HIGH)/Laser Off (LOW)
  • MOD In -> Set drive current via changing the voltage applied to this connector. (PWM)
  • CTL Out -> Get drive current via measuring the voltage on this connector. (A/D)

Here is the manual for the LDC205 for further reading. But I suggest that after calculating the required voltage levels for your setup, you do a fine tuning manually.

Controller commands and functions were inspired by a Cobolt Manual. A LabView vi set is avaliable from their site so there should be no problem in changing them a bit to fit our system.

PWM Problems

The arduinIMG_0285o uses PWM to generate the “analog DC” voltage. This must be put between quotes, because for the LDC this is not DC. Arduino Pin13 PWM has a 490Hz frequency, and the LDC works up to 10Mhz, so it will see the actual modulation. This is sad, because I don’t want my light source to be modulated. If you measure the channels, it will show up on oscilloscope.

To solve this problem, I had to add an extra Low-pass (RC) filter to the shield. Before doing the calculations, PWM frequency had to be changed to the maximum 31 kHz by adding one line to the setup code:

  TCCR2B = TCCR2B & 0b11111000 | 0x01;

This will change Timer2 (which controls Pin 3, 11) frequency divider from the default 64 to 1. Using this calculator it was determined that a 5k3 Ohm resistor and a 1uF capacitor (105) will be sufficient for the job. Noise around 7 mV, setting time below 20ms.

My work is posted here (Github), and it has passed smoke testing. The Cobolt LabView code can be modified to control this laser also. Released v1.0 under the name Magni (He is a son of Thor).

IMG_0286

Update #1: DHT22 sensor.

The self-made Arduino shield has been upgraded with and extra connector and 10k resistor for the DHT22 sensor. The new code is in the DHT22 branch, and there is also a v1.0-dht release: Móði

ldc205-dht_bb

You have to grab DHTlib on your own, and add it to your sketchbook/libraries folder.

Future plans with the project:

  1. Create demo Laser Control Panel in LabView (done)
  2. Upgrade the setup with a DHT22 sensor to measure temperature and humidity. (done)
  3. Resolve undocumented commands, to make it work with a Cobolt Monitor.
Advertisements

Author: Gajdos Tamás

A "barefoot physicist" with some IT skills in system administration.

2 thoughts on “Arduino controller for Thorlabs LDC200C Series”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s