Pages: 1 [2]   Go Down
Author Topic: Current sensing for buck boost converter  (Read 3372 times)
0 Members and 1 Guest are viewing this topic.
Online Online
Shannon Member
Karma: 216
Posts: 12569
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[ The hall sensor mentioned above is ACS712, not ACH712 BTW. ]

If you have a SMPS like this you have to be really careful to shutdown the switch fast if the current goes too high - or else
use a large inductor (slower switching required, more safety margin for saturation).

If the current rises high enough to saturate the inductor then the inductor then just becomes a short-circuit and the current
will slam up to perhaps 10's of amps in a few microseconds or so and blow the MOSFET before the opamp can respond, and certainly
far faster than analogRead()'s 110us execution time.

You would normally use a fast comparator to monitor for this severe overcurrent condition - sub-microsecond response is
good here.  Once you have that you might as well let it do the regulation too...

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See attached peak detector schematic. R1 is the current sense resistor. (R2 + R3)/R2 defines the op amp gain, and C1 * (R2 + R3) defines the time constant, which should be large compared to 1/f where f is the PWM frequency.

Ok !
So if I want to get the voltage value of Rsense I have to integrate the diode drop voltage  ?

Basically :
Vc1 = Vr1 * gain - Vdrop
Otherwise my Ir1 evaluation will be lowered by a 0,7v factor !

Is that  right ?

No, the circuit is designed (i.e. op amp feedback resistor taken from the cathode of the diode) so that the diode voltage drop does not enter the equation.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi !

I finally read a lot on OPAMP because many values seen on tech-doc were completely unknown for me.

My choice for the op-amp is now Maxim MAX4167, this one is a rail to rail input and output op-amp ! While the input can vary from 0.0165V to 0.33V the rail to rail input aspect is very important. The MAX4167 have a 0.25mV-0.85mV Input Offset Voltage so my input voltage will be correctly processed. The Gain-Bandwith is around 36Mhz (input is 170Khz)

My problem is the op-amp gain. I use a non inverting amplifier so Vout = (1+(R2/R1))Vin
With a digital multimeter (and with arduino ADC), I sense a  ~0.010V voltage. On the opamp output, voltage is "only" ~0.016V... Something is wrong somewhere because i expect somewhat x10 ? I double check R1 & R2 value everything seem to be okay.

What wrong with this ?
I can attach a photo of the breadboard if you need !

Thanks for your help.

* Arduino01.png (10.98 KB, 700x365 - viewed 16 times.)

Pages: 1 [2]   Go Up
Jump to: