Problem in sensing current using lm324

Thread Starter

Tomorrowbit

Joined May 7, 2017
6
Hello friends,
I m developing a smps based battery charger.I m facing problem in measuring current.I m trying to achieve it many ways and been a bit succeasfull too but I m not getting what is best and generaly adopted.
I m using a .01 ohm 5 watt resistance in series with the load followed by a opamp lm324.I have tried simple non inverting amplifier and also a instrumentation amplifier using the same opamp.the output of opamp is connected to adc of msp430 which is asembled with 3 digit 7 segment display.In this arrangement the output is sampled through adc and the adc value is displayed on the 7 segment display.I m getting the required gain and everything but there is a problem in both the cases.The reading I m getting is quite fluctuating and thats too with a big range,
The gain is aparent and the values on the display are also in accordance with the current .as soon as i increase the current by raising voltage using dimmer in the input current rises and hence the value on the display.but the fluctuation are not going out .
The system is an implementation of half bridge running at a frequency of 50k using sg3525 .after smps transformer the high frequency ac is converted to dc using ultrafast rectifier.which is then filtered using an inductor in series with the load and a capacitor in parallel with the load.the system is completely isolated.the controlcircuitry runs from the load which is a set of four 12 v battery connected in series.the design is not new but a fairly common.but i m not getting the fluctuation out of my system.
Anybudy who has worked on such current sensing system please share their experience .
If somebudy could share some other current sensing circuit using opamps.,that wouldnr be great.
Should i average the adc values in d software and get the required result,is it the right way,is it the right way to do it,i dont kNow.
Friends please share your knowledge.
I dont belong to a company but trying to develop a bit in my small lab with almost no resources.please give me faith.
 

ronv

Joined Nov 12, 2008
3,770
Hello friends,
I m developing a smps based battery charger.I m facing problem in measuring current.I m trying to achieve it many ways and been a bit succeasfull too but I m not getting what is best and generaly adopted.
I m using a .01 ohm 5 watt resistance in series with the load followed by a opamp lm324.I have tried simple non inverting amplifier and also a instrumentation amplifier using the same opamp.the output of opamp is connected to adc of msp430 which is asembled with 3 digit 7 segment display.In this arrangement the output is sampled through adc and the adc value is displayed on the 7 segment display.I m getting the required gain and everything but there is a problem in both the cases.The reading I m getting is quite fluctuating and thats too with a big range,
The gain is aparent and the values on the display are also in accordance with the current .as soon as i increase the current by raising voltage using dimmer in the input current rises and hence the value on the display.but the fluctuation are not going out .
The system is an implementation of half bridge running at a frequency of 50k using sg3525 .after smps transformer the high frequency ac is converted to dc using ultrafast rectifier.which is then filtered using an inductor in series with the load and a capacitor in parallel with the load.the system is completely isolated.the controlcircuitry runs from the load which is a set of four 12 v battery connected in series.the design is not new but a fairly common.but i m not getting the fluctuation out of my system.
Anybudy who has worked on such current sensing system please share their experience .
If somebudy could share some other current sensing circuit using opamps.,that wouldnr be great.
Should i average the adc values in d software and get the required result,is it the right way,is it the right way to do it,i dont kNow.
Friends please share your knowledge.
I dont belong to a company but trying to develop a bit in my small lab with almost no resources.please give me faith.
A schematic would be useful as would the current range you are expecting.
It's easy to have a ground problem with high power circuits and low amplitudes.
I think I know what your circuit looks like, so make sure the - on the op amp connects to the bottom of the sense resistor. You could also roll off the frequency response a little.
 

Thread Starter

Tomorrowbit

Joined May 7, 2017
6
The schematic is not ready at hand .
The input voltage range is 160-260volt ac
The output range is 36-58 voltage dc.
Operating frequency is 50k.
Current range is 0-10ampere.
Adc reference 1.5 internal.
Adc resolution 10 bit. i.e. 1024 values.i.e.100 values per ampere.
Reading observations..
For 1 ampere values are 0-60
For 2 ampere0-150.
For 3 ampere 0-250.
A multimeter has been placed in the path
So as to monitor current.
There should be 100 adc values per ampere of current this way for 1 ampere there should be value around100 but its not crossing 50/60 ,this could be understand as because of opamp offset .
The values seems are in acordance to everything but the fluctuation.
The system is tested with two amplifiers and the fluctuation troubles the same way.
Smps transformer has centertaped secondary .the secondary is completely isolated from primary and coupled through a high voltage ceramic cap.
The centertapping is made ground after rectification .i believe the fluctuation is because of ground shaking because of load as the measurement is made reference to that,ground is floating and coupled to primary ground using a cap.

What do we do in such situation.
Or how would you design such current sensing system.please guide
 

