Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help with MAX4172 Precision High Side Current Sense Amplifier Pls

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

I have been trying to understand how the MAX4172 works and must be missing something.

I have the IC set up as per the diagram and it is indeed working. I think!

I get the low output on PG that lights my led and also get the expected change in Volts out (across Rout and Gnd) with a change in load across RS.

Edit: With no load I get an Rout reading of .15v ?

With a load of 5.35mA I get an Rout reading of .335v
With a load of 19.9mA I get an Rout reading of .865v
With a load of 910mA I get an Rout reading of 3.5v N.B. my 5vPSU is only rated at 1Amp so this would almost be as much as I ever need to measure current wise.

My R sense Resistor is 1ohm which is the smallest I have in a reasonable wattage.

My Rout Resistor is 3k48 as suggested in the text, which for some reason seems to remain the same through the entire table of suggested values! Puzzling!

My actual problem is that no matter how many times I refer to the datasheet, I cannot work out the formula for converting the Rout reading to true Volts.

Can anyone explain this in simple terms please? I am really struggling and maths is not my forte.

Thanks, Al
 
Last edited:
Hi guys,

So does anyone know why the results I'm getting are not linear?

Really baffled and need some help understanding what is wrong? Resistor choice? My math?

Thanks again, Al
 
Hi guys,

So does anyone know why the results I'm getting are not linear?

Really baffled and need some help understanding what is wrong? Resistor choice? My math?

Thanks again, Al

Hi Al,
Your 3.5V @ 910mA looks OK.. 3.5/9.1 = 3.84K

What do you mean by 'true volts'. ?

Eric
 
Hi Eric,

Hope you are fit and well mate, and ready to once again translate datasheet speak into something I can understand.

The part that puzzles me is how to convert the readings I'm getting into something meaningful.

I know you say that the 910mA looks ok but the other readings don't seem to work out, or am I missing something obvious?

What I intend to do is make my PSU adjustable current wise on the fixed 5v side and adjustable voltage and current on the variable 3 to 15v side. The hardware part of the regulation is pretty simple and I have done this before both for current and voltage limiting, but when I came to actually measuring the current and displaying it so I can see whats being consumed I needed something to boost the reading across the shunt resistor and since I have always had bad times with op-amps I decided to go with the MAX4172 which looked like it did away with the need for all the op-amp and related circuitry.

The problem is I just don't understand the math or should I say the equation I should be using to get the result required.

I keep looking at the datasheet but I'm affraid it won't sink in! Especially the Gm part.

Thanks, Al
 
hi Al,

I would use a pot for Rout, say a 100K or 50K, the d/s says up to 200K can be used.

As the output is a current proportional to the load current, you can adjust the pot to give the voltage value you want, within the limits of the supply voltage.

You could then calibrate the pot to give you a 'trip voltage' for your power supply current limiter circuit.

E
 
Last edited:
Hi again Eric,

Sorry mate I should have explained better at first.

I intend reading the output of the 4172 with the ADC of a PIC, well 3 separate lots of them actually.

I have built a current limiter with a 317T that steps up the current in 12 stages with a rotary switch, I then want to read the actual load currentwhich should be less than the 317T output but at least then I could tell exactly what the usage is. The limiter is merely for safeguarding the circuits.

I want to read the current of the 5v 1A fixed supply and use another 4172 to read the current of the variable side of the PSU. I will also be reading the actual voltage of the variable side, but this is within my scope and much easier! All the readings will then be displayed on an LCD screen.

This current part of the job is not easy at all and is almost at the stage when I give it up as a bad job.

I can't figure out why all 3 of my test readings don't give the correct value? As you said my 910mA works out OK but the other readings are not even close. What is wrong here?

Is there a better way to go about this? I don't mind starting afresh so long as I can understand how things work.


Al
 
Post a schematic of the exact circuit you are testing. Otherwise we are just guessing.
 
Post a schematic of the exact circuit you are testing. Otherwise we are just guessing.

Hi mate,

I am using the exact circuit in figure 2 of the datasheet, the only minor difference is that instead of the copper track I am using a 1 ohm power resistor in line with the pos feed from my 5v stabilized supply.

Al
 
Hi mate,

I am using the exact circuit in figure 2 of the datasheet, the only minor difference is that instead of the copper track I am using a 1 ohm power resistor in line with the pos feed from my 5v stabilized supply.

Al

Al,
You cannot have the 1R sense in the 5V regulated output of your power supply, its got to be before the 5Vreg

E.
 
Al,
You cannot have the 1R sense in the 5V regulated output of your power supply, its got to be before the 5Vreg

E.

Hi Eric, But wouldn't that then also measure the losses in the regulator?

I just want to measure the draw of the actual project that I am powering.

Puzzled.

Al
 
Hi Eric, But wouldn't that then also measure the losses in the regulator?

I just want to measure the draw of the actual project that I am powering.

Puzzled.

Al

hi Al,
Consider at 1Amp load current, the 5V will fall to 4V.!

If you are driving the 4172 IC with 5V, the max output from the Out will be 5V-1.2V.!!, even if you choose a higher value resistor

EDIT:
Remember its a current output proportional to the load current
 
Last edited:
hi Al,

If you must measure on the 5Vout , then use a very low value of sense resistor and a higher value of Rout.

But the maximum voltage attainable voltage across Rout will be 5V-1.2V max

E
 
Last edited:
Hi Eric,

I just tested the PSU at 1 amp load and it drops from 4.92v to 4.78v.

I think I see what you mean about the 5v - 1.2v output of the IC and think you mean I should be powering the IC VDD from before the Vreg to get a full scale 5v out? With the actual Rsense of the IC still across the output to measure just the load?

I just still don't get the correlation between the results I got. However hard I try to bend the rules I can't get all 3 of the results to give anything near the right numbers.

What equation should I be using to convert the measured Vout volts into mA. Can you actually try one with the results I got and see if it works for you?

Or should I just use the PICs ADC directly across the shunt and live with the results being less accurate because of the tiny PD between the ends at low current?

PS the 1ohm resistor is the lowest I have that is the aluminium bodied type and short of making a PCB type one as described in the DS I can't go any lower on the Rsense resistance.

Al
 
To make a lower value resistor just connect several 1 ohm resistors in parallel (they don't have to be the high power type), or use a short piece of resistance wire such as nichrome or stainless steel.
 
Or should I just use the PICs ADC directly across the shunt and live with the results being less accurate because of the tiny PD between the ends at low current?

hi Al,
You can buy 0.1R resistors or as been suggested make your own.

Connecting directly into the PIC, IMO is not going to give the results you want.

Give me a little while to mug up on the d/s for that device, its not one I have used before. I will then come back with some ideas.:rolleyes:

Eric
 
Hi Al.

The basics to consider are: -

Gm= 10mA per Vsense ,, the Vsense is the voltage drop across the Rsense at 1Amp in your application.

So using a 0.1R sense resistor at 1Amp maximum load current will give:
Vsense voltage of, Vs= 0.1R * 1Amp = 0.1Vsense

You know that Gm= 10mA per Vsense:
So Iout = 10mA * 0.1Vsense = 1mA.

So with a 1K Rout, the Vout will be 1000R * 1mA = 1Volt


With a
2K, Vout = 2V, for 1Amp load current.
3K, Vout = 3V, for 1Amp load current
For a maximum out of [5Vsupply -1.2V] = 3.8V, the Rout could be 3.8K

Your problem is caused by the 1R sense resistor.
At 1Amp load current the Vsense is 1V,,, so using Iout = 10mA per Vsense gives an Iout of 10mA, which when flowing in a 3.k48 resistor will 'try' to give voltage of 3.48k * 10mA = 34.8V !!!
But the Vout can never be greater than 3.8V.

If you used a Rout= 348R you could get 3.48V

I would recommend a 0.1R sense resistor and a 2.55K Rout resistor [5Kpot] , this should make the scaling in the ADC easier.

Hope this is helpful.

Eric
 
Last edited:
Hi Eric,

Wow mate, you should go into teaching! You have succeeded in getting me to understand the problem mate!

Trying to get to 34v eh! I would have never thought of that. Now I can move forward and hopefully get some readings that make sense. I will somehow make a .1ohm shunt and see if thats ok.

I will let you know shortly if I have succeeded.

Once again thanks for the invaluable help, Al
 
Hi Eric,

Wow mate, you should go into teaching! You have succeeded in getting me to understand the problem mate!

Trying to get to 34v eh! I would have never thought of that. Now I can move forward and hopefully get some readings that make sense. I will somehow make a .1ohm shunt and see if thats ok.

I will let you know shortly if I have succeeded.

Once again thanks for the invaluable help, Al

hi,
The shunt can be a low wattage resistor, say 0.5W or 1W. say 1%
A 0.1R carrying 1Amp will give a drop of .1V, so thats only W= 1A * 0.1V =0.1Watt


EDIT:

Set Rout for 2.442V at 1Amp.
This will give [2.442/5]*1024 = 500 decimal [0x1F4] counts in the ADC regs, do a left shift to give 1000 decimal [0x3e8].

Convert to ASCII for the display as 1000mA


E.
 
Last edited:
Hi Eric, But wouldn't that then also measure the losses in the regulator?

I just want to measure the draw of the actual project that I am powering.

Puzzled.

Al

The problem with using relatively large resistance after the voltage regulator is the voltage loss. At 1 amp, your 1 ohm resistor will cost you 1 volt. Yes, measuring the current before the regulator will add the regulator operating current to the measurement, but that is relatively small.

The ideal point is to measure current at the output, but that will only work if the resistance is small enough to have negligible impact of the output voltage, or it is inside the regulation control loop.
 
Hi again Eric,

I have managed to find a 0.1 ohm resistor and set the Rout to 2.442v at 1A load and again took some measurements which are as follows.

mA V
5.4 0.02
23.8 0.06
41.8 0.10
85.5 0.21
200 0.47
220 0.53
290 0.68
500 1.29
950 2.27
1020 2.47

But I assumed that the output would be more scalar and with the present figures I can't find a common denominator that fits.

Do these figures seem right to you? They are measured on the smallest scale possible on my DMMs and are as accurate as I can get. Do you think that the errors are due to the small consumption at the low end and will I have this level of error when I am using the PIC ADC to display the readings?

Sorry to keep asking questions but I am worried that after all the trouble getting the circuit right that the readings will be off by a significant amount.

Al
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top