From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage divider for digital input pin

Solved!
Go to solution

Hello everyone,

 

I have a PXI-6220 measurement card and use the digital I/O channels as switches for logic level operations. Now I also want to measure some logic states over another DI/O port.

The status signal is 36V. My idea was to build a voltage divider so that Uout~4.5V (digital trigger between 2.5-5.2V). For the design I would also need the sourcing current, but I am unable to find it in the datasheet. Usually input sources are around 10-25mA. Below is my setup and calculation.

 

v_div.pngv_divcalc.png

 

Can I do it like this? Where can I find the max current?

0 Kudos
Message 1 of 10
(2,891 Views)

Hi,

 

Sourcing current is something else than the input current of a digital input. 

10-25 mA for a digital input is quite high I think.

 

The specification says that the input 50k typical and 20k minimum. Top of page 5

If you use small resistors the top becomes a bit hot (look out for smoke detectors !)

I would take 10 times the value. 

 

Kees

 

Message 2 of 10
(2,868 Views)

I also found on page 7

 
 
0 Kudos
Message 3 of 10
(2,861 Views)

Sorry about that, my post apparently did not came through.

 

I found on page 7

elec_char.png

the I_IH value. Is this the sourcing current when the pin is HIGH?

 

I calculated it with 250uA which results in 

R1 = 124k

R2 = 20k

 

This is in the range of your suggestion.

 

Should I design the divider with the 20k-50k OR with the 250uA current?

0 Kudos
Message 4 of 10
(2,852 Views)
Solution
Accepted by s.h._tech

Instead of a voltage divider, I would probably use a resistor and a zener diode.  The zener limits the voltage going into the digital input and the resistor limits the current.


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 5 of 10
(2,843 Views)

Hi,

 

Reading specification / datasheets is not always easy.

The 250µA is based on the minimum resistance of 20k.

 

If you use a 124K resistor you could end up with a minimum input voltage of 2.4V That is too close to the threshold.

Use resistors of 100k and 22k (22k is more general) The input voltage 4.8V -  3.4V depending on the input resistance (20k - 50k)

 

Kees

 

 

0 Kudos
Message 6 of 10
(2,842 Views)

@crossrulz: Is this setup (R-Zener-GND) against sudden voltage spikes?

 

I looked at a basic Zener circuit for voltage limitations. A quick search brought me this Zener diode with a forward current of 250mA. This would be quite high for the digital input, with a current limiting resistor of R=150k I would get

 

I_out = 36V/150k ~240uA

 

Is this design valid?

 

0 Kudos
Message 7 of 10
(2,833 Views)

@s.h._tech wrote:

@crossrulz: Is this setup (R-Zener-GND) against sudden voltage spikes?

 

I looked at a basic Zener circuit for voltage limitations. A quick search brought me this Zener diode with a forward current of 250mA. This would be quite high for the digital input, with a current limiting resistor of R=150k I would get

 

I_out = 36V/150k ~240uA

 

Is this design valid?


1. The zener needs the diode to be set up to be in reverse in order to get your zener voltage.  So your Annode connects to ground and the Cathode to your digital input.  See here for more details.

2. The zener is in parallel with your digital input, so the zener current should not affect the digital input, except to limit the voltage the digital input will see.


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 8 of 10
(2,818 Views)

I made a schematic of my current setup. I did not test it yet with my NI-Equipment. With a multimeter I measured 5V across the Zener.

 

zener_vd.png

 

I was unable to measure the current (may be too low for my Multimeter).

0 Kudos
Message 9 of 10
(2,814 Views)

@s.h._tech wrote:

I was unable to measure the current (may be too low for my Multimeter).


Doing the math...250uA.  I think you are fine there.


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 10 of 10
(2,808 Views)