Author Topic: Current Limiter Advices  (Read 6152 times)

0 Members and 1 Guest are viewing this topic.

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Current Limiter Advices
« on: August 06, 2014, 08:45:52 pm »
Hi,

I'm designing a current limiter as a learning exercise. The goal is to fix the maximum amount of current being drawn by a motor when it is been overloaded.

The motor is 5V DC from an old CD driver.

Can you give me some advices? Maybe I'm falling in a trap in some where.

Thank you.
 

Offline Mj12

  • Newbie
  • Posts: 9
  • Country: fi
Re: Current Limiter Advices
« Reply #1 on: August 06, 2014, 10:29:42 pm »
Your opamp acts as comparator and Q2 acts as switch. So you don't get smooth current control action.
Also when U1 pulls Q2 base down to pass current to the base of Q1 to turn it of. Q2 base is pulled too low and this limits the voltage rise on the base of Q2 and prevents Q2 turning off. adding resistor to the output of U1 might help.

You want to be able to control voltage on the base of Q1 smoothly

In my schematic Q2 and R3 act as current drain that is controlled by opamp this controls the Q1 (my schematic) base voltage smoothly R5 and R6 limit the voltage so that emitter of Q2 does not rise too high and block the current flow. (normally more voltage on the emitter means more current and lower voltage on the collector but if emitter voltage goes too high this relationship reverses) My opamp uses 15v supply so you might have to fiddle with resistor values
 

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Re: Current Limiter Advices
« Reply #2 on: August 07, 2014, 03:30:39 am »
Wow! Thanks a lot!!

I'm gonna take some time to digest it all, have to do some simulations, built it up and I come back to show my results (and my doubts  :P ) !
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Current Limiter Advices
« Reply #3 on: August 07, 2014, 11:06:33 am »
When you verbally say "IF current goes over X, THEN turn off the output", you are implicitly forgetting a lot of obvious things:
1. What happens to current when it turns off?  Goes to zero.  So do we keep evaluating this, and it oscillates at some unimaginable frequency?
2. Should it actually store the state instead?  (IF current goes over X, THEN turn the output off, and keep it off until Y.)  And does that account for the race condition ("IF Y THEN turn the output on" is fine, but what about IF X AND Y)?
3. Or did you actually mean to control this continuously?  One of the most common misunderstandings people use is to attempt to express continuous functions (Y varies with X) in discrete terms (if X then Y).  Even when they know and understand that a system is continuous.
4. And not just continuous voltage / current, but what about continuous time?  Suppose we evaluate this statement periodically: "SET op-amp output = (Vin - Vout) * 1000, limited to +V/0V"  Each sample, the output toggles, because with so much gain, we've just implemented an equivalent process to (1)!  The difference being, now the frequency is known.

It's clear to see that, even in this simple case, something is missing.  Much more gain would be desirable to achieve a precise current limit: but such excessive gain is clearly impossible to use.  Well, suppose we add an integral term: "SET op-amp output equal to its previous value plus the error, limited to +V/0V".  Now the output can change only slowly from sample to sample, yet the amount of gain it has will eventually go to infinity (add up 0.0001 or smaller error, enough times, and you'll always swing from 0V to +V).

This is the basic integrator (the I in "PID") controller.

The output of an integrating feedback loop still need not be stable, because if the load itself takes some time to respond, it's doubled up through the feedback loop, and you can get ringing at a minimum (namely, that the output alternates or 'hunts' to find the correct value, eventually settling down), or full blown oscillation.  By modifying the output expression (Vo = Vo(prev) + ki * error + kp * (error - error(prev)) + ...), so that it's calculated not just from the present inputs, but takes history into account, you get the basic PID controller.

Now we've finally got something theoretically interesting: it's rich enough to be useful -- we've got continuous numbers, not boolean states; time is accounted for, and we even have some means to implement stability.  It's still discrete-time, but this restriction can now be lifted fairly easily, by translating the abstract loop into electronic building blocks.  At last, it is a continuous-value, continuous-time system, and we have a model that's realistic.


Now, going back to your circuit, that obviously means:
1. You don't want a switched output, you need an amplifier.  So, op-amp instead of comparator, and instead of some transistors slapped together, something that's actually linear to help the op-amp do its job.  (Or a beefy enough op-amp could handle the load all its own.  Whichever works best.)
2. That amplifier takes some time to respond*, so we will need to compensate its gain with some approximation of a PID loop, say.

*And this is still a turn of phrase which is physically inconsistent.  It's not as gross an error, because it's much more quantitative: an ideal pole (like a single RC lowpass filter) does implement a time delay under suitable definitions (most often, the 50% rise time point, for a step input).  But it's not an ideal delay, like a transmission line is.  A pole is a frequency cutoff, not a time cutoff.  And by "cut", we don't mean it drops suddenly, either (again, using clunky boolean words to relate to something continuous), it falls quite gradually.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Current Limiter Advices
« Reply #4 on: August 07, 2014, 11:12:23 am »
Quote
Maybe I'm falling in a trap in some where.

