Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

usb-6501 stuff i forgot to add.

hi. i am having problems with the 6501 and a simple circuit.  i am trying to turn on a mct5201 optocoupler. i attached a doc. with a picture.  basically, for some reason this will not work, and furthermore i think that somehow it is damaging the 6501.  after the ckt failed to work i tried to turn on a LED connected to port 1.0 and through a 470 ohm resistor. it barely lights up and only measures 0.6ma no matter which channel i use. the 6501 gnd is connected to the other grounds. 

 

when i test the second circuit, driving the led with the coupler, the led will turn on, though the coupler only seems to be drawing .6ma.  i don't know how it turns on at such a low current.

 

i can also get the circuit to operate propperly if i use a 74ls244 between the 6501 and the coupler, but it still only draws .6ma.

 

finally, i can operate either circuit if a apply 5v from a power supply to pin 1 of the coupler. the relay or led turn on as they should and the coupler draws about 6ma through the 620 ohm resistor, which is on target.

 

also, i am controlling the 6501 using the NI measurement and automation explorer and usb-6501 test panel. . before connecting anything i set all ports to outputs and low.

 

can you offer any insight as to what might be wrong?  it appears we have blown a number of 6501s trying to get this to work.

 

0 Kudos
Message 1 of 8
(4,392 Views)

According to page 14 of the manual:

 

http://www.ni.com/pdf/manuals/371456h.pdf

 

The outputs are open collector, you need to provide pull ups to increase current drive (up to 8ma max). There are examples in the manual on hot to wire output devices.

 

When using a relay, put a reverse biased diode (ie 1N4001) across the coil to snub the inductive pulse created when the relay is turned off.

 

-AK2DM

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 8
(4,387 Views)

hey, another expresssch user! :thumbsup

 

The first thing I'd try... and I recommend doing this wherever possible anyways, since the default behavior of the 6501 (And 600x's) is to drive the lines high....

 

The outputs on the 6501 can sink more current than they can source. 

 

The 5V output on the 6501 can source 200mA, which is enough current for every DO line to sink up to its capacity.

 

Rather than driving the output high and having the DO line source the current, rewire the optocoupler so the top is wired to the +5V and the bottom is wired to your DO, and invert the logic in your software.  Drive the line low (ground) to enable current flow through the optocoupler, drive the line high to turn it "off".  In other words, rather than switching the voltage on and off, you're switching the ground on and off.

 

Also check the current that the optocoupler needs... it may exceed (although it shouldn't) what the DO can sink, so you may end up needing a driver for that.

0 Kudos
Message 3 of 8
(4,382 Views)

athough no shown, the relay i was using does have a diode.  using a 6501 i suspect is bad, i tried driving a led through a 470 ohm resistor. i would expect about 6ma(4.78-2)/470) but measure only .5ma.  the example from the the link is the same circuit i used.  according to the data sheet, the led in the coupler drops about 1.2v, so the resistor/coupler combo i use is should also about 6ma, but measures only .6ma.  the only circuit connected to the 6501 is the optocoupler/relay.  i cannot see anything that would cause these 6501s to go bad.

0 Kudos
Message 4 of 8
(4,361 Views)

if i can dig up another 6501 to experiment on i will try sinking the circuit. according to the datasheet, the coupler should turn on with 6ma. although with only 6ma needed i can't see what is causing the 6501 to go bad.

0 Kudos
Message 5 of 8
(4,360 Views)

In the configuration you are using (high side drive rather then low side sinking), you negelct to take the 4.7K pull-up resistor inside the 6501 into account in your calculation. What you are seeing is correct:  (4.78-2)/(470+4.7K) = ~0.5mA. As mentioned previously, you really should be sinking the current through the 6501 rather then trying to drive it. See figure 6 of the user guide above regarding the pull-up and figure 7, example 1 on sinking the LED in the opto-coupler.

0 Kudos
Message 6 of 8
(4,337 Views)

i was under the impression that when you addeed an external resistor it would be in parallel to the 4.7k pullup.  a 470 ohm connected to a port would therfore allow about 7.6ma when connected to an optocoupler.

0 Kudos
Message 7 of 8
(4,321 Views)

It would if you wired the extrenal resistor from the output pin to +5V (See figure 6 in the User Guide).  Your diagram shows the 6501 output (which would be 5V through 4.7K) connected in series to the LED which is then connected, in series, with the 620 ohm resistor.  

0 Kudos
Message 8 of 8
(4,307 Views)