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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling RGB leds with a Digital I/O DAQ

Hi, I'm making a Launchpad 4x4 to play sounds etc.

I've got 1 Major issue and one minor issue at the moment.

I can read in my buttons in labview and i can let the lights turn on in Labview.
I've no clue how to write the 3 colors towards the leds...?
I've searched on the forums but can only seem to find people writing RGB leds with another board.

The second issue is: some wav files will play in labview and some won't for some reason does anyone know why?

These are the products i'm using:
button pad: https://www.sparkfun.com/products/7835
breakout: https://www.sparkfun.com/products/8033
leds: https://www.sparkfun.com/products/9853  
And the Digital I/O 24Channels DAQ  

0 Kudos
Message 1 of 5
(3,191 Views)

Which DAQ are you using for the LEDs?  Most digital boards do not supply enough current to be able to drive an LED.  You might be able to sink the current, but can't know without knowing which board you are using.


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
Message 2 of 5
(3,166 Views)

I'm using the NI USB-6501
The board i'm using is the sparkfun link, i'm using multiplex so i have to use less Inputs and ouputs on the DAQ.

This is how i read the buttons.(see files)
I could do somekind of the same thing for the RGB leds but the problem is that they have 3 colours.But normally the caple part should make sure it gets the color value? I'm using 2 different resistors. Since the colours take other values.
Should i send u a picture from my project hardware?

Ty for responding btw.

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

You will definitely need a buffer circuit in order to get enough current to drive those LEDs.  I have been using the SN74LVCC4245A for level translations, but it will work for increasing your current capability as well.  From there, you just use the DAQmx Write to output a high for turning on a certain color.  You need 3 lines to fully control one of your LEDs (it is really 3 LEDs, one each for read, blue, and green).


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 4 of 5
(3,111 Views)

Mate,look the first links in the board are transistors.

0 Kudos
Message 5 of 5
(3,089 Views)