Author Topic: 1.5 transistor 0 to 5A ammeter MCU 10-bit A2D with .01-ohm shunt practical?  (Read 20615 times)

0 Members and 1 Guest are viewing this topic.

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 812
If I make a (transconductance /voltage) amplifier by using a common-emitter single BC547C (Beta~400 over wide collector cur) is it  possible/practical/clever to use a .01-ohm shunt to measure DC currents from .25A to 5Amp with 20% accuracy and be stable over a 15C-30C operating temperature range, assuming I use a 10-bit ADC input of a MCU to do the necessary calcs by measuring the C-E voltage of the amplifier?

Note: common-emitter amplifier with Vbe temperature compensation by diode in base to ground circuit, emitter resistor is 200-ohm, collector resistor 39k.
 
The two BC547C transistors (TO-92 case) are superglued flat-side to flatside together and heat-shielded by shrink-tubing (to some extent achieving  perfect thermal matching).

The second BC547 is diode connected forward-biased Base-Emitter junction is used for temperature stabilization to compensate for ~2mv/Deg-K Base-Emitter voltage variation. For delta-VBE thermal-correction purposes this junction is in series with the common-emitter's base to ground bias setting resistor and the .01-ohm current shunt.

Assuming a resistor from a stable 5.0 Vdd supply to the base of the common-emitter amplifier and using a MCU connected to the collector of this high-gain (AV=200) amplifier which sets the collector voltage operating point at 2.5V,  have I made the cheapest, bubba-accurate  low-cost low-BOM current meter?

What would be the accurate calculation to determine (assuming optimum low-power consumption) value for the base to diode to shunt to ground resistor and the +5V to base resistor?

The MCU would convert changes in collector voltage of the common-emitter amplifier (delta-volts to amps/volt calculations).
« Last Edit: March 03, 2024, 10:31:50 am by SuzyC »
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
If I make a (transconductance /voltage) amplifier by using a common-emitter single BC547 (Beta~400 over wide collector cur) is it  possible/practical/clever to use a .01-ohm shunt to measure DC currents from .25A to 5Amp with 20% accuracy and be stable over a 15C-30C operating temperature range, assuming I use a 10-bit ADC input of a MCU to do the necessary calcs by measuring the C-E voltage of the amplifier?

Note: common-emitter amplifier with Vbe temperature compensation by diode in base to ground circuit, emitter resistor is 200-ohm, collector resistor 39k.
 

The two BC547C transistors (TO-92 case) are superglued flat-side to flatside together and heat-shielded by shrink-tubing (to some extent achieving  perfect thermal matching).

The second BC547 is diode connected forward-biased Base-Emitter junction is used for temperature stabilization to compensate for ~2mv/Deg-K Base-Emitter voltage variation. For delta-VBE thermal-correction purposes this junction is in series with the common-emitter's base to ground bias setting resistor and the .01-ohm current shunt.



Assuming a resistor from a stable 5.0 Vdd supply to the base of the common-emitter amplifier and using a MCU connected to the collector of this high-gain (AV=200) amplifier which sets the collector voltage operating point at 2.5V,  have I made the cheapest, bubba-accurate  low-cost low-BOM current meter?

What would be the accurate calculation to determine (assuming optimum low-power consumption) value for the base to diode to shunt to ground resistor and the +5V to base resistor and also the +5 to base resistor?

The MCU would convert changes in collector voltage of the common-emitter amplifier (delta-volts to amps/volt calculations).

Short answer is no. 0.25A across 0.01R is 2.5mV at -2mV/C and different currents I think you would be hard pressed. If you insist on just two transistors at least use a matched pair e.g. BCM847 and a differential pair would show a better result, it has some CMRR built in.
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 812
Moffy.  The problem is drift almost = measurement value, but assume this:

MCU has more brains than dumb shunt-amplifier.

Every measuring interval by the MCU the current through the shunt is turned off(=0) and the collector-emitter voltage of the amplifier is measured. This is the first reading recorded by the MCU.

Then current is turned on  by the MCU and the delta-collector V is measured.  This is the second reading.
Effect = Self-Calibrated accurate ammeter?
« Last Edit: March 03, 2024, 07:56:41 am by SuzyC »
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Moffy.  The problem is drift almost = measurement value, but assume this:

Every measuring interval by the MCU the current through the shunt is turned off(=0) and the collector-emitter voltage of the amplifier is measured. This is the first reading recorded by the MCU.

