From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6501 driving LED problem

Hello everyone,

 

I am trying to turn on an LED by using one of the digital outputs of the NI USB 6501. The circuit diagram is fairly simple and is shown in the attached picture.

 

Basically, my problem is that when I connect one of the DIO lines from the USB 6501 to the base of the transistor to "enable" it, the voltage of the 6501's digital output line drops to around 3.0 V, which makes the LED very dim. Contrarily, I connected the base of the transistor directly to the +5V pin of the 6501 and the voltage does STAY at 5V and the LED lights just as expected.

 

Can someone please look at my diagram and tell me what I'm doing wrong?

0 Kudos
Message 1 of 6
(5,766 Views)

The 3V at the output line is about right as you are measuring the voltage drop across the LED and the BE junction of the transistor plus whatever is across the sink driver.  I am not familiar with the "STPDP1605" so I'm not sure what effect it is having.  If I were to light an LED, I would wire it to the collector side of the transistor and use a 150ohm current limiting resistor (+5 wired to 150 ohm wired to LED anode.  The cathode wired to the collector).  Then wire the emitter to ground.  I would also add a base resistor of about 1K or so.  You want to saturate the BE junction so the transistor acts like a switch but not have too much current as the cause the 6501 to be over-driven.  

 

Tom 

Message 2 of 6
(5,750 Views)

Hi Tom,

 

Thanks A LOT for your reply... Kudos!!!

 

I tried to isolate the problem by getting rid of the current sink and connected the circuit as the one shown in "NEW CIRCUIT.PNG" below.

 

Basically, I connected the output of 3 lines from USB6501 to the base of 3 transistors, so I can enable 1, 2 or all 3 transistors and light up the corresponding LEDs.

 

If I enable the third transistor for example, the current flowing through its LED is 40 mA, which is right!!! However, if I enable the first OR second transistor (either one), the current flowing through the same LED drops from 40 mA to about 17 mA. Finally, if I enable ALL three transistors, the current stays at 17 mA.

 

All three digital output lines have a constant voltage of 3V no matter if 1, 2, or all 3 transistors are ON.

 

PLEASE HELP ME!!! I just can't explain why turning on a transistor would affect the current flowing through the LED of ANOTHER transistor

 

BTW, I connected the ground of the USB6501 to the ground of the power adapter powering the transistors in order to have a common ground.

Download All
0 Kudos
Message 3 of 6
(5,732 Views)

Argon,

 

Now that I see the full part number of your current sink, I better understand what it does but am now more confused as to what you are trying to accomplish.  Do you want to control individual LEDs with the 6501 directly or do you want to control them through the STP16CP05?  If you want to do it directly, refer to my attached schematic and copy that circuit for each LED (you may need to adjust the 1K resistor value).  If you want to control them through the current sink, you will need to connect the LEDS to the current sink IC and follw the programming guide from the datasheet.  The STP16CP05 is a serial in/parallel out driver which will allow you to control the On/Off of 16 individual LEDs using only a couple of digital IO lines from the 6501. 

 

By the way, your "New Circuit", if it is actually wired exactly like that, has no current limiting for any of the LEDs. That would probably account for all the interaction between the different digital line.

 

 

Tom

 

Ckt1.jpg 

Message Edited by Tom Sedlack on 10-19-2009 02:23 PM
Message 4 of 6
(5,717 Views)

THANK YOU again for your reply Tom!!!

 

Let me give you a brief background about my project...

 

I built a 5x5x5 LED cube (125 LEDs total). The LED cube is made up from 125 LEDs arranged into 5 layers of 25 LEDs each.  The display itself is multiplexed so instead of requiring 125 connections, it requires 1 connection to each of the five layers (these connections are coming form 5 transistor's emitters as shown in "LAYER DIAGRAM.jpeg") and 25 connections to each LED in a layer (25 constant current sinks connected to the ground pins of all the LEDs in the same column as shown in "COLUMN DIAGRAM.jpeg").

 

 

 The advantage of using a constant current sink driver IC's is that almost any LED can be used and the supply current remains constant regardless of the LED forward voltage. The one I'm using is STP16DP05. As a matter of fact, I'm using 2 of these chips because each chip provides 16 outputs x 2 = 32 outputs (I need 25 constant current sinks).

 

 The cube is refreshed by using a for loop in LabVIEW with each layer being active for 2ms, so the entire cube is refreshed every 10mS (100Hz). This results in a display with no visible flicker.

 

THIS IS HOW IT WORKS: I start by enabling transistor #1 (port0,line1 of USB6501 connected to the base of the transistor), then I send 25 bits serially to the  STP16DP05 (port0,line2 of USB6501) to select which LEDs I want to turn on. I have set a constant current sink of 30 mA, however the 30 mA seem to be splitting across all the LEDs that are on (if 3 LEDs are on, each gets 10 mA rather than the 30 mA I selected).

 

NEVERTHELESS, if I connect the base of the transistor directly to +5V of the USB6501, each LED gets 30mA constant (i.e. doesn't split the current), so this makes me think the problem is powering the base of the transistor using the USB6501.

 

Any help or suggestions would be GREATLY APPRECIATED PLEASE!!!!!!!!!

 

 

 

 

 

P.S. I'm doing exactly the project shown on the website below, but INSTEAD of using the PIC, I'm using the NI USB 6501

 

http://picprojects.org.uk/projects/lc/index.htm#Schematic

Download All
0 Kudos
Message 5 of 6
(5,710 Views)

Got it.  PIC processors tend to have higher driver current then the 6501 from what I remember.  Rather then using NPN transistors for the layer switch, you may want to use a FET.  They would act more like a switch with the lower drive current from the 6501.

 

Tom

Message 6 of 6
(5,706 Views)