Dodgydave

Joined Jun 22, 2012
11,307
You can't monitor current in series on a smps, you have to monitor the current in the transformer, all Atx psus work this way, it's more accurate and stable. If you post your circuit you will get better answers.

If you want to go with the series resistor try using a Differential amplifier using the Lm324. Gain is set by R2/R1 X R4/R3

DiffAmp01.gif
 
Last edited:

dendad

Joined Feb 20, 2016
4,481
Have a look at the ACS712 and it's family.
These are available on Ebay as well as electronic suppliers. They are Hall effect sensors and can be used for +/- reading or just one way, depending on the type. The sense part is electrically isolated from the output and the sensor runs on 5V, giving an analog output dependent on the current. Ebay search for "Current Sensor" will show you a stack of them.
 
Last edited:

Thread Starter

Tomorrowbit

Joined May 7, 2017
6
You can't monitor current in series on a smps, you have to monitor the current in the transformer, all Atx psus work this way, it's more accurate and stable. If you post your circuit you will get better answers.

If you want to go with the series resistor try using a Differential amplifier using the Lm324. Gain is set by R2/R1 X R4/R3

View attachment 127401
Sir,Your reply is closest to my problem.
I m using same amplifier,and have also a better version a classic IA .everything is working but the fluctuation is the trouble.
Sir you said we get to Monitor current in transformer.
Could you please explain how or you mean current transformer ?
Thanks,
Regards,
Satish agarwal
 

Dodgydave

Joined Jun 22, 2012
11,307
Sir,Your reply is clos2664176 my problem.
I m using same amplifier,and have also a better version a classic IA .everything is working but the fluctuation is the trouble.
Sir you said we get to Monitor current in transformer.
Could you please explain how or you mean current transformer ?
Thanks,
Regards,
Satish agarwal
You will need an Hall effect current transformer to sense current in DC

http://uk.farnell.com/lem/hlsr-10-p-sp1/current-sensor-10a-voltage-o-p/dp/2664176

The fluctuation is probably pick up from the psu supply, how are you powering the op amp from a separate supply? or the same, ideally post your circuit.
 

dendad

Joined Feb 20, 2016
4,481
Did you look at the Alegro Hall sensors?
See this Youtube video to see what I'm talking about. It is a pretty good explanation of them.
These chips are pretty neat.
It does show you that magnetic field will disturb the reading, and the one he is using is bidirectional.
There are unidirectional versions too.
I have built boards that use dropping resistors and dedicated current monitor chips,
https://www.ti.com/lsds/ti/amplifie...ers/current-sense-analog-output-products.page
but would probably go for these hall sensors now as they are easy to use.
Here is a link to the manufacturer that shows you the range...
http://www.allegromicro.com/en/Prod...ifty-Amp-Integrated-Conductor-Sensor-ICs.aspx
Both bi-directional and uni-directional, 0 to 50Amps.
These are used in automotive systems, solar power and battery chargers.
I do encourage you all to have a look at them.
Note: I have no affiliation with the manufacturer at all, but am just very pleased to have "discovered" them. A very handy fix for a sometimes difficult problem!
 
Last edited:

Thread Starter

Tomorrowbit

Joined May 7, 2017
6
People I have known of these alegro hall effect sensors.but the question here is that has anybody used it in any smps application successfully.I have done current sensing successfully earlier so many time but not in smps.this time it is troubling there is definately some catch there.
Anybody who has worked on smps if could throw some light .or share their schematic with a real experience.
Anyway people here are very helpful and empowering.I m happy to be here.
Thanks,
 

Dodgydave

Joined Jun 22, 2012
11,307
People I have known of these alegro hall effect sensors.but the question here is that has anybody used it in any smps application successfully.I have done current sensing successfully earlier so many time but not in smps.this time it is troubling there is definately some catch there.
Anybody who has worked on smps if could throw some light .or share their schematic with a real experience.
Anyway people here are very helpful and empowering.I m happy to be here.
Thanks,
Here is an example of current sensing in an Atx psu, as you can see it monitors the primary winding current using a current transformer, and rectifys it to produce a voltage fed to a comparator to shutdown the chip....

s_atx01j.png
 

Ehsanito

Joined Dec 19, 2017
1
You can't monitor current in series on a smps, you have to monitor the current in the transformer, all Atx psus work this way, it's more accurate and stable. If you post your circuit you will get better answers.

If you want to go with the series resistor try using a Differential amplifier using the Lm324. Gain is set by R2/R1 X R4/R3

View attachment 127401
Hi DodgyDave,
The circuit you posted doesn't seem to work. The output voltage is constant and the changes in the current usage of the circuit doesn't change the output voltage.
Could you please help me find out what's wrong?
 
Top