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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Choose proper resistor for voltage divider with NI 9205

Solved!
Go to solution

Good Morning,

 

I am trying to read some voltage inputs using the module NI 9205 in a CompactRIO, but those are too high for the rating of the modules. They come as 24V, but I need them to be within 10V. I was thinking therefore to have a voltage divider before the module, to lower down the voltage, but not being an expert I was wondering how I should do it in a proper way. Especially I would like to know how I could design the size of the resistor, in order to be sure that the voltage coming into the module will be <10V.

 

Sorry for the very basic question, but I would have a real bad day if I screw up one module of the NI system.

 

Best,

Davide

0 Kudos
Message 1 of 9
(3,417 Views)

You will want something like a 1.5MOhm and 1MOhm resistors.  That will give you a really low load current for your output.  For a 24V input, that will give you a 9.6V output.  It would also be advisable to add in an Op-amp circuit to act as a buffer between your output and the DAQ input.


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 2 of 9
(3,401 Views)

Dear crossrulz,

 

Thank you very much for the prompt reply! I'm not sure that for my application I will need an OpAmp, is it intended to reduce the load from the my output side?

 

Below there is the schematic of what is the situation: basically I have three switch which might close. Therefore I don't really need to have high accuracy on the signals, I just need to see a difference between 0 and X Volts. Anyway, is the resistor set up correct like this? Or am I completely wrong?

 

Last question is (if it's not too hard to explain): how did you come up with the values of 1.5MOhm and 1.0MOhm?

 

Thank you again!

Davide

 

IMG_8855.jpg

0 Kudos
Message 3 of 9
(3,359 Views)
Solution
Accepted by topic author freyda

@freyda wrote:

I'm not sure that for my application I will need an OpAmp, is it intended to reduce the load from the my output side?


It is actually to help the DAQ by giving it a low impedance source to drain to and therefore reduce "ghosting".

 


@freyda wrote:

Last question is (if it's not too hard to explain): how did you come up with the values of 1.5MOhm and 1.0MOhm?


A derived formula from V=IR.  Vout = (R2)/(R1+R2)*Vin.  I randomly chose 1MOhm for R2, did the math and came up with 1.4MOhm.  Looked up standard 1% resistors, and rounded up to the standard 1.5MOhm for R1.  When finding R1, you want to round up so that more voltage drop is done across R1 and therefore lowers your maximum voltage.

 


@freyda wrote:

Therefore I don't really need to have high accuracy on the signals, I just need to see a difference between 0 and X Volts.


Do you actually need the voltage or just to read that the line is in a "high" state?  If you just need the state, then I would just replace your 9205 with a 9421.  It is an 8 channel digital input module that is made for the 24V logic and goes for $117 (as of writing of this post).  That would make all of this A LOT simpler (wire directly into the module).


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 9
(3,347 Views)

@crossrulz wrote:

It is actually to help the DAQ by giving it a low impedance source to drain to and therefore reduce "ghosting".

Oh I see! Thank you for the explanation!

 


@crossrulz wrote:

A derived formula from V=IR.  Vout = (R2)/(R1+R2)*Vin.  I randomly chose 1MOhm for R2, did the math and came up with 1.4MOhm.  Looked up standard 1% resistors, and rounded up to the standard 1.5MOhm for R1.  When finding R1, you want to round up so that more voltage drop is done across R1 and therefore lowers your maximum voltage.

 

Thank you. What I still would like to know is the reason why you choose a very high resistance for R2, is it because you want to have as little current as possible going through them while most of it goes into the NI module?

 


@crossrulz wrote:

Do you actually need the voltage or just to read that the line is in a "high" state?  If you just need the state, then I would just replace your 9205 with a 9421.  It is an 8 channel digital input module that is made for the 24V logic and goes for $117 (as of writing of this post).  That would make all of this A LOT simpler (wire directly into the module).


Exactly, basically those are end switch of valves and will tell me when the valves are completely open or completely closed. Thank you again for the suggestion, that module seems to be indeed exactly what I need, although it might be that I won't be able to buy it. 

 

In the meantime I also though that perhaps I could also use a DC-DC converter (24V -> 5V), would such a solution work in your opinion?

 

Best,

Davide

 

0 Kudos
Message 5 of 9
(3,332 Views)

@freyda wrote: that module seems to be indeed exactly what I need, although it might be that I won't be able to buy it.

Yet, we will spend thousands of dollars trying to figure out how to get something to do what it wasn't designed for.  Seriously, in the time I have spent thinking through your problem, I spent more than that module costs.

 


@freyda wrote:

In the meantime I also though that perhaps I could also use a DC-DC converter (24V -> 5V), would such a solution work in your opinion?


Assuming all you really need is an on-off state, then a DC-DC converter or regulator should work.

 


@freyda wrote:

What I still would like to know is the reason why you choose a very high resistance for R2, is it because you want to have as little current as possible going through them while most of it goes into the NI module?


When you are trying to sense a voltage, you typically want a very high load impedance.  A DMM typically has a 1MOhm load impedance.  Many DAQs have a 1GOhm impedance.  So I just chose 1MOhm for R2 since it is a standard resistor and it makes math easy.


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 9
(3,318 Views)

If you want to log the power on state of the solenoids I suggest a simple resistor (10k to 20k) and a LED (or two) as a voltage limiter and a diode or another LED in reverse.

Main reason: You can still detect the power on state but limit the input voltage .. coils that get turned of may create some voltage spikes. Additional benefit: a visual control 🙂

A red LED give ~1.8V , other colors some more.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 9
(3,311 Views)

Thank you very much for the suggestion!

0 Kudos
Message 8 of 9
(3,271 Views)

@crossrulz wrote:

@freyda wrote: that module seems to be indeed exactly what I need, although it might be that I won't be able to buy it.

Yet, we will spend thousands of dollars trying to figure out how to get something to do what it wasn't designed for.  Seriously, in the time I have spent thinking through your problem, I spent more than that module costs.

 


@freyda wrote:

In the meantime I also though that perhaps I could also use a DC-DC converter (24V -> 5V), would such a solution work in your opinion?


Assuming all you really need is an on-off state, then a DC-DC converter or regulator should work.

 


@freyda wrote:

What I still would like to know is the reason why you choose a very high resistance for R2, is it because you want to have as little current as possible going through them while most of it goes into the NI module?


When you are trying to sense a voltage, you typically want a very high load impedance.  A DMM typically has a 1MOhm load impedance.  Many DAQs have a 1GOhm impedance.  So I just chose 1MOhm for R2 since it is a standard resistor and it makes math easy.


Thank you for the further explanations! You're totally right about costs, but unfortunately when you have to deal with managers sometimes you really have to justify any minor expense, that's also why I've tried to investigate more into the problem and search for other possible solutions... 

0 Kudos
Message 9 of 9
(3,267 Views)