This package is developed within the advisory of the Gallicchio Research Group, Harvey Mudd College.
- Permission to connect to the Newport Laser Diode Driver USB device
- Python version >= 3
Run the Run the following shell command:
usb-devices # this allows us to see the idVendor and idProduct of all USB devices
Ensure that the idVendor and idProduct match the example below unless change the idVendor and idProduct to the appropriate values. The process below grants permission for our package to manage the specified Newport USB device.
Run the following shell command:
sudo vim /etc/udev/rules.d/newport.rules # you can use other text editor of your choosing
Copy & paste the following lines into the file:
# Newport Model 300-500B Series Laser Diode Driver
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="104d", ATTRS{idProduct}=="1001", MODE="0666"
Then, type :wq
and press ENTER
to save the changes and close the file
Run the following shell command:
sudo udevadm control --reload ;
sudo udevadm trigger ;
In your desired Python environment, run the following shell command:
pip install newport-laser-diode-driver
Here is an example snippet of how a Laser Driver object could be instantiated:
from newport_laser_diode_driver import NewportLaserDiodeDriver
model_535B = NewportLaserDiodeDriver(idVendor=0x104d, idProduct=0x1001)
print(model_535B.identifier) # obtain the identification string of the device
model_535B.set_current_set_point(10.0) # set current set point to be 10.0 mA
current = model_535B.get_current_set_point() # get the current set point
print(current) # 10.0
model_535B.enable_laser_output() # enable laser output
I have tested this package with the Newport Model 500B Series devices that I have accessed including 505B and 535B. On paper, this package should work with Model 300B Series as well; however, I have no access to the devices to test them out.
To check if the device is recognized by the PC, run usb-devices
to list all USB devices connected to your PC. If the Newport device is not found, try connecting the USB cable from the device to your PC first and then restart the Newport device.