Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital output USB-6008 - optocoupler with 20mA

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.

0 Kudos
Message 1 of 3
(4,638 Views)

I would add in a digital buffer.  Something like the CD74ACT540E would probably work well.  That chip is an inverter, but you can find non-inverting buffers just as easily.  In this case, I figured you would want an inverting so that the LED will turn on when you set the digital line to high.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(4,634 Views)

I have took a look at the CD74ACT540E, but could not find any examples how to connect it or how to use it for my requirements.

 

Is there somewhere a example of the circuit connection with a LED/optocoupler. Or maybe even another way to drive this optocoupler via the Digital Output as open collector?

0 Kudos
Message 3 of 3
(4,513 Views)