Power supply for DC motors - Page 1
Forum section: electronics / projects

author: dmta
author_rank: Newbie
timestamp: August 24, 2013, 05:41:35 am
content: Hi all,I need a variable power supply to control 2 H bridges which drive 2 DC motors. The max output current and voltage is 5A and 20V respectively. I have designed the following circuit based on Dave Jones's lab supply where the output voltage and current is set by filtered PWM signals.What can I do to improve the stability and quality on this design? Can someone recommend a better power transistor for this as I find it a little hard to choose one. Your input will be most valuable.Regards

author: Kremmen
author_rank: Super Contributor
timestamp: August 24, 2013, 11:45:10 am
content: So you are building a linear regulator to supply the H-bridge, the voltage determining the speed of the motor? If so, you should know that that is not how it is usually done. Your circuit is more reminiscent of a lab powers supply than a motor feeder.Firstly, a motor does not specifically benefit from carefully regulated supply voltage. Also, current (torque) limiting is usually not done the way it is done in a lab PSU.Instead, it is the H-bridge itself doing these things. The average voltage of the bridge output will determine motor speed. This is "easily" achieved by pwm control of the bridge switch elements. Almost any old frequency will work that is high enough to avoid excessive torque oscillation. There are of course other considerations.Current limiting is easiest done to sense the low side combined bridge current and limit the peak value to something reasonable. This function is normally associated with the pwm control soi that it interrupts an on-phase at current limit.Why do it like this? The reason is simple - a switchmode H-bridge can easily control power levels that are far beyond anything a linear supply can reasonably do.Of course if your motor is a midget of a few watts then all of the above means less and linear solutions work as well.As to the original question, no immediate problems jump up. The main pass elemnent is a dual NPN so no unwanted poles appear in the transfer function and the source impedance should be low enough. You might want to introduce placeholders for components to control the loop gain vs frequency in the feedback path. A place for a resistor+cap in series, parallel to R8 is what i am thinking. Also possibly a place for a roll-off cap in parallel with R6.You might want to move the sense resistor (R5) to the load side of Q5/R8 junction to further lower the source impedance.You now have the current sense signal filtered by two RC filters, both with 1m time constants. That looks a bit slow to me. You might want to consider the values (you don't want to make feedback overly slow, that only kills the loop dynamics and can in fact lead to oscillation). But the stability needs a proper test to see what the real life margin turns out to be.

author: dmta
author_rank: Newbie
timestamp: August 24, 2013, 05:08:41 pm
content: Thank you very much for your reply !!!!!!!!!!!!!As for your initial question the speed of the motor will be controlled by the PWM signals that are input to the H bridge. The regulator is just to provide a stable power supply and max current threshold as I plan to use this to power different motors with different power ratings.I have some more questions...It is quite interesting how you described the stability of the circuit using poles, loop gain and such. Can you please briefly tell me how you came to that conclusion? I am really interested in how people go about building these analog circuits and the thinking process behind it.The series resistor capacitor in parallel with R8, I assume it is to reduce the gain of the opamp when it tries to oscillate. About choosing values for these components (parallel to R8, R6), is it a trial and error method or is there some way to narrow it down to a certain range?The filtering of the current sense output is because I just want to read an average current from my ADC. I can put the input to the comparator as the output of the current sense amplifier without any filtering. Will this be better or should I have some kind of filtering?Can I use a single N-MOSFET in place of the two transistors?Regards

author: RossK
author_rank: Contributor
timestamp: August 24, 2013, 06:38:05 pm
content: I second the need for the resistor+cap parallel to R8 - this will let you control oscillations that may crop up. form my experience a safe starting value for C is 0.1uF, IIRC aiming for about 1.2khz in the RC filter is a good starting point (i may be wrong as i'm feeling a bit lazy to go digging through my notes right now).Consider using a PTC as an alternative to active current regulation. If you dont need to torque limit your motors then a PTC could serve as overload / mechanical stall protection to keep your motors safe and allow the removal of the complexity and cost of the current limit controls.I have built a linear speed controller for BDC motors at 14v - I found that my 2 stage filter network functioned well with 10nF caps with 10K resistors (my OA has a GBWP of 21Mhz). My PWM source is 1000 steps at 120kHz (120MHz driver). In my configuration i'm using the opamp to directly drive paralleled P-ch MOSFET's which are mounted to an adequate heatsink (N-ch wont work without a charge pump or a supply that's 4 to 10 volts over the target max output voltage). I'm using the P-ch MOSFET STP80PF55 with balancing/current limiting resistors on each gate in my linear supply - but this is a different circuit.H-bridge Tip: place PTC's in the path between your high and low sides (HS -> motor -> ptc -> LS), this will save your bridge fets in the event of high power shoot through events which (more than likely) may occur during development

author: Kremmen
author_rank: Super Contributor
timestamp: August 24, 2013, 08:24:55 pm
content: Quote from: dmta on August 24, 2013, 05:08:41 pmOK, fair enough.QuoteSystem dynamics, including stability is one subject matter of control theoryhttp://en.wikipedia.org/wiki/Control_theory. Stability analysis is an important subtopic and it is often (but not always) done by analyzing the root loci of the so called system characteristic equation. Often in practice it is very hard to obtain the actual equation and then system response to stimuli, especially step inputs can serve similar purpose.Nearly all real life feedback systems are capable of oscillation if the loop amplification and signal phase lag create a positive feedback. This condition causes the system to either oscillate or latch to one extreme of the signal range.For linear time-invariant (LTI) systems of which your circuit is one, there are well established criteria for stabilityhttp://en.wikipedia.org/wiki/Exponential_stability. The most easily understood criterion is that a feedback system is stable when the loop gain falls below 0 dB before the signal phase lag has reached 180 degrees.Another way of putting it is that when Laplace-transformed, the poleshttp://en.wikipedia.org/wiki/Pole_(complex_analysis)of the characteristic equation must lie in the left half-plane of the complex Laplace space. The negative real value of the pole coordinates guarantees a damping oscillation (the frequency is defined by the complex part).As i said above, exact mathematical analysis can be approximated by observing the response of the system to test stimuli. Step variations of the setpoint are typically used to observe the response, and thus stability and dynamics of a control system.This is a far too large topic to cover in any meaningful way in a forum message but as to circuits, they are basically just a collection of elements with transfer functions.QuoteThe empirical way would be to measure loop response and based on that decide whether to adjust the gain at some frequencies. The suggested RC addition will introduce a pole determined by the amp input resistance and the cap value, and a zero at the RC defined frequency. That will create a slope in the gain vs frequency as well as lag the phase (e.g. Bode plot analysis will tell you where and how much). There are no standard values, what to use and if to use anything must be determined case by case because it is completely dependent on the rest of the circuit.QuoteIf the signal is not in a control feedback loop then filtering will not have any effect on stability. You can use whatever values fulfill other criteria you set.QuoteN-FET would work OK but for one detail. Since a FET is voltage controlled such that to open the channel Vgs needs to be typically several volts. That means you cannot get the output to rise very close to the input voltage because you run out of headroom for the gate voltage. This is exactly the reason why bridge controllers driving N-FETs on both high and low sides have a charge pump to raise the high-side switch gate voltage above the supply rail. You would have to do likewise, thus complicating the circuit. Also, N-FET dynamics is likely to be somewhat different from a BJT due to the necessary difference in the driver stage. Not necessarily worse, but different.