Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital input output

Hello,

 

I have this problem since a while and it is very important to me to solve...

 

I'm trying to measure RC discharging time by using a digital output and a digital input line.

I want to register the capacitor voltage with the digital input line. When the low threshold voltage is crossed the line detects logical zero.

My problem is that the digital input line of the DAQ (USB 6009 and USB 6008) doesn't drive well. In fact there is a voltage of the input line (around 2.5V) which doesn't let the capacitor to fully discharge.

The problem remains if I use tristate property.

I also noticed that there is a voltage of a tristated digital output line also, like some kind of pooll up?! This is strange for me, I expect the input or tristated output line to have very big input resistance, and by that not to have problem driving it...?

Is there a way to solve this, but not by using Schmitt trigger or buffer?

I'm sending my peace of code to you, I think the code is good.

 

Thanks a lot...

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

Hi Zile,

 

The digital lines on the USB-6008 and USB-6009 weren't designed to handle applications like this.  It isn't surprising that you aren't seeing the values you were expecting.  These devices have analog inputs that will allow you to measure the entirety of the RC circuit discharge instead of only measuring the point at which the voltage crossed the logic low threshold.  I would advise you to use these inputs instead.

Regards,

Jared R.
Precision DC Product Support Engineer
National Instruments
0 Kudos
Message 2 of 6
(5,020 Views)

Be aware that the analog input impedance of the USB-600x devices is a mere 144Kohms. This may affect your measurements depending on the R/C values being used since it may load down your R/C circuit.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 6
(4,983 Views)

i would use a voltage comparator, set your reference voltage to one of the input and your RC load circuit to the other. once your RC discharges to the reference voltage, the comparator will output your HI/LO signal depending if your want an invert or non inverted signal. now that would output to the DAQ DI.

0 Kudos
Message 4 of 6
(4,885 Views)

Yes, it is clear that it can be solved by using analog input.

However my application is reasonable only for a simple and cheap solution and by using some cheap DAQ card such as NI USB6501which doesn't have analog inputs. I',m wondering if the pullups/pulldowns can be removed by software?

 

Another question is what I have to consider to measure time interval (discharging of the RC) more precisely with LabVIEW. I have a microsecond timer in LabVIEW, but I find it usefull not more than a milisecond?!

I would use the built in timer in the USB6501 DAQ card but the initial interrupt is determined by software (start of the discharge) and I must have pulse to measure with the timer?

 

This questions are valuable for my scientific report.

 

Thanks a lot!

 

0 Kudos
Message 5 of 6
(4,877 Views)

@Zile wrote:

Yes, it is clear that it can be solved by using analog input.

However my application is reasonable only for a simple and cheap solution and by using some cheap DAQ card such as NI USB6501which doesn't have analog inputs. I',m wondering if the pullups/pulldowns can be removed by software?

 

Another question is what I have to consider to measure time interval (discharging of the RC) more precisely with LabVIEW. I have a microsecond timer in LabVIEW, but I find it usefull not more than a milisecond?!

I would use the built in timer in the USB6501 DAQ card but the initial interrupt is determined by software (start of the discharge) and I must have pulse to measure with the timer?


The pullup and pulldown resistors are in the hardware and cannot be turned off.  You really should concider using an analog channel.  I do realize that you will need to get something like the USB-6008, but another $70 is nothing ($169 vs. $99).  This way you can see exact voltage timing.  With the DIO, you really only have millisecond resolution and with Windows, you can't really trust your timing.  The counter counts pulse widths and frequency/period.  So that isn't going to help you.


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 6 of 6
(4,868 Views)