Newport Model 300-500B Series Laser Diode Driver Python USB Package (for Linux)
This package is developed within the advisory of the Gallicchio Research Group, Harvey Mudd College.
Pre-requisites
- Permission to connect to the Newport Laser Diode Driver USB device
- Python version >= 3
Set-up
Allow the Newport Laser Diode Driver USB device to be managed by Python
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:
cd /etc/udev/rules.d/ ;
sudo touch 99-usb-permissions.rules ;
sudo vim 99-usb-permissions.rules ; # you can use other text editor of your choosing
Copy & paste the following line 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 ;
Usage
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
Compatibility and Testing
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.
Troubleshooting
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.
Metadata
Release files for newport-laser-diode-driver 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| newport_laser_diode_driver-1.1.0.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| newport_laser_diode_driver-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / newport_laser_diode_driver-1.1.0.tar.gz
| Download URL | newport_laser_diode_driver-1.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb01257968fb66cc8981dbdab7ca5f9900186d136943e6d6a4c0eaca66d0b196
|
|
BLAKE2b-256 checksum How to use checksums |
4f5343a7515c51d780ec107d036ec3b3bf8134d178a778d2a72f4333eaea174e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / newport_laser_diode_driver-1.1.0-py3-none-any.whl
| Download URL | newport_laser_diode_driver-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71539461b7f23dc26e4e9469ab977587c7387aec077e4ccef84afad3cc64bd17
|
|
BLAKE2b-256 checksum How to use checksums |
1ae2e7c10a80e197be6373b50a8ef4d7d855685ef7d3f622c0a09910f205dd41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|