Logic trap. To act on the over-current condition, you have to have a current sensors.

Where is your current sensor?
================================
https://dannyelectronics.wordpress.com/
 

Offline void_error

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: ro
  • I can transistor...
Re: Current Limiter Advices
« Reply #5 on: August 07, 2014, 11:21:54 am »
They don't get much simpler than this. Basic two-transistor current source. R1=VBE Q2/ILIMIT.
And yes, I know about the VBE variation with temperature.

« Last Edit: August 07, 2014, 11:24:47 am by void_error »
Trust me, I'm NOT an engineer.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Current Limiter Advices
« Reply #6 on: August 07, 2014, 11:39:50 am »
Quote
Basic two-transistor current source.

Use a tl431+npn (or n-ch if sufficient headroom exists) for better regulation.

PS: you can view tl431 as a npn with infinite gain and 2.5v Vbe.
================================
https://dannyelectronics.wordpress.com/
 

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Re: Current Limiter Advices
« Reply #7 on: August 08, 2014, 09:13:59 pm »
I removed Q2. Now the transient response is way better.

Basically U1 is just acting as an error amplifier, right? I can't see how do I clip the current rising without overrunning the amplifier. (young player in analog stuff)

Can you guys indicate a book about amplifiers?  :-//

Thank you
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: Current Limiter Advices
« Reply #8 on: August 08, 2014, 09:25:29 pm »
Q2 was adding voltage gain to the amplifier which could easily compromise stability.

The AD8606 is pretty fast so I would at least add a resistor in series with the inverting input and then a feedback capacitor (or series RC) from the amplifier output to the amplifier inverting input to adjust the frequency response.
 

Offline eneuro

  • Super Contributor
  • ***
  • Posts: 1528
  • Country: 00
Re: Current Limiter Advices
« Reply #9 on: August 09, 2014, 06:26:08 pm »
Using analog Hall sensor SS495A output (100mV/1A at 5 turns there ) to limit currents either positive or negative at 230VAC  and more depending on insulation used or huge DC currents in this shown below configuration it was interesting challenge  >:D

This small DIP8 it is AVR ATTiny85 while wanted I2C interface to this thing, but it is possible remove it and get direct ADC output from this Hall sensor too.

But what can I say, I need to controll a few kW AC 3 phase inductor motors, so was looking for something that can detect positive and negative currents and galvanic isolation is a must while I do not like mix 230VAC+ power circuits with low voltage controll units and It seams it works fine and as expected.
Ampere's Law holds and hopefully not too many turns needed to limit huge currents  :-/O
12oV4dWZCAia7vXBzQzBF9wAt1U3JWZkpk
“Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine”  - Nikola Tesla
-||-|-
 

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Re: Current Limiter Advices
« Reply #10 on: August 11, 2014, 01:20:46 pm »
Q2 was adding voltage gain to the amplifier which could easily compromise stability.

The AD8606 is pretty fast so I would at least add a resistor in series with the inverting input and then a feedback capacitor (or series RC) from the amplifier output to the amplifier inverting input to adjust the frequency response.

Would it be really necessary?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: Current Limiter Advices
« Reply #11 on: August 11, 2014, 02:37:58 pm »
The AD8606 is pretty fast so I would at least add a resistor in series with the inverting input and then a feedback capacitor (or series RC) from the amplifier output to the amplifier inverting input to adjust the frequency response.

Would it be really necessary?

Test it and find out.  I am sure the transient response could be improved this way.
 

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Re: Current Limiter Advices
« Reply #12 on: August 19, 2014, 06:00:57 pm »
It really got better.

I selected the values ( R6 and C1 ) by simulating.  :-[ Can I ask you a better way to choose those values besides the try & error?

Thank you.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Current Limiter Advices
« Reply #13 on: August 20, 2014, 12:23:19 am »
R6 is fairly arbitrary, other than the input capacitance on that pin and protection vs. over voltage.

R6 and C1 forms a feedback loop (local), but it is hardly shorted by the resistor on the opamp's output. Once R6 is fixed, select C1 for desired frequency response - run an ac analysis in your simulator.

Lower C1 improves the power supply's dynamic response but makes it more prone to oscillation.

You may also want to do a dc analysis to see how the current changes with Vcc - don't be surprised that it doesn't work the way you expected it to.
================================
https://dannyelectronics.wordpress.com/
 

Offline IuriCTopic starter

  • Contributor
  • Posts: 33
  • Country: br
Re: Current Limiter Advices
« Reply #14 on: August 22, 2014, 06:00:08 pm »
Thank you all!
 

Offline krivx

  • Frequent Contributor
  • **
  • Posts: 765
  • Country: ie
Re: Current Limiter Advices
« Reply #15 on: August 22, 2014, 07:47:19 pm »
It really got better.

I selected the values ( R6 and C1 ) by simulating.  :-[ Can I ask you a better way to choose those values besides the try & error?

Thank you.

Just wanted to add that you shouldn't be discouraged by this - simulation is a useful tool and trying out different values can be a useful way to understand what is happening.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf