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.

Current sensing and conditioning problem

Status
Not open for further replies.

picstudent

New Member
Please I need some advice on this analogue circuit.
The circuit attached is used for sensing current flowing through R9 (1.2Ohm). CH1P_H and CH1P_L are a pair of probes in a specimen which will conduct current and I need to measure it with 1mA resolution. CH1_return and all grounds are shorted to a common ground point. CH1_MOSFET will on the channel via MOSFET Q1. I need a resolution of 1mA. So for each mA flowing through R9 will create x mA*1.2 mV. R6, R7 and R11 forms a voltage divider and will deliver mV to the opamp. Preset R7 is adjusted such that out of the 1.2mV created for every mA through R9, only 1mV reaches the opamp. Then if I measure the output of the buffer U1 it will give the current directly in mA. (If U1 output is 10mV then current through R9 should be 10mA.) CH1_TestPb is the test point to measure this voltage. U2 will amplify this out of U1 (0-500mV)to (0-4.882V).The out put of U2 goes to a PIC with 10 bit ADC and 5V reference. The result when divided by 2 will give current in mA. This is the plan. MCU part is OK. But the signal conditioning section, ie this opamp part seems not perfect. I am not very expert in Analogue circuits.

First of all within your time constraints please advice about any serious wrong design practices in this part.
The main problem I am facing now is the inconsistency in the settings of R7. When I load some 20mA through R9 and adjust R7 to give 20mV at opamp out test point, All is well. Then when I load 200mA the Preset R7 needs re adjustement to get 200mA. So my entire plan fall apart.

Please give suggestions to solve the issue.
Thanks
Roy
 

Attachments

  • currentSense.jpg
    currentSense.jpg
    121 KB · Views: 218
hi,
If I am following your circuit correctly, Q1 CC source is been split into two paths.

One via R9 thru the 'test piece' and the other via R6/R7 and R11, this give a non linear voltage drop across the R7 slider take off point and the voltage follower OP07.

I would suggest you relocate the R7 trim pot , so that it not part of the test signal.
 
Last edited:
Thanks for the response friend.
To chop off the 1.2mV into 1mV where else I can introduce R7?
btw Once the R7 is set to a point, how it will create a non-linear effect? (O' before setting it effects. right?)
Can you suggest a alternative?
Thanks.
 
Thanks for the response friend.
To chop off the 1.2mV into 1mV where else I can introduce R7?
btw Once the R7 is set to a point, how it will create a non-linear effect? (O' before setting it effects. right?)
Can you suggest a alternative?
Thanks.

hi,
Have you checked/tried the circuit in simulation, say LTspice.?? or is an actual built circuit.?
 
Last edited:
I have tried in proteus simulator. Not with MOSFET switching arrangement. Just a current souse and this resistor divider with opamps. There it seems OK.
The preset voltage arrangement fails mainly in the lower current ranges. below 50mA. Above 50ma to 400ma it hold reasonably good.(But not perfect!)

Thanks
 
Last edited:
As far as I understand the problem I am facing is the non-linearity of the opamp gain in the two stages.

First opamp is a buffer - gain 1 and second has a gain of below 10.
For the both opamps, what happens is (in my opinion or understanding) - gain is lower in the extreme low end of the signal. That is when the signal is a few mV only opamp shows low gain and as the voltage goes up gain goes high.
This may be usual and there must be some mechanisms to compensate that.
Please..
 
hi,
Please re-post the circuit as shown in your original post, showing the external connections pathways.
 
Your circuit relies on OpAmpQuiteGND being exactly the same voltage as Ch1_return. It is extremely difficult to ensure that, because of all the currents flowing there.

Can you use a much larger sensing resistor? If you used a 10 ohm resistor, you could just connect the voltage from that straight to the ADC, with no op-amps. Do you need to measure currents up to 0.5 A? If not, you can increase the sensing resistor more, and scale the result in the software. Either way, the larger the sensing resistor, the larger the initial voltage and the less effect small voltages have.

If you have to use a small sensing resistor, you need a differential amplifier circuit that does not rely on the lower end of the sensing resistor being at a particular voltage. Something like https://en.wikipedia.org/wiki/File:Op-Amp_Differential_Amplifier.svg where Rf = Rg and R1 = R2. You can also use the same circuit to amplify, if Rf > R1. You do need to match Rf and Rg, as well as R1 and R2 accurately, so you need precision resistors for that.
 
Your circuit relies on OpAmpQuiteGND being exactly the same voltage as Ch1_return. It is extremely difficult to ensure that, because of all the currents flowing there.
Yes. I am having trouble there. Need to change to differential in the next version. Let me read about that mode and its implementation.
Can you use a much larger sensing resistor? If you used a 10 ohm resistor, you could just connect the voltage from that straight to the ADC, with no op-amps. Do you need to measure currents up to 0.5 A? If not, you can increase the sensing resistor more, and scale the result in the software. Either way, the larger the sensing resistor, the larger the initial voltage and the less effect small voltages have.
I am afraid it is not possible in my case. I am using a 60V power supply to charge the load. Already MOSFET drop and the sense resistor drop is there. If I increase the sense resistor value, voltage across the load will substantially change (reduced).
...You do need to match Rf and Rg, as well as R1 and R2 accurately, so you need precision resistors for that.
1% resistors or you mean any other type?

Thanks
 
hi,
This is the bare bones of your circuit, can you confirm its correct, then I will try some sims.
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    31.9 KB · Views: 144
Thanks. Some slight changes there.R5 is 8.2k and R6 is a trim pot of 1k
Also output is taken from the junction of C1 and R8.

I am using OP07 as the op-amp with +9 and -9 as rails. I tried in Proteus - seems OK
But in hardware gain low in the lower voltage ranges.
Thanks
 
Last edited:
Thanks. Some slight changes there.R5 is 8.2k and R6 is a trim pot of 1k
Also output is taken from the junction of C1 and R8.
Thanks

hi
The R5 and R6 are set to give a gain of 9.78

This sim shows a current sweep of 0m to 500mA.

The Vo is plotted together with Vp*9.78 and the plots overlay perfectly.

Its possible that the non linearity problem is somewhere in your 'layout' rather than the circuit.??
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    35.6 KB · Views: 138
Last edited:
Thanks for the help.
That means neither circuit nor opamp is having a non-linearity issue.
Can you be little more specific about 'layout'.
Is it component placing or Ground paths or positive feed back..?

Anyway thanks a lot for the support.
Regards
 
Thanks for the help.
That means neither circuit nor opamp is having a non-linearity issue.
Can you be little more specific about 'layout'.
Is it component placing or Ground paths or positive feed back..?

Anyway thanks a lot for the support.
Regards

I would check for ground paths that the test current is sharing with the OPA's

EDIT:
If you could post some clear pictures of your pcb, I maybe able to suggest changes
 
Last edited:
Here it is. It is six channels of current measurement.
Thanks
 

Attachments

  • forboard.jpg
    forboard.jpg
    330.1 KB · Views: 150
Here it is. It is six channels of current measurement.
Thanks

hi pic,
Downloaded your image, will look over it.

One more point regarding the shift between 20mA and 200mA.
The 1R2 current sense resistor, whats its power rating and temperature coefficient.?
I dont know how long a period the 200mA is enabled, but have you taken into consideration self heating of the 1R2.???
 
hi pic,
Downloaded your image, will look over it.

.. but have you taken into consideration self heating of the 1R2.???
The current sense is not any special Shunt resistor for that particular purpose.
I have used 5W fusible resistor mounted on the bottom side of the PCB.
Yes, I understand the drift that can be induced due to heating. But that can be tolerated in the application.(At least as for now!). But this change I am experiencing is present even if we test for a few seconds.

Thanks.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top