Then current is turned on  by the MCU and the delta-collector V is measured.  This is the second reading.
Effect = Self-Calibrated accurate ammeter?

It is such a simple circuit wouldn't it be easier to build and test it rather than discuss it? Then you would know  one way or the other. :)
 
The following users thanked this post: SuzyC, Vovk_Z

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
LCSC has LM358 clone OPAMPs for under three cents!
The LM358 input common mode range includes its negative supply so its usable for low side current sense.   Good luck getting the mess of BJTs and other discretes you need for a halfway usable transistor current shunt amplifier for less than that, even after allowing for a few resistors to set the gain and bias +in slightly to get the output up off the negative rail a bit at zero current.   
« Last Edit: March 03, 2024, 08:21:27 am by Ian.M »
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 812
The reason why I haven't breadboarded it is although I have a dozen or so BC547 transistors,  they are not Beta-batched. I would have to buy some batched and/or matched transistors to make this simple test or else go through a Monte-Carlo fishing trip and still know nothing about using factory-matched Beta bin-numbered "C" bins or buying factory-matched pairs(which would be too much more expensive).

The real question is, after many moons ago reading about (old GE transistor Manual) transistor theory and operation and always seeing B-E biased stabilization using a diode in the base-ground circuits, I have almost never come across this basically a germanium transistor stabilization technique in any equipment since Si became the rage, but really, how much stabilization is achieved?

For my idea to work, the collector voltage would have to remain in the 1 to 4 volt range over ambient temperature variation.

I know that LM358's are cheap and cheaper, but a 358 amp takes 1.6 to 3mA min operating current and more I at quiescent output=2.0V? Also, stabilization time if 358 amp is switched on for strobed/sampling measurement(if low-pass freq. compensated) and also an offset biasing resistor value that might have to be one-each selected value if offset varies '358 amp to amp.
Also Vos (offset v) of '358 is high and can be quite a challenge since OSV x 200 gain and can be in either direction depending on '358?
« Last Edit: March 03, 2024, 09:37:24 am by SuzyC »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7226
  • Country: pl
Dunno, maybe it will be good enough if you take the measurement quickly after calibration.

As I understand (no schematic given), you basically want to have a current mirror with one emitter connected to the shunt resistor rather than to ground. This doesn't need matching for β, but for Vbe, which is doable with DMM diode test and any two transistors from one batch are highly likely to match quite closely (<2mV). It may be necessary to keep internal power dissipation low or equal in both transistors. Output current of the mirror should be within ±10% of the input current at Vshunt=0 given this degree of matching.

You may find that gain varies with temperature (more ΔVce for the same Vshunt at low temperature) by ~10% over a 30°C span. This could be compensated digitally by measuring transistor temperature by means of their Vbe.

More current will make it faster and power/speed ratio is likely better than any IC, but some IC may be good enough. There is a huge choice of low power opamps.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5194
  • Country: bj
This is how I've deciphered the OP's idea..
« Last Edit: March 03, 2024, 11:05:08 am by iMo »
Readers discretion is advised..
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 812
IMOO iMo, fantastic!  Is it based on LTSpice and the specs of the Philips BC547C Beta= 400 to assign accurately Rcol=100k  and Rb=0?

The change in Vcol over operating temperature are not clear..no temperature axis values shown.  Could you post a clearer temp-range chart?

« Last Edit: March 03, 2024, 11:12:19 am by SuzyC »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5194
  • Country: bj
It is based on the NXP BC547C model in LTSpice24 with BF=458.

There are 3 sims with 0-100C and 2x 15-30C.

PS: download yourself the LTSpice and try it.. It's easy..   ;)

« Last Edit: March 03, 2024, 11:20:09 am by iMo »
Readers discretion is advised..
 
The following users thanked this post: SuzyC

Offline SuzyCTopic starter

  • Frequent Contributor
  • **
  • Posts: 812
I may be as pretty as I am dumb, but what I don't see clearly is the bottom-line result graph, that is temperature degree axis labeled versus Vcol output for 0 to 30 DegC?

Do graphs show Vout spanning ~3.6v to ~.3v over a 15 to 30C  temperature range while Ishunt varies from 0 to 5-amp?

Does the second graph shows delta Vout of the quiescent collector current over 15 to 30 degC is held constant within 10 mV?

Then my circuit works well(in theory)? Can I clean the dust off my correspondence course BSEE degree hanging on my wall?


