Author Topic: Is there any issue with using a voltage reference as the supply to op-amps?  (Read 1197 times)

0 Members and 1 Guest are viewing this topic.

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
I am making a PCB with four current sense amplifiers circuits: https://www.ti.com/lit/ds/symlink/ina190.pdf?ts=1602041712633&ref_url=https%253A%252F%252Fwww.google.com%252F

Data sheet says they draw maximum 65uA. For my application, a maximum of 3 will only be on at any given time. (Generally, they will all be off 99% of the time).

I would like to supply my current sense amplifiers with 5V from my 12V system because I need a 0-5V output signal from them for my uC.

Can I just put something like this on my board? https://datasheets.maximintegrated.com/en/ds/MAX6100-MAX6107.pdf

Datasheet shows it can supply 2mA of current which is more than all four current sense amplifiers draw at max 65uA combined...

This would be more ideal for me than having to use an external 5V supply of some kind... but I'm not sure if there is anything else to watch out for?

Thank you!
 

Offline hsn93

  • Regular Contributor
  • *
  • Posts: 114
  • Country: bh
remember that you have output from amplifiers .. that you will probably pull down to gnd and measure with the MCU analog pin .. you have to add that current ..

also .. LDO has max 12.6V to keep line regulated .. is your 12V clean and precise ?
« Last Edit: October 08, 2020, 05:18:56 am by hsn93 »
-------------------------------------
 
The following users thanked this post: doublec4

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
Why not use the power rail from your microcontroller?
 
The following users thanked this post: doublec4

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Ah I see... so what would I be looking for in my uC ADC properties to figure out the resistance on that end of the circuit?

If my op-amps are outputting the 0-5V signal, and my ADC has some kind of fixed resistance perhaps, then the current output would be highest at 5V...  Then I can use ohm's law to figure out what current the op-amp is sinking/sourcing (sorry I don't know which one is the proper terminology) ?

 

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Why not use the power rail from your microcontroller?

This is the controller:

https://www.controlbyweb.com/x400/specs.html

With this I/O expansion module:

https://www.controlbyweb.com/x19s/

On the controller there is no access to a 5V rail. On the I/O module there is a Vref terminal on the analog input terminal blocks... I was under the impression that was an input for my 5V source... but now I'm questioning if  that is actually a 5V reference for whatever I'm hooking up to the analog inputs...

 

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
remember that you have output from amplifiers .. that you will probably pull down to gnd and measure with the MCU analog pin .. you have to add that current ..

also .. LDO has max 12.6V to keep line regulated .. is your 12V clean and precise ?

It is coming from a meanwell supply, I can check the specs...
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
 
The following users thanked this post: doublec4

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Okay, so I did overlook the fact that the VREF on that I/O module is available to supply 5V @ 30mA max  :palm: so at least that part is potentially taken care of as long as I don't exceed the 30mA...

Now I'm trying to find the info on the input impedance of that I/O module so I can figure out the current...

I took a read through those links on the Arduino input impedance but I'll admit, most of it went over my head... the impedance changing when the measurement is being taken, multiplexer doing something... lots of things for me to look into.

This user manual of my I/O modules gives some examples, but not really what I'm doing:

https://www.controlbyweb.com/x19s/x-19s_users_manual.pdf

It mentions that "The input bias current of the X-19s is relatively low, such that the X-19s will work with input circuits with an impedance of up up to 10K ohms with negligible error." .... but I'm not really sure how that applies to me either.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21720
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Ah, that'll do then.  If your source has an impedance of 10kohms, that's 0.5mA short circuit capability from a 5V supply.  Evidently, it draws so little current that most of those bits (maybe not all 12..) will be undisturbed, i.e., a >10Mohm load resistance.

Mind that the op-amps won't be able to pull fully to VREF, or to GND.  You'll be missing a small piece of range at either end.

It's a good plan to use slightly less gain, and/or bias (offset) the signal, so that zero has a convenient representation, like 0.1V or something, well within the op-amp range.

Or if your signals are bipolar, you'll need a VREF/2 offset anyway, which solves that, and then clipping to either side is just a slight reduction in total range.

Presumably you'll have some kind of calibration available in the control, able to account for these changes.

If not, if the controls are very limited in what you can do (I wouldn't think so, with BASIC available as a programming option?), then you may want an op-amp with slightly wider supplies, just to guarantee you can use the full range.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: doublec4

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Ah, that'll do then.  If your source has an impedance of 10kohms, that's 0.5mA short circuit capability from a 5V supply.  Evidently, it draws so little current that most of those bits (maybe not all 12..) will be undisturbed, i.e., a >10Mohm load resistance.

Mind that the op-amps won't be able to pull fully to VREF, or to GND.  You'll be missing a small piece of range at either end.

It's a good plan to use slightly less gain, and/or bias (offset) the signal, so that zero has a convenient representation, like 0.1V or something, well within the op-amp range.

Or if your signals are bipolar, you'll need a VREF/2 offset anyway, which solves that, and then clipping to either side is just a slight reduction in total range.

Presumably you'll have some kind of calibration available in the control, able to account for these changes.

If not, if the controls are very limited in what you can do (I wouldn't think so, with BASIC available as a programming option?), then you may want an op-amp with slightly wider supplies, just to guarantee you can use the full range.

Tim

Hi Tim, thanks for the response.

Can you explain a little more about the source having an impedance of 10kohm or more? The source being the op amp.. so is that 10kohm impedance a parameter that is inherent to the internal circuitry of the current sense amplifier? So in my circuit am I safe to directly connect the output of my op amp to the analog input of that X-19S without any other resistors or capacitors required? It would appear that way on the datasheet but obviously the datasheet can't read my mind and know my application... and is the ADC that has the presumably >10MOhm resistance which counts as the load in this case?

My signals are not bipolar (would the term be unidirectional then?) and I took into account the range I wanted to measure and the gain, etc (made a little excel spreadsheet) and adjusted everything such that my actual output range stays within ~200mA of the swing to rails values indicated on the current sense amplifier datasheet. So for my current sense amplifiers the V_supply will be the 5V coming from the X-19S and on the current sense amplifier my V_ref will be ground so I can achieve 0-5V (nominal) output. I can share my circuit today and perhaps get some feedback.

Thanks for everyone's help so far!
« Last Edit: October 08, 2020, 01:38:38 pm by doublec4 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21720
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Specifically, the <10k impedance is the op-amp output, which is more than adequately provided by the op-amp (which will be ~ohms*).

This gives you a lot of leeway.  You could even take advantage, and add a lowpass filter for example.  Which isn't a bad idea in general, and would even be helpful if you know you don't need to measure sudden changes in current but rather want a smoothed average sort of thing.

*We can measure this two ways:
1. The small-signal, incremental resistance will be very low indeed.  That is, say we apply 0, 1, -1, etc. mA to the pin: how much does its voltage change by, due to that change?  The ratio of changes is the incremental resistance dV/dI.  As long as the op-amp can do its thing, this change will be very small indeed (ohms).  The change is larger at AC (the op-amp can't adjust its output instantaneously), up to perhaps 100s of ohms near the amp's GBW.
2. By cranking up the dI until the op-amp cannot deliver any more, and taking the large-signal average resistance, Vmax / Imax.  Usually the maximum current is in the 10s of mA, so we would expect an average resistance of some hundreds of ohms.  (This figure is also the maximum power point, give or take -- the maximum power transfer theorem isn't usually much use with active circuits like these, but this is one of the definitions we can still use with it.)
Between these two ways, #1 is relevant to this circuit -- we don't expect the ADC to pull anywhere near enough current to make #2 relevant.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: doublec4

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
In ye olde days we had platinum voltage standards.
The rule was "NEVER draw any current!"
It's still not a bad rule to live by.
 

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Specifically, the <10k impedance is the op-amp output, which is more than adequately provided by the op-amp (which will be ~ohms*).

This gives you a lot of leeway.  You could even take advantage, and add a lowpass filter for example.  Which isn't a bad idea in general, and would even be helpful if you know you don't need to measure sudden changes in current but rather want a smoothed average sort of thing.

*We can measure this two ways:
1. The small-signal, incremental resistance will be very low indeed.  That is, say we apply 0, 1, -1, etc. mA to the pin: how much does its voltage change by, due to that change?  The ratio of changes is the incremental resistance dV/dI.  As long as the op-amp can do its thing, this change will be very small indeed (ohms).  The change is larger at AC (the op-amp can't adjust its output instantaneously), up to perhaps 100s of ohms near the amp's GBW.
2. By cranking up the dI until the op-amp cannot deliver any more, and taking the large-signal average resistance, Vmax / Imax.  Usually the maximum current is in the 10s of mA, so we would expect an average resistance of some hundreds of ohms.  (This figure is also the maximum power point, give or take -- the maximum power transfer theorem isn't usually much use with active circuits like these, but this is one of the definitions we can still use with it.)
Between these two ways, #1 is relevant to this circuit -- we don't expect the ADC to pull anywhere near enough current to make #2 relevant.

Tim

Thanks again Tim... so some of that admittedly went over my head. So I see how the 10Kohm op amp output would then limit the current output and helping me stay below the overall 30mA limit of my VREF supply when you simply stated the 0.5mA short circuit capability. (5V / 10kOhm = 0.5mA)

As for the two examples you gave of measuring the ~ohms with changing current... so as the op-amp output changes there is a "rate of change" or some kind of dynamic-like change in resistance? In the case of small (and slow?) changes in output it isn't much to worry about, but for large (and fast?) changes then you could see resistance changes in the hundreds of ohms?

What if for my application I am looking at a PWM'ed LED unit. I believe I presented this example in another thread when I first started asking about current sense amplifiers... the LED unit operates at 200Hz (and about 50% duty cycle). The unit also "blinks" the LED at a rate of about once per second. So my current sense amplifier would be showing me some kind of on/off spike in current once per second, and when the "on" portion of the blink is being read, it would also show some dips and spikes due to the 200Hz PWM control. This application seems "slow"  being a once per second flash and a PWM frequency in the Hz range.... so I would imagine the incremental changes to be small and in the ohm range?

The end goal is to monitor these LED units and determine if they are on/off / functioning properly. Lower or higher than normal current may indicate a failure of the unit. Do you see an advantage to using a low pass filter in the actual circuit to do this? Or rather to build it into the logic?

Thanks for your patience with this. By the way, I see in your signature you offer design services. In the future I have some applications that perhaps we can discuss and there would be some design opportunity for you. There are some things that I would like to outsource at some point. Right now I'm trying to gain a better understanding for my own personal development and growth. Thanks!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21720
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Ahh, this should help -- when we measure incremental resistance, we're using an external signal to perform the measurement.  Not the (in this case) op-amp's own movement.  Though that can be useful, too, or even equivalent.

Suppose the op-amp's output can be modeled as a Thevenin equivalent source.  It produces some ideal voltage V1, and has some source resistance Rs1.  If V1 = 0, we can't draw any current from the source by itself; but this doesn't prevent it from having a source resistance.  We just have to be cleverer to measure it.

If we connect it to another source, of voltage V2 != 0 and known resistance Rs2, then we simply get a voltage divider, from V2 through Rs2 and Rs1, to V1 = 0V.  Then we can measure the voltage in the middle, and solve for Rs1.  Indeed, we can do this even if V1 != 0, by measuring V1 when I = 0 (so that V(Rs1) = 0), and subtracting it out: Vmid = V1 + (V2 - V1) Rs1 / (Rs1 + Rs2).  (I think I wrote that right; exercise: write it out and double check.)

If we don't generally know the DC value of V1, we can do the same thing at AC.  Use a series coupling capacitor, Xc << (Rs1 + Rs2).  The same relation applies, but we can replace the DC voltages with the small-signal AC voltages; and now the signal voltages can be small, perhaps mV in practice (or in theory, the amplitude doesn't matter, but theory is assuming linearity, which our real circuits only provide over a limited range).

Also, at AC, we might be concerned with the phase shift and frequency dependence of these results; in short, we're not measuring a resistance, but some combination of resistance and reactance (including one or the other being zero).  If we use sinusoidal voltages, we can express phase as sine and cosine components, and use complex numbers to represent impedances (the "complexity" only meaning that we use one number a+jb to represent pairs of those components).

Still another way to see this, is to apply superposition.  In the connected-Thevenin-sources test, consider all but one source inactive (set to zero), for each source in the system.  Calculate the current flow, then sum the results over all conditions.

And we've already considered the one-source-zero case, and there are no other cases (just exchange V1/V2, Rs1/Rs2), so we're complete!

If the source has a nonzero voltage, we can measure its output unloaded (I = 0), then again with some load resistance.  We know the output voltage and load resistances in both cases, so we can again calculate Rs1.  (Notice a load resistor by itself, is also a Thevenin source of V = 0 -- this really isn't stating anything different from the above!)


Practical downsides are, if the unloaded voltage is say 1.337V, and the loaded voltage is 1.336V, well, that's really not saying much when our resolution is +/-0.001V.  Whereas if we read 0.00 vs 1.02mV, we have very good confidence in the result.  So while circuit theory by itself doesn't care, we may still prefer one approach over the other.  This isn't hard to anticipate, it's just incorporating other theory: namely, the statistics of random variables under addition and multiplication.

In any case, this spans roughly the first year of EE theory and labs, so, if you haven't studied it much yet, you'll have to look up these terms...  But these are among the subjects taught, and with study you will become comfortable with them.


The most important takeaway is that circuit theory is like any other algebra: there is a set of operations, which have no effect on the correctness of the system (the states before and after, are equivalent), that allow you to expand or reduce the system in certain ways, hopefully allowing you to solve it.  Even better(?), it's done with a graphical language, not just flat equations.


Anyway, at no point is there an actual 10k resistor: we are imagining or testing load and source conditions with respect to that as a reference value.  The op-amp might have a few ohms output resistance, which is much less than 10k, safe to use.  The ADC being insensitive to sources up to 10k, and having a resolution of about 1/4000th of full scale, implies 10k * 4000 or 40M for its effective load resistance.  (I said over 10M (10 bits equivalent), as the 12 bits can be optimistic and depends on reasonably good design to actually meet.)

For the LEDs, I would use some filtering, yes.  Enough to "take the edge off", maybe a time constant of fractional ms (e.g., 470 ohms in series, 1nF to GND).  Might be a good idea to put this in front of the current sense amp; usually the datasheet/appnote provides hints on this.  I would also consider a window comparator, to do the check directly: no need to ask an ADC to measure things.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: doublec4

Offline doublec4Topic starter

  • Regular Contributor
  • *
  • Posts: 119
  • Country: ca
Tim, thank you again for taking the time to write that out. I certainly have a lot to learn to say the least.

I understand some of what you're saying, but I am certainly still feeling a bit dense here  ;D

So a few more points / questions... I'm going to number them so I don't lose track.

1. Going back a few comments, you had mentioned offsetting the signal so that zero has a convenient representation. For this device (INA190) the zero load condition brings the output to GND + a few mV. My loaded condition is not in the lower range so that there is meaningful information between the unloaded and loaded condition with respect to the resolution. I think this is what you were getting at?

2. Also, so you have determined that the direct output from the current sense amplifier is suitable for the ADC as you had said the ADC is insensitive to sources up to 10kohm. But in terms of using my 30mA limited voltage source... it would then be good practice to place a series resistor (less than 10k) from the output of my current sense amplifier to the ADC to keep my worst case condition current (sum of all current sense amplifiers) less than 30mA total?

3. In the presence or absence of a series resistor, is it also good practice to put a large pull down resistor to ground between the current sense amplifier output and the ADC? Datasheet doesn't show this but I see it on some schematics that I have sifted through online for other current sense amplifier devices.

4. Additionally, on page 22 of the INA190 datasheet it touches on signal conditioning (low pass filter) : https://www.ti.com/lit/ds/symlink/ina190.pdf?ts=1602041712633&ref_url=https%253A%252F%252Fwww.google.com%252F
It shows a layout for the low pass filter for noisy environments. The resistor/cap layout looks different than how you described. How are they functionally different? Would there be some undesirable effect to do this after the current sense amplifier output and essentially use the low pass filter to do my "averaging" for the LED application? 

At some point I also saw the window comparators and thought it could be useful for my application and will look into them more. As I'm still learning I did want to have some basic grasp of taking measurements using the ADC as well.

For the purpose of moving this project along I am hoping to get something working in the meantime and then I can take some time to more thoroughly understand how and why it is working. I don't like being the guy who "just wants it to work" and be ignorant of how and why, but also I sometimes have to balance it with time constraints and then I can go back and revisit the theory. i wish there were more hours in a day.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21720
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
1. Going back a few comments, you had mentioned offsetting the signal so that zero has a convenient representation. For this device (INA190) the zero load condition brings the output to GND + a few mV. My loaded condition is not in the lower range so that there is meaningful information between the unloaded and loaded condition with respect to the resolution. I think this is what you were getting at?

If you don't need to know "how off" it is, that's fine.


Quote
2. Also, so you have determined that the direct output from the current sense amplifier is suitable for the ADC as you had said the ADC is insensitive to sources up to 10kohm. But in terms of using my 30mA limited voltage source... it would then be good practice to place a series resistor (less than 10k) from the output of my current sense amplifier to the ADC to keep my worst case condition current (sum of all current sense amplifiers) less than 30mA total?

The load resistance of the ADC is much more than the 5V/30mA load resistance that would cause problems.  No series resistance is needed.


Quote
3. In the presence or absence of a series resistor, is it also good practice to put a large pull down resistor to ground between the current sense amplifier output and the ADC? Datasheet doesn't show this but I see it on some schematics that I have sifted through online for other current sense amplifier devices.

It can be helpful for some amps.  LM339/393 for example, has a class B output stage, meaning the output transistors aren't drawing much current at all, and therefore it takes an instant for the output to respond to changes from the input.  A load resistor can bias one transistor on, reducing or removing this defect.

Most amps made within the last generation or two, don't have this problem.  (LM339 is old.)


Quote
4. Additionally, on page 22 of the INA190 datasheet it touches on signal conditioning (low pass filter) : https://www.ti.com/lit/ds/symlink/ina190.pdf?ts=1602041712633&ref_url=https%253A%252F%252Fwww.google.com%252F
It shows a layout for the low pass filter for noisy environments. The resistor/cap layout looks different than how you described. How are they functionally different? Would there be some undesirable effect to do this after the current sense amplifier output and essentially use the low pass filter to do my "averaging" for the LED application?

Yes, that is the correct way.  The two sense wires act as ground for each other; they're symmetrical.

Filtering in front is preferred, because high frequency noise can cause upsets in the amp's reading.  How much, depends on the internal architecture of the amp.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: doublec4

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21720
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Erm, LM324/358.  339/393 is the period-equivalent comparator.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf