Current Limiter Advices - Page 1
Forum section: electronics / projects

author: IuriC
author_rank: Contributor
timestamp: August 06, 2014, 08:45:52 pm
content: 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.

author: Mj12
author_rank: Contributor
timestamp: August 06, 2014, 10:29:42 pm
content: 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 smoothlyIn 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

author: IuriC
author_rank: Contributor
timestamp: August 07, 2014, 03:30:39 am
content: 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) !

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 07, 2014, 11:06:33 am
content: 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

author: dannyf
author_rank: Super Contributor
timestamp: August 07, 2014, 11:12:23 am
content: QuoteLogic trap. To act on the over-current condition, you have to have a current sensors.Where is your current sensor?

author: void_error
author_rank: Frequent Contributor
timestamp: August 07, 2014, 11:21:54 am
content: They don't get much simpler than this. Basic two-transistor current source. R1=VBE Q2/ILIMIT.And yes, I know about the VBEvariation with temperature.

author: dannyf
author_rank: Super Contributor
timestamp: August 07, 2014, 11:39:50 am
content: QuoteUse 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.

author: IuriC
author_rank: Contributor
timestamp: August 08, 2014, 09:13:59 pm
content: 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

author: David Hess
author_rank: Super Contributor
timestamp: August 08, 2014, 09:25:29 pm
content: 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.

author: eneuro
author_rank: Super Contributor
timestamp: August 09, 2014, 06:26:08 pm
content: 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 challengeThis 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 Lawholds and hopefully not too many turns needed to limit huge currents

author: IuriC
author_rank: Contributor
timestamp: August 11, 2014, 01:20:46 pm
content: Quote from: David Hess on August 08, 2014, 09:25:29 pmWould it be really necessary?

author: David Hess
author_rank: Super Contributor
timestamp: August 11, 2014, 02:37:58 pm
content: Quote from: IuriC on August 11, 2014, 01:20:46 pmTest it and find out. I am sure the transient response could be improved this way.

author: IuriC
author_rank: Contributor
timestamp: August 19, 2014, 06:00:57 pm
content: 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.

author: dannyf
author_rank: Super Contributor
timestamp: August 20, 2014, 12:23:19 am
content: 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.

author: IuriC
author_rank: Contributor
timestamp: August 22, 2014, 06:00:08 pm
content: Thank you all!

author: krivx
author_rank: Frequent Contributor
timestamp: August 22, 2014, 07:47:19 pm
content: Quote from: IuriC on August 19, 2014, 06:00:57 pmJust 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.