« Last Edit: March 03, 2024, 12:28:14 pm by SuzyC »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5194
  • Country: bj
1. I may be as pretty as I am dumb, but what I don't see clearly is the bottom-line result graph, that is temperature degree axis labeled versus Vcol output for 0 to 30 DegC?

2. Do graphs show Vout spanning ~3.6v to ~.3v over a 15 to 30C  temperature range while Ishunt varies from 0 to 5-amp?

3. Does the second graph shows delta Vout of the quiescent collector current over 15 to 30 degC is held constant within 10 mV?

4. Then my circuit works well(in theory)? Can I clean the dust off my correspondence course BSEE degree hanging on my wall?

1. you do not see a graph from 0C to 30C. There are graphs from 0-100C and 15-30C.
2. there is a graph showing Vout (the same as Vcol) while spanning 15-30C while the input current is spanning 0.25-5A
3. there is a graph showing Vout while the input current is 1Amp while temperature is spanning 15-30C
4. your circuit may work well in theory, yes. In practice you have to play with the bias resistor R5 such you get the Vout fitting your ADC range best. Also try to match the transistors as Magic has advised to you (do not touch your transistors before/during the measurements with your fingers - temperature).
The Vout is not linear with current, you have to "calibrate" the voltage vs current readings inside your MCU (a little bit math needed).

You may clean the dust off your BSEE only after you get familiar with the LTSPICE and my sims above.. ;D

PS: below a mod with 100ohm emitter resistor and 180k R5 bias resistor. Temperature sweep from 0C to 30C step 1C, input current from 0A to 5A step 0.25A. The most temperature sensitive area (Vout on Temperature) is with high input currents as you may see in the graph. For example at 5A input current your Vout will vary from 0.4V to 0.8V when the ambient temperature will vary from 0C to 30C.

In reality the results will be a bit (much) worse, my bet, as the transistors will not match perfectly in many params. Also the temperature coefficients (TC) of the shunt and the resistors may play a role (as ie. the shunt will change its resistance (TC of R) with the input current intensity).

It is up to you now to make the reality check and report the result to us.. :D
« Last Edit: March 03, 2024, 07:24:35 pm by iMo »
Readers discretion is advised..
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1878
  • Country: au
If I make a (transconductance /voltage) amplifier by using a common-emitter single BC547C (Beta~400 over wide collector cur) is it  possible/practical/clever to use a .01-ohm shunt to measure DC currents from .25A to 5Amp with 20% accuracy and be stable over a 15C-30C operating temperature range, assuming I use a 10-bit ADC input of a MCU to do the necessary calcs by measuring the C-E voltage of the amplifier?
Does that 20% mean 20% of full scale, or do you want 20% of 0.25A, which is already 5% of full scale, meaning you really want 1% of full scale ? (5mV of total error)


The real question is, after many moons ago reading about (old GE transistor Manual) transistor theory and operation and always seeing B-E biased stabilization using a diode in the base-ground circuits, I have almost never come across this basically a germanium transistor stabilization technique in any equipment since Si became the rage, but really, how much stabilization is achieved?
Many vendors (nexperia, OnSemi, Diodes, LRC..) sell matched transistor pairs, so that means there is a large enough market for this.
You can get matching as good as 2mV and 2% of HFE. (Nexperia PMP4201Y)
Of course, you do pay a bit more for a matched part.

I know that LM358's are cheap and cheaper, but a 358 amp takes 1.6 to 3mA min operating current and more I at quiescent output=2.0V? Also, stabilization time if 358 amp is switched on for strobed/sampling measurement(if low-pass freq. compensated) and also an offset biasing resistor value that might have to be one-each selected value if offset varies '358 amp to amp.
Also Vos (offset v) of '358 is high and can be quite a challenge since OSV x 200 gain and can be in either direction depending on '358?
Then you can go a little less cheap, and a bit more modern.
Let's look at the  Gainsil LMV358A-SR    7.5c / 500 at lcsc
That improved part is 7.5V max, CMOS IP 1pA typ, Rail to rail in, has Vos 1mV max, 100uV typ and typ Icc of 60uA/OpAmp

Lower spec LMV358's/LMV321's are ~4c/500, for Vos 4.5mV max, 1mV typ so you can choose how much precision you pay for.

Or. going the other way, Vos 100uV MAX is ~ 15c/500 and Vos max 30uV is ~17c/500
« Last Edit: March 03, 2024, 07:57:18 pm by PCB.Wiz »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf