For a senior design project, we are looking to use data collected from a spectroscopy unit in conjunction with a PID controller on a Raspberry Pi in order to keep a process under control. The issue we currently face is that we cannot interface the spectroscopy unit and the Raspberry Pi in order to collect data. We are opting to use the PyUSB library to ease this process, but cannot seem to determine several things:
- What command needs to be sent to the unit to trigger data collection
- How do we accept the data returned from the machine
The spectroscopy unit in question is the PeakSeeker Raman Spectroscopy Unit by Agiltron. Documentation on this is particular unit is sparse and the vendors don't have that deep of a technical background to help. The following is the information that I have either been given or collected:
- The machine uses an FTDI chip
- Interface 0 for the machine has two endpoints: a bulk in and a bulk out
- The only ports on the machine are power, the connection to the spectroscopy sensor and a USB connection
- The machine has a USB A to USB B cable, which is utilized by a proprietary software on a different PC
The following is the code that I've run from my mac when the device is plugged in and no errors are raised:
import usb.core
import usb.backend.libusb1
dev = usb.core.find(idVendor=0x0403, idProduct=0x6001) ## FTDI chip
if dev is None:
raise ValueError("No device!")
else:
print("Successful Connection")