DC Motor soft start PWM with high current, should I parallel a capacitor? - Page 1
Forum section: electronics / projects

author: GiovanniG
author_rank: Newbie
timestamp: February 21, 2023, 10:54:17 pm
content: Hi mates, I'm projectng a board for driving a high current 12V motor, that may load 80A at full charge, but I suppose I won't go over 30A. I'll use some mosfet in parallel, properly driven by a totem pole 12V buffer with +-300mA current sustain, I'm pretty sure they will work cold.Reading around about best PWM frequency, they recomended to work around 8-10KHz, do you share it?Now, my dubt is, is it better to insert a proper capacitor in paralel with inductive load (motor) to reduce the negative reverse peaks and let the internal discharge diode work less? I suppose a capacitor that compensate the high inductance generated by high current will be useful, but I want to avoid chose a cap that triggers resonance and create problems, someone may please suggest an opportune value?I know that the capacitor's energy release won't me drive motor at very few duty cycle, but I don't mind, I don't need to go under 40% of max speed. Also the capacitance may have less effects depending on the duty cycle, but I hope I can chose an average value.I was thinking about 2-3 pieces polyester 3,3uF 100v, maybe too few?Thanks

author: moffy
author_rank: Super Contributor
timestamp: February 22, 2023, 01:37:44 am
content: The 10kHz should be fine, but it depends upon the motor i.e. eddy current losses primarily. Placing capacitors across the motor will increase your surge currents on the edges of the PWM dramatically, if you want to reduce spikes use ultra fast diodes for clamping, good grounding, and maybe RC snubbers if really necessary.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 22, 2023, 02:02:16 am
content: NO. When the inverter switches, it has to suddenly charge the capacitor, dissipating HUGE peak currents.Indeed it's better with more inductance. Motors are typically in the ~mH, so you're usually in a good place to run it directly. But you are then putting switching noise into the motor, and thus its case, so it can be an EMC issue. Preferably, the leads should be shielded, grounded to the motor casing and inverter ground, or the inverter should have an LC filter internally.10kHz is probably fine; as mentioned, it does depend on the motor. If you can find the datasheet / parameters (winding resistance, inductance, motor factor, inertia) you can design everything as an equivalent linear circuit.DO add current mode control! You can connect a Hall effect current sensor for example in series with the motor winding (preferably the non-switched lead, to keep noise away from the sensor), and run a feedback loop to set PWM based on instantaneous motor current and a setpoint. This gets you a constant-torque response, with torque never more than the input setting. Then run that inside a second loop to control voltage or RPM or whatever else you like -- it seems like more effort at first but trust me it's far superior overall. The most obvious advantage is, current is never more than the setpoint, so you havecompletely, fully eliminated one possible failure mode of the system(inverter overcurrent). That'sbig.Tim

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2023, 08:57:14 am
content: As mentioned above: NO DO NOT PUT A CAPACITOR ON THE OUTPUT of the PWM drive. Either the capacitor or drive will fail, as massive currents go into that capacitor, when the output switches on.Remember capacitors have a low impedance to high frequencies and the edge of every pulse theoretically has an infinite frequency component, so there will be nothing to limit the current. An inductor is a good idea, as this will reduce the rate of change of output voltage on the wires to the motor, thus reducing noise. If an inductor is used, then a small capacitor (no bigger than 100nF) can be placed in parallel with the motor for RFI suppression.

author: GiovanniG
author_rank: Newbie
timestamp: February 22, 2023, 11:42:27 am
content: Thank you mates, I really feel in the right placeI'll keep all your suggestions, and I?ll proceed in this way:I'll place an NE555 (used only for translate TTL to 12V/totem pole with 300mA) next to the gates (connected by a 22 ohm resistor each) of mosfets (TO220F) mounted in paralel, fixed on a radiator grounded, I'lll use also a pair of shotty high power diodes (with lower vf than mosfets) to kill the negative spikes. The NE555 is driven by a photocupler, the processor with buttons will be placed 5 meters away, the + and ground main 12V power will be filtered by a double coil (classic EMI filter), then reduced to 5V, the +5V and the fake ground will be sent to precessor, with the PWM photodiode control wire, relay activation signal, and both contats of the Hall sensor, by an UTP cable. (a fuse will be added to protect wire in case of failure). This should be enough to keep processor away from interferences. The relay's colis will be power by the filtered 12V, these small relays will drive the 80A ones by the main 12VI'll use 2 relays 80A for switch the direction, and another one as a general protection in case a mosfet goes faulty. Hall senseo on positive motor's wire (while PWM drives negative). All this placed/fixed on the motor body, on an internal shielded box, grounded to the 0V of Pb 12V battery and earth of local 220v (there is a battery charger always connected, battery will help me power the motor with enough curret, it will work only 10 times a day, no worried about discharge). The battery will be protected by a classic DIN automatic thermic switch of 50A as fuse. A 100nF polyester 1000V in paralel with motors may have senseThe logic is this, set on/off the direction relays, switch on the main protection relay (on +12V) then, as final, activate PWM. This will preserve relay to switch when the load is connected, it will switch only when mosfets are off. The main releay will be eventaully opened if the current exceeds a value or if too much time passed without the load cross the photocells ray. My goal is to use soft on and soft off to slow down the load after crossing the ray, limiting the mechanical stress of hard start/stop and placing load gently on the ground.I still have 2 questions: which duty cycle you suggest me to start with?About the hall sensor, will it give me the average PWM current, no matters which freqency, or how can I calculate it? About you said to control speed by current, which is the algorythm exactly? If a load is strong, the current goes high, and should go high to win the load, chances are, control the rpm to check if a machanical fail occured.. or simply stop everything if current exceed limit for too much time. I suppose I'll use the second way, I've not big loads to win and I sould be just aware of mechanical problemsI

author: Doctorandus_P
author_rank: Super Contributor
timestamp: February 22, 2023, 11:55:17 am
content: Brushed motor controllers have been done a gazillion times. Motor current directly translates to torqe, while motor voltage will result in RPM (after some time constant). Once you have a PWM control, you should always start with a very low duty cycle, and then ramp it up to get to your required rpm and/or torque.A small capacitor (bunch of nF) directly over the motor terminals can help to suppress EMI generated by the motor, but large capacitors have no place in the PWM part, as has been explained earlier.I have made a motor controller with a single MOSfet and a single DPST relay. I designed the software in such a way that the relay only switches when there is no motor current. And this worked for 10+ years until the motor collector wore out (Not the brushes).

author: uer166
author_rank: Super Contributor
timestamp: February 22, 2023, 07:17:33 pm
content: Quote from: GiovanniG on February 22, 2023, 11:42:27 amStart with current control, which is not a fixed duty cycle, and you're set for success. Anything 555-based or fixed duty will blow up 70% of the time.

author: ajb
author_rank: Super Contributor
timestamp: February 22, 2023, 07:45:41 pm
content: So you're using a 555 basically as a gate driver? You may want to reconsider that and use a dedicated gate driver instead. These are available as half-bridge drivers, which often include dead time/shoot-through protection to ensure that you don't accidentally turn the high and low switches on at the same time and crowbar your power supply. That's important with a supply capable of 80A!If you're using a relatively modern MCU, many of those have fairly sophisticated timer peripherals designed to power stages. They allow you to do things like generate two separate waveforms for high- and low-side switches, with programmable dead time. They also may have "fault" logic that will shorten a PWM cycle, or even disable PWM output entirely, based on an IO line or event. This makes it easy to implement overload protection and/or current mode control -- if you have an MCU with analog comparators and a DAC built-in, you can usually feed the DAC to the input of a comparator, feed the current sense signal into the other input of the comparator, and then use the output of the comparator as a fault input to the timer module. The DAC sets the maximum current, and when the instantaneous current exceeds that level the comparator causes the timer to turn the PWM output off until the next cycle--and all this happens with no CPU involvement, so no concerns with software latency, and with no additional external components. Consult the datasheet for your MCU to see if it has these kinds of capabilities.Quote from: GiovanniG on February 22, 2023, 11:42:27 amIt depends on the sensor and how you've incorporated it into the circuit. Every sensor has a limited bandwidth/maximum useful frequency. If your PWM frequency gets too high, the current signal will start to be filtered by the response of the sensor. You don't want that to happen, because you will not be able to regulate the peak current of the motor properly. You can always compute the average current yourself as a separate value in the MCU.QuoteThe algorithm depends on the mechanics of the system and how accurate you need the sped to be. If the load has low inertia, and small errors are acceptable, then a simple proportional algorithm might be fine. If you need better accuracy, or the load has more complicated dynamics, you might need something like PID control. In any case, you need a way to determine the speed of the motor. In some motors this can be determined electronically, but an external sensor (like an encoder, or just a single pulse per revolution) is more straightforward.

author: MathWizard
author_rank: Super Contributor
timestamp: February 25, 2023, 12:31:32 am
content: What about small 12V brushed motors, like a computer fan. If it's not being driven with PWM, (or have internal PWM) is it ok to put a cap in parallel? Doesn't that help for startup current ? I know ODE's better than ever, so time to figure out the motor models again in Ltspice, and put them to use.I'm just remaking a fan controller I made, the brushless fan has it's own internal circuitry, so I have have to feed it 4V for startup, and linearly vary up the voltage with some BJT's according to temperature. IDK how much capacitance to have on the output of my pass transistor, to the fan

author: GiovanniG
author_rank: Newbie
timestamp: February 26, 2023, 10:44:49 am
content: Hi mates, thanks for exaustive answers!The NE555 will be used just as buffer and voltage translator, please don't think I'll use it as PWM generator or whatelse reason, this choice is made just to speedup the work, reduce the electric items on the PCB.I don't need any accuracy and any feedback on torque/rpm, thsi is a lift (with all the safety mechanical precautions) which has to pull up about the same load, there will not be any different events to consider, I need to speed up the software development and do a minimum control for soft start and soft stop, to preserve mechanics from shocks and to lay down the load to the floor gently. The current control is necessary just to fault case, which I consider remote because the installation is fixed and good environment. The controller will continuiosly check it and its watchdog set to minimum, for me this is enough. There is a fuse to open the circuit on over currents >50AI still have questions:- I'll put a capacitor 100nF but which voltage you recomend? 1000V? I would avoid it can "hole" and goes to low impedenceAs I don't need any specific care/regulation of RPM and torque, wha do you suggest me to start with PWM? It has no sense to drive motor with 1%, so probalbly I've to start with 20% and rise fast to 40%, then less faster to 70%, then more slow to 100%, for example, and wthis within 1-2 seconds, what do you think?- How should I read the current sensor? I was thinking to use ACS758, but does it measure the average current if I use PWM 10KHz? Or should I make an average from for example 100 last readings?Thanks@MathWizard your question isn't clear, you should not put capacitor on PWM as it was told, but if it's not driven by PWM it will not have any affect on fan, it will simply slow down a bit slower than before. You will just overload the actuator (the divece which power on it) and this can be dangerous for its life. Don't do it

author: GiovanniG
author_rank: Newbie
timestamp: February 26, 2023, 11:14:22 am
content: Taking abut current, looking sensor responses it looks this device is limiting itself peaks, this is a good news, anyway I need to average it and I prefer use a capacitor, but on specifics the maximum vale is 10nF, is that ok to average it? The processor input resistence will not discharge it too quickly? Shoud I average also by software? I can't trigger the stop if only one value will be out of limit.Also, on datasheet they recomend on output to ground with a resistor not less 4,7kohm, and in this example circuit is not present, should I add it?