USB-Parallel Output Port Stimulus

OS: Win10
PsychoPy version: 3.1
Standard Standalone?: Yes

What are you trying to achieve?: I am trying to send a signal from my laptop to a device called PowerLab that collects our data. I want the stimulus from the laptop to signal to the device to insert a comment at the start of the test. We are currently using these two cables (USB-PPO PPO-PowerLab digital input) to connect the laptop to Powerlab.

I have read other forums, and downloaded the appropriate driver (inpout32) and placed it into the correct folder. I used “USB Device Viewer” to find the device address and specified this in PsychoPy.

I have noticed that when I unplug and plug in the USB cable to the laptop that the appropriate signal is sent to Powerlab and a comment is dropped. But, when I actually run the experiment to try and output the signal, nothing happens. I assume this means that either the signal cannot be processed by the cables or that PsychoPy is not communicating with the device address.

Any help would be greatly appreciated.

  1. You are going from a USB connection to a TTL input → this means the inpout32 driver is not needed: That driver is for parallel ports … but you are using USB to output data
  2. The correct way to go from USB to a TTL input would be to have the “USB adapter” emulate a serial port … and then use pyserial or a similar library to send serial data (bytes, i.e., numbers from 0 to 255) to that emulated serial port
  3. The USB to parallel port cable you are using seems to be one “of these cables” that only work with printers … as far as I know, they do not adequately emulate a serial port from which you could then send data
  4. You said you see a signal when un/plugging the cable: This could be due to the power going in and out of the cable … as such I would not take it as a proof that the system works

Solution

Your problem is very common and luckily, there are numerous devices targeted at resolving the problem.

For example: LabHackers Research Equipment : USB2TTL8 Adapter … or c-pod Home … Google will help you to find the rest :slight_smile:

1 Like

Thanks for the quick response! I don’t have a lot of signal processing experience, so I really appreciate the help.

I googled USB adapter to serial port cables and this was one of the cables that I found. I appreciate you taking the time to list a couple of cables, unfortunately, they are quite expensive.

If the cable I found doesn’t or if there isn’t another one in a similar price range (<$100), then I was wondering if It was possible to send a signal from Powerlab to PsychoPy. We do something similar using an MRI machine, where the MRI machine will output a number which triggers PsychoPy to start.

Do you suggest one solution over another?

Thanks again!

My point is that given your situation (no parallel or “true” serial port available at your laptop), a “cable” will not be sufficient. The products I listed as examples all contain a microcontroller with a specific software running on there. If you cannot accept the high price, you may consider building your own “adapter”, see for example my post here: EEG Triggers via Labjack: How to do the Parallel Port DB25 connection

I am currently writing up a exhaustive documentation on this matter together with @tstenner … but it’ll take some more months until it’s out.

Hope that helps!

Stefan

PS: I don’t think sending signals from Powerlab to your laptop would work … you’ll have the same problem of missing ports that support some kind of TTL signals

1 Like

I am currently writing up a exhaustive documentation on this matter together with @tstenner … but it’ll take some more months until it’s out.

the mentioned documentation is now out, see:

1 Like