Skip to content

Coherent Sapphire GUI and Arduino controller for Thorlabs LDC. A collection of arduino (or attiny85) based tools to add missing functionalities to Thorlabs laser drivers and LabView event based GUIs.

License

Notifications You must be signed in to change notification settings

gajdipajti/thorlabs-ldc-arduino

Repository files navigation

Six projects inside one github repository:

  • Coherent Sapphire 488mW Laser GUI written in LabView
  • Thorlabs LDC205C Arduino controller code and a LabView GUI (ldc205c)
  • Thorlabs LDC500 Arduino controller code #2 and a LabView GUI (ldc500sh)
  • A basic temperature reader and LabView GUI (tds100n)
  • An artisan DAC + temperature reader and LabVIEW GUI (dac999)
  • Thorlabs LDC205C ATTiny85 based controller which works with the LDC205C LabView GUI (tinyldc85)

Changelog:

  • Initial release with states.
  • It searches for a config file: Documents\LabVIEW Data\LaserControlSettings.ini
  • There is also a build.
  • Create the second arduino driver: ldc500sh
  • Create a basic temperature reader
  • Create a basic dac based on the ldc500sh circuit and code + add the tds100n functionality to it.

Graphical User Interface in LabView 2014 (now it is updated to 2017).

Coherent Sapphire 488mW GUI:

Our team got a Coherent Sapphire 488nm laser with the LP USB CDRH Driver Unit. This means, it can be only controlled via RS-232. So I wrote a similar GUI as the Arduino LDC205 one, but with advanced internals (STATES). It can be used with any Coherent Lasers as far as I know, because during startup it will check for minimum and maximum laser power values.

LDC205C: For laser 405nm, for the PWM to LowPass filter edition board.

We have a Thorlabs LDC205C which controls a Nichia 405nm laser diode. To control the diode current, an Arduino's PWM output is driven at 31kHz and RC LowPass filtered. This Arduino UNO R3 and board can be used to create diode currents below 200mA, read back the diode current, and enable/disable laser.

Sort of documentation:

Start Here for the Arduino Controller LDC205C edition:

  1. Clone the repository to your sketchbook folder.
  2. Connect the BNC connectors:
  • LD REM to pin 13. (Same as the L Led on the board)
  • MOD IN to pin 11. (You can split the output.)
  • CTLOUT1 to pin A0. (first laser)
  • CTLOUT2 to pin A1. (second laser, read only mode)
  1. Calculate the Low-pass filter R&C values from here: http://sim.okawa-denshi.jp/en/PWMtool.php
  2. Burn it to your Arduino UNO.
  3. Optionally connect a DHT22 sensor.

Currently used R&C values:

  • R=5k3 Ohm
  • C=105

Changelog for the thorlabs-ldc-arduino & GUI:

  • Merged the DHT22 temperature code, from the branch.
  • Added a second read only output for the LDC500 (we got a new laser, which has to be controlled).
    • I updated the serial number to 855 (405+450). And the version to 2.0.
  • De-blobbed the previous LabView GUI, and included in this repository.
  • It searches for a config file: Documents\LabVIEW Data\LaserControlSettings.ini
  • There is also a build.

LDC500SH: For laser 637nm, for the PWM to NPN-NPN-LowPass filter edition board.

Recently we installed a 637nm laser into a second laser head which is controlled by a LDC500. To control the diode current an Arduino's PWM output is driven at 31kHZ and converted to 0-10V region. This is then LowPass filtered. This Arduino UNO R3 and board can be used to create diode currents from 0mA to 400mA, read back the diode current, and control a solenoid shutter.

Start Here for the Arduino Controller LDC500 edition:

  1. Clone the repository to your sketchbook folder.
  2. Connect the BNC connectors:
  • OptoRelay for solenoid to pin 13. (Same as the L Led on the board)
  • MOD IN to pin 9. (You can split the output.)
  • CTLOUT1 to pin A5. (first laser)
  1. Burn it to your Arduino UNO.

Communication with the Controller: 115200 8N1

Send Command: Carridge Return (\r)

  • l? -> GET laser status (0: disabled, 1: enabled)
  • l[0,1] -> DISABLE/ENABLE laser or shutter
  • i? -> GET laser current (float [mA])
  • p?, pa? -> GET laser power (float [W])
  • slc[0..100] -> SET laser current
  • p[0.0001..0.1] -> SET laser power (only LDC205C)
  • hrs? -> GET uptime in minutes (float)
  • sn? -> GET serial (int)
  • ilk? -> GET interlock state (always 0) (only LDC205C)
  • f? -> GET operation fault state (always 0) (only LDC205C)
  • leds? -> GET led status (1: Power on, 7: Laser on)
  • spv[0...255], d[0...255] -> SET PWM Voltage (only DAC999)
  • gpv?, d? -> GET PWM Voltage (only DAC999, but not working)

Second laser, just readout (only LDC205C)

  • j? -> GET laser current (float [mA])
  • q?, qa? -> GET laser power (float [W])

DHT22 Communication: (only LDC205C)

  • d? -> GET sensor status (0: error, 1: ok)
  • dt? -> GET temperature (float)
  • dh? -> GET humidity (float)

Dallas W1 Communication (TDS100n & DAC999)

  • t? -> GET temperature (float)

Start Here for ATTiny85 Controller LDC205 edition.

  • This is a cheaper version, because after 6 years the initial Arduino Uno based board died.
  • I will upload the fritzing schematic.
  • Arduino IDE Support: https://github.com/SpenceKonde/ATTinyCore
  • ATTinyx5 documentation
  • An Arduino UNO was used as an Arduino ISP to upload the code without a bootloader.
  • The commands are identical, works with previous LDC205C LabView GUI.
  • I use an FTD1232 board for USB-to-SERIAL.

Manufacturer Documentation

Issues with Arduino Leonardo:

If you need help with the electronics, contact me.

About

Coherent Sapphire GUI and Arduino controller for Thorlabs LDC. A collection of arduino (or attiny85) based tools to add missing functionalities to Thorlabs laser drivers and LabView event based GUIs.

Topics

Resources

License

Stars

Watchers

Forks