Hello,
I want to use a USB-6008 to control a temperature chamber.
Analog input/output and digital input is working fine. But I need an additional digital output and can not figure out, how to connect it the best way.
The program is written using .NET with C#.
The digital output must switch a optocoupler (PC817) on/off. In the manual, there is an example how to connect LEDs(see attachment). Since the optocoupler is nothing else than a LED, I have connect it like in example 1:
5V from the USB-6008 5V-port going to a 220 Ohm resistor and then to the optocoupler. The optocoupler ground is connected to P0.0, which is configured as the digital output. With this setup, switching the optocoupler via my software is no problem and working. But the current is about 17 mA, which is not according to the specification of the digital output.
In the specifiaction the current is mentioned with 0,6mA (open collector) and 8,5mA with pull-up-resistor.
My question is now, how to connect the optocoupler in a safe way with the digital output.