Author Topic: Current Sensing  (Read 3252 times)

0 Members and 1 Guest are viewing this topic.

Offline lnadolskiTopic starter

  • Contributor
  • Posts: 17
  • Country: us
Current Sensing
« on: July 11, 2016, 05:12:59 pm »
Hi all,

I am designing a current sensor to measure current ( 0 - 30 uA range ) drawn from a microcontroller. For my design I chose to use a high side current shunt that is input to a fully differential op-amp (TI THS4131) circuit (see diagram below). *I have been told this is a terrible choice for current sensing op-amp but please bear with me*
The THS4131 differential outputs are connected to a LabJack U6 analog input terminals for differential measurement. The Vocm pin of the THS4131 is connected to the LabJack U6 GND pin as a reference for the output common-mode voltage.

In order to test the design, I am using a LabJack U6 for constant current source as shown in the diagram. When I take a differential measurement using the LabJack it appears that only part of the current provided by the LabJack is running through the shunt resistor. I can confirm this by directly measuring the voltage across the resistor in the op-amp circuit. I see that the LabJack current source is providing either 10 or 200 uA but that some of that current is being drawn into the op-amp circuit. I have provided a table to show the voltage measurements I have taken using both LabJack current sources.

Does anyone have an explanation of what might be causing the op-amp circuit to draw current away from the shunt? Is this typical? What op-amp parameters should I have taken into consideration during my design?

I am a noob and spent a considerable amount of time with my overall circuit design and troubleshooting this issue. Given my use of the THS4131 and my desired current measurement range, should I toss my present design using the THS4131 and use some op-amps designed specifically for current measurement (like uCurrent)?

Thanks in advance for all of your help.

NOTE:
Rs = R1 = R2 = 10 kOhm
R3 = R4 = 33.3 kOhm

« Last Edit: July 11, 2016, 05:31:57 pm by lnadolski »
 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Current Sensing
« Reply #1 on: July 11, 2016, 05:26:30 pm »
it appears that only of the current provided by the LabJack is running through the shunt resistor.
I think you're missing some text there, but I think I know what you mean.
The parameters to take into consideration are:
-Input bias current -- This is actually what you're seeing, the op-amp will draw this much current from your circuit. For your OpAmp, this is up to 6uA, which is a lot considering you want to measure currents lower than that. You want something with much lower input bias current such as the MAX4239 used in the uCurrent which has MAX4239 2pA offset current, 1,000,000 times less than the THS4131.
-Input offset voltage -- Since you'll be dealing with 10mV/uA voltage differentials, you want something with under 1mV offset voltage to not get random noise.

Is this high volume or low volume, I assume you don't care about bandwidth. Also why not use an ADC with built-in gain, It will have better performance than what discrete op-amps can deliver. What ADC are you using ?
 

Offline lnadolskiTopic starter

  • Contributor
  • Posts: 17
  • Country: us
Re: Current Sensing
« Reply #2 on: July 11, 2016, 05:38:32 pm »
Thanks for the quick reply Signal32.

I updated the post so that the sentence you quoted is clear.

I thought that might be the parameter that I should be looking at. What is the difference between input bias current and input offset current?

The ADC is the LabJack U6. It has various built-in gain options that I can use depending on the input signal.

Thanks again for all of your help.

L
 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Current Sensing
« Reply #3 on: July 11, 2016, 05:53:34 pm »
I thought that might be the parameter that I should be looking at. What is the difference between input bias current and input offset current?
The + and - inputs of the op-amp each draw up to 6uA, let's say 4uA each. Now they won't both draw EXACTLY 4uA, one will draw 3.9uA and the other 4.1uA. This difference 4.1-3.9 is the input offset current. It's not really relevant to you, you're looking for minimum input bias current.
I see that the LabJack U6 allegedly has a 18 bit ADC and a 0.1v input range + differential inputs + "high impedance". Why not use it directly ?
« Last Edit: July 11, 2016, 05:56:46 pm by Signal32 »
 
The following users thanked this post: lnadolski

Offline lnadolskiTopic starter

  • Contributor
  • Posts: 17
  • Country: us
Re: Current Sensing
« Reply #4 on: July 11, 2016, 06:09:22 pm »
Thanks again Signal32.

The reason I would use the LabJack directly is because we will be using three of these circuits on a single PCB design, much like the uCurrent except with different ranges and some additional functionality.

I guess I could use some relays to switch the different shunts across the LabJack inputs and adjust the gain settings, etc.  The team also wanted to filter the signal prior to data acquisition but we could always move away from the analog filtering and just use some software filtering techniques...thoughts?

Thanks again for your input and advice.

L
 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Current Sensing
« Reply #5 on: July 11, 2016, 06:39:37 pm »
The reason I would use the LabJack directly is because .
I don't understand, are you intending to use the LabJack directly or indirectly by first having an amplifying op-amp ?
What will your final product look like ? Will you make many units ?
In your final product, will the LabJack be used as an ADC ?
Will the LabJack be used as a current source ? If yes, does the current source not display how much is being sourced, why have to measure it ?
Perhaps a description of the functionality of your final product would be best, how ranges would work, will you have to collect data from multiple channels with different ranges at the same time, etc .
 

Offline lnadolskiTopic starter

  • Contributor
  • Posts: 17
  • Country: us
Re: Current Sensing
« Reply #6 on: July 11, 2016, 06:53:08 pm »
Hi Signal32,

My response to your questions are below in red.

I don't understand, are you intending to use the LabJack directly or indirectly by first having an amplifying op-amp ?
I intend to use the LabJack U6 to measure the output of the op-amp.

What will your final product look like ? Will you make many units ?
My product will be a current sensing module with 3 different current sensing ranges (similar to uCurrent). I will use LabJack to control relays to determine which current sensing range to use. Anywhere from 100 to 200 of these modules will be made.

In your final product, will the LabJack be used as an ADC ?
The LabJack will be used as ADC and logic control for relays. I intended to use the LabJack U6 current sources to perform a two point calibration of the circuit.

Will the LabJack be used as a current source ? If yes, does the current source not display how much is being sourced, why have to measure it ?
LabJack current sources would only be used to calibrate the circuit that sense in uA range...ie find offset and gain of circuit (may not be needed with proper op-amp? )

Thanks again for the insight and questions.

 

Offline Signal32

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: us
Re: Current Sensing
« Reply #7 on: July 11, 2016, 08:03:19 pm »
Oh ok now I see what you're trying to achieve.
may not be needed with proper op-amp?
Unless you will be using precision resistors you will still need to calibrate it, and even then it would be very recommended to calibrate it. How much precision do you need ?

I still don't understand why not measure the shunt voltage directly using LabJack's differential input, why use an op-amp to amplify it ? I'm not that familiar with the LabJack but using an op-amp will add noise and error. Ex op-amp resistor thermal drift, op-amp gain drift, etc. These will drift somewhat with age but a lot with temperature. The uCurrent needs a precision op-amp because it uses a 10Ohm shunt on the uA range, but you are using 10kOhm.
BTW I hope you understand that a 10KOhm shunt resistor in series will have somewhat of an impact on the device you're measuring current for. Ex a 10v device drawing 20uA will see a voltage drop of 0.2V.

Also one thing to consider is that you could use MOSFETs for switching instead of relays, since relays are bulky/slow/expensive/power hungry, though you will have to slightly modify your design. Any reason for not using MOSFET's ?
 
The following users thanked this post: lnadolski

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Current Sensing
« Reply #8 on: July 11, 2016, 11:58:41 pm »
Hi Signal32,
Anywhere from 100 to 200 of these modules will be made.
Oh dear, do you have loads of these THS4131s that you're just using up ?
.  That took much longer than I thought it would.
 
The following users thanked this post: lnadolski

Offline lnadolskiTopic starter

  • Contributor
  • Posts: 17
  • Country: us
Re: Current Sensing
« Reply #9 on: July 12, 2016, 12:08:02 pm »
@StillTrying, only purchased a few ICs for testing my first board spin.

@Signal32, thanks again for your questions and insight.

I still don't understand why not measure the shunt voltage directly using LabJack's differential input, why use an op-amp to amplify it ? I'm not that familiar with the LabJack but using an op-amp will add noise and error. Ex op-amp resistor thermal drift, op-amp gain drift, etc. These will drift somewhat with age but a lot with temperature. The uCurrent needs a precision op-amp because it uses a 10Ohm shunt on the uA range, but you are using 10kOhm.

That is a great question Signal32. The specs/requirements for this project were developed by my colleagues who have much more experience than I do. In general, I am still learning which specs/requirements are feasible for a given project and what is the simplest, cost effective, elegant solution to meet those specs/requirements so that I can confidently discuss the my design decisions with colleagues. In hindsight, I have made some poor design decisions and did not immediately ask some of the seemingly obvious questions like:

'Why not just use LabJack differential measurement directly across shunt resistors if that has been in the past for similar measurements?'
'Why do we need to use op-amps if we can use LabJack gain settings?'
'Do we need to use analog filtering or can we get away with filtering in software?'
etc.


BTW I hope you understand that a 10KOhm shunt resistor in series will have somewhat of an impact on the device you're measuring current for. Ex a 10v device drawing 20uA will see a voltage drop of 0.2V.
I understand the effects of the burden voltage of any shunts and relay contacts that are in series with the DUT. For our application, we intend to use a bench top power supply. We will set the voltage to make sure that the DUT is being powered correctly or use the power supply sense capabilities to provide a constant voltage to the DUT power terminals.

Thanks again for all of your help.

 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Current Sensing
« Reply #10 on: July 12, 2016, 08:51:28 pm »
For future reference a PSOC 5LP has -

20 bit ADC with input G stage. R-R performance (certain configurations)
.1% onchip reference
analog mux
ARM CPU with RAM and Prgram FLASH and EE emulation
Comm, UART, USB, SPI, CAN.......
Digital Filter block
DMA (think do everything in background while running other tasks)
Logic elements, fabric routable........
LCD interface
OpAmps, Comparators, Mixers......


All for around $ 10-12 or less.

http://www.cypress.com/products/32-bit-arm-cortex-m3-psoc-5lp

Just a thought.


Regards, Dana.



« Last Edit: July 12, 2016, 08:57:23 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf