Low current sensor using LTC6102

Thread Starter

xkekex

Joined May 16, 2012
25
hello,
sorry for the delay i have been out for a few weeks.
the maximum time to switch between resitors shouldn't be more than 1milisec.
 

Ron H

Joined Apr 14, 2005
7,063
hello,
sorry for the delay i have been out for a few weeks.
the maximum time to switch between resitors shouldn't be more than 1milisec.
The sensing and switching could easily be done in software in MUCH less than a millisecond. As I said previously,
Why can't you do your range switching based on the A/D output? You could set up your hysteresis in software, and use an MCU output to control the range switch.
You will probably need to use a PMOS transistor to switch Rin, due to the low resistance (2 ohms).
Why are you resisting this approach? If you know how to program your MCU, it would be much easier than a hardware design. If you don't know how to program it, then how are you going to complete the project?
We can show you how to control the range switch from an output of the MCU.
 

Thread Starter

xkekex

Joined May 16, 2012
25
I didn't think that it would be fast enough through the MCU.
I will do as you say.

Concerning the conditioning circuit before the MCU, is it ok if i use a fast and low-offset opamp(ex:LTC1050) in differential mode to probe the voltage across the sensing resistor with the apropriate gain to match the full range of the MCU ADC.


At the output i'll have 2 logic signals controlling a 1:3 DEMUX (ex:ts5a3357) rooting the proper Rin (1, 2 or 3).

thx
 

Ron H

Joined Apr 14, 2005
7,063
I didn't think that it would be fast enough through the MCU.
I will do as you say.

Concerning the conditioning circuit before the MCU, is it ok if i use a fast and low-offset opamp(ex:LTC1050) in differential mode to probe the voltage across the sensing resistor with the apropriate gain to match the full range of the MCU ADC.


At the output i'll have 2 logic signals controlling a 1:3 DEMUX (ex:ts5a3357) rooting the proper Rin (1, 2 or 3).

thx
I may be wrong about the amount of time required to do this in software. What is the conversion time of your ADC? I forgot to consider that.
 

Ron H

Joined Apr 14, 2005
7,063
conversion time should be about 1us and acquisition time could be a bit long, about 20us in worst case
OK, then there should be no problem with getting the switching done in less than a millisecond.

If you use an op amp in differential mode, you will have to have four precision resistors, and range switching will involve switching two of them.
 

Ron H

Joined Apr 14, 2005
7,063
why will i need to switch 2 of the opamp resistor?
Have you looked at the schematic and the gain equation of a difference amplifier? Look at the bottom circuit, "Amplified Difference".
This analysis omits the common-mode gain you will get if your resistor ratios aren't exactly equal. In your case, the common mode voltage is 6V. A portion of that will appear at the output unless the ratios are matched.
This page has the complete gain equation, so you can figure out for yourself what will happen if your resistor values are wrong.
 

Thread Starter

xkekex

Joined May 16, 2012
25
Yes i know that we need high precision resistors to match the ratios, but i don't get the point of changing two of the resistors when i switch from one Rin to another.
is it because you wanna change the gain??
 

Ron H

Joined Apr 14, 2005
7,063
Yes i know that we need high precision resistors to match the ratios, but i don't get the point of changing two of the resistors when i switch from one Rin to another.
is it because you wanna change the gain??
In your old circuit, Rin was your gain changing resistor.
How would you change gain with a diff amp?

If I were doing this, I would either use the 6102 or equivalent, or look for an instrumentation amp whose common mode input range includes the positive rail.
 

Thread Starter

xkekex

Joined May 16, 2012
25
In your old circuit, Rin was your gain changing resistor.
How would you change gain with a diff amp?


Yes it was, I change Rin according to the ranges in order to match accuracy.
what i need to measure with the dif amp is the voltage across Rsense.
This voltage can go from 1.8uV to 1.8V. i want toamplifie this voltage through the dif amp in order to fill the MCU's ADC range 0->3.3V.
Here is a brief schematic of what i have in mind.

Capture.PNG
 

Ron H

Joined Apr 14, 2005
7,063
In your old circuit, Rin was your gain changing resistor.
How would you change gain with a diff amp?


Yes it was, I change Rin according to the ranges in order to match accuracy.
what i need to measure with the dif amp is the voltage across Rsense.
This voltage can go from 1.8uV to 1.8V. i want toamplifie this voltage through the dif amp in order to fill the MCU's ADC range 0->3.3V.
Here is a brief schematic of what i have in mind.

View attachment 43572
Apparently you didn't understand the scheme I proposed.
I don't think you need another amplifier. You just need the 6102. You constantly monitor the ADC output (in software). When the ADC output gets above a certain threshold (e.g., 97% of full scale), you reduce the gain by a factor of 10. When the ADC threshold drops below a certain threshold (e.g., 3% of full scale), you increase the gain by a factor of 10. You can do this for as many decades as you need.
These are just examples. You can work out the details.
 

Thread Starter

xkekex

Joined May 16, 2012
25
ok,
I think i got it,
i just monitor the switch in resistors depending on the output Voltage of the 6102 (Vout) compared to the full scale voltage(VMax).
and the behaviour MCU would be like:
INIT:
RIN=1.8k

While(1)

IF VOUT<3% of VMax (just to retake your example)
THEN, RIN=RIN/100 (18)
ELSE Vfinal=VOUT.
END iF

Same thing to increase RIN
END While

with Vfinal the registered Value to current consumption!
 

Ron H

Joined Apr 14, 2005
7,063
ok,
I think i got it,
i just monitor the switch in resistors depending on the output Voltage of the 6102 (Vout) compared to the full scale voltage(VMax).
and the behaviour MCU would be like:
INIT:
RIN=1.8k

While(1)

IF VOUT<3% of VMax (just to retake your example)
THEN, RIN=RIN/100 (18)
ELSE Vfinal=VOUT.
END iF

Same thing to increase RIN
END While

with Vfinal the registered Value to current consumption!
That sounds right. You will want to play with some examples to find the best thresholds.
You should probably use logic level PMOS transistors as your switches.
 
Top