Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

led matrix control by using pwm

Solved!
Go to solution

I am designing optical fiber probe for my medical research project.  My plan is to use gain controlled 50 high power LED. For this I buy USB 6509 DAQ card, SH100 cable and SCB 100 Terminal box for digital out puts. I know rest electronic circuits for current control of LED, but I don't know how to controlled PWM by using Lab View(means PWM of each channel) which is given to the power transistor. and this power transistor controls current flow through the LED means intensity of LED.
 
 I have following difficulties help me for this 
 
1.   How to control PWM of each Digital output.
2.   At a time only single output will be ON other will be off  (Zero)(means one will ON state, 49 will be OFF state). Then after 2 sec it goes to OFF state and next will be ON state.
3.  ON time is very small (around 2 to 3 sec)
4.  ON OFF switching time between two LED is very fast.

Regards, 

Rajesh

0 Kudos
Message 1 of 24
(6,419 Views)

Hello Rajesh,

 

let me first make sure I understood your question correctly.

 

You want to control your transistor with a PWM signal that you will generate with LabVIEW. There should be 50 channels, but only one needs to be active at any one time (others -> 0). This would mean to me that you only really need one PWM, but need to be able to dynamically alter which line is being written to. Is that correct?

 

A few important questions:

What is the frequency at which the PWM should be generated? The maximum rate you can accomplish is about 1kHz.

Which version of LabVIEW are you using?

 

Please let me know if I understood you correctly.

 

Best regards, 

0 Kudos
Message 2 of 24
(6,395 Views)
Dear Joseph,Thanks for support,Yes you correct understand my problem.Here I adding more details for ON OFF sequence of LED,50 LED are placed in four arrays like in a plus (+) sign, means two array contain 12 led and other two contain 13 led. Let take account first array, one Led is ON state Rest 11 are off, after 2 seconds first LED goes off and its neighbors LED ON state,  then same like for  next LED, its like sequence from first to last.  I think 1 KHz frequency is sufficient for my measurement.I am using  8.5.1 version lab view.
0 Kudos
Message 3 of 24
(6,388 Views)

Hi Rajesh,

 

thanks for the extra information.

With the information you gave me, I created a small sample VI that should show you the different parts of what you are doing. As I said, the maximum clock frequency in software is 1kHz, so nothing can be timed that is faster. I only implemented 1 array, but you can extend the idea further to several arrays or to 1 bigger array.

 

I hope that this helps.

 

Best regards, 

0 Kudos
Message 4 of 24
(6,379 Views)

Hello joseph,

I  try to run this vi but it dosent work,

means on scern it shows LED ON also ON state changing from one led to next led.

but when I connect these digital outputs  to LED matrix it dosent work though it works on  screen.  

0 Kudos
Message 5 of 24
(6,363 Views)
Solution
Accepted by topic author rajkanawade

Hi Rajesh,

 

that's what happens when you program without the actual hardware to test it. What result do you get on the actual digital outputs?

 

Try this new version of the file.

 

Regards, 

Message 6 of 24
(6,360 Views)

Rajesh:

 

Can you post a schematic of how you currently have things wired up? Have you tested your driver circuits by manually applying logic high and low levels to your diver inputs?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 24
(6,355 Views)

Hello

Here i am attaching schematic of wiring,

I test this circut by using high and low with signal express.

also

i tested this circut manually by using potientiometer.

means changing voltage at base of the  power transistor by potentiometer. it gives me change in LED output.

 

0 Kudos
Message 8 of 24
(6,344 Views)

No current limiting resistor on the Base? Can you measure the base current with logic high and low applied, I think the DAQ card is limited to 24mA.

But if it worked in Signal Express, then I guess your hardware configuration works, not the software. Did you try the revised vi a couple posts up?

 

-Ak2DM 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 24
(6,340 Views)

Ya I am using resistor at the base, I forgot to put in fig.

here I am using 5V digital out put from DAQ and is given to the base,

by changing duty cycle of pwm at base of transistor  controls current flowing throgh collector to  base.

main idea is to changing duty cycle changes LED output (changes current).

 Here I again attaching schematic of circuit.

0 Kudos
Message 10 of 24
(6,324 Views)