When a DC motor starts from rest, it draws a massive burst of current — typically 5 to 10 times the normal running current — lasting for 50–500 milliseconds. This inrush current spike causes voltage dips that reset microcontrollers, degrades motor brushes and windings, strains gears, and shortens the lifespan of motor drivers. In high-current applications (12 V motors at 5+ amps), it can trip fuse protection or trigger battery protection circuits.
A soft start circuit ramps the motor voltage gradually from zero to the target operating voltage, limiting inrush current to a controlled, manageable level. With Arduino PWM, you can implement a fully software-defined soft start that is tunable, repeatable, and free — no additional hardware required beyond what you already have.
1. What Is Inrush Current and Why Does It Matter?
A DC motor winding is an inductor in series with a resistor. At the instant of power application, the inductor has zero back-EMF (motor is stationary) and the inductive reactance is momentarily zero (DC). Current is limited only by the winding’s DC resistance, which is typically very low.
For a typical TT motor with winding resistance R = 8 Ω running at V = 6 V:
- Running current (at 200 RPM, no load): ~150 mA
- Stall current (shaft locked): 6 ÷ 8 = 750 mA
- Inrush current (first 50 ms): can spike to 1–1.5 A due to back-EMF not yet established
For a 12 V, 5 A rated DC gear motor: running current ~2 A, inrush easily 15–25 A for 100–200 ms. This level of current:
- Causes immediate voltage sag on the supply rail, potentially resetting Arduino or other ICs
- Erodes brush contact surfaces, accelerating wear
- Stresses motor driver transistors even in peak-current mode
- Causes mechanical gear shock — particularly damaging to plastic-gearbox motors like TT and BO
- Triggers Li-ion battery pack protection circuits (BMS cuts power, robot dies)
2. Measuring Your Motor’s Inrush Current
Before designing a soft start, quantify what you are dealing with:
Using a Bench Power Supply
Most bench power supplies have a current display with sufficient update rate to show inrush. Set current limit to 5–10 A, apply voltage, and note the peak. The display may not catch the fastest spikes (sub-100ms peaks need an oscilloscope).
Using a Current Sense Resistor + Oscilloscope
This is the most accurate method:
- Insert a 0.1 Ω 5 W sense resistor in series with the motor’s positive lead
- Connect oscilloscope probes across the resistor
- Set timebase to 20–100 ms/div, voltage range to 1 V/div
- Apply power and capture the waveform
- Voltage across 0.1 Ω × 10 = current in amps (e.g., 1.5 V across 0.1 Ω = 15 A peak)
Rule of Thumb Estimation
If you cannot measure: assume inrush = 10× the rated running current. Design your soft start to limit current to 1.5–2× rated running current during startup.
3. Arduino PWM Soft Start — Basic Implementation
The simplest soft start: instead of writing analogWrite(pin, 255) immediately, ramp from 0 to the target duty cycle over a controlled time period.
// Basic Linear Soft Start for DC Motor via L298N
// ENA = D9 (PWM), IN1 = D7, IN2 = D8
const int PWM_PIN = 9;
const int IN1_PIN = 7;
const int IN2_PIN = 8;
const int TARGET_PWM = 200; // Target speed (0–255)
const int RAMP_STEPS = 50; // Number of steps in ramp
const int RAMP_DELAY_MS = 10; // Delay between steps (ms)
// Total ramp time = RAMP_STEPS * RAMP_DELAY_MS = 500 ms
void motorSoftStart(int targetPWM) {
int stepSize = targetPWM / RAMP_STEPS;
for (int pwm = 0; pwm <= targetPWM; pwm += stepSize) {
analogWrite(PWM_PIN, pwm);
delay(RAMP_DELAY_MS);
}
analogWrite(PWM_PIN, targetPWM); // Ensure we reach exactly target
}
void motorStop() {
analogWrite(PWM_PIN, 0);
}
void setup() {
pinMode(PWM_PIN, OUTPUT);
pinMode(IN1_PIN, OUTPUT);
pinMode(IN2_PIN, OUTPUT);
digitalWrite(IN1_PIN, HIGH); // Forward direction
digitalWrite(IN2_PIN, LOW);
analogWrite(PWM_PIN, 0); // Start stopped
}
void loop() {
motorSoftStart(TARGET_PWM); // Ramp up
delay(3000); // Run for 3 seconds
motorStop(); // Stop
delay(2000); // Wait 2 seconds
}
This basic implementation ramps from PWM=0 to PWM=200 over 50 steps × 10 ms = 500 ms total. The inrush current is reduced from a single spike to a gradual ramp. For most TT and BO motor applications this is sufficient.
4. Ramp Profiles: Linear, Exponential, S-Curve
A linear ramp is simple but not always optimal. DC motors have non-linear speed-torque characteristics, and a linear PWM ramp does not produce a linear current ramp.
Linear Ramp
PWM increases by a fixed amount each step. Current ramp is approximately linear during the early phase when back-EMF is low, but flattens as the motor approaches running speed. Good for most applications.
Exponential Ramp
Start fast (large PWM steps) then slow down as you approach target. Useful for motors with high static friction that need a decisive kick to start moving:
void motorSoftStartExp(int targetPWM) {
for (int i = 0; i <= 100; i++) {
// Exponential: pwm = target * (e^(i/100) - 1) / (e - 1)
float factor = (exp(i / 100.0) - 1.0) / (exp(1.0) - 1.0);
int pwm = (int)(targetPWM * factor);
analogWrite(PWM_PIN, pwm);
delay(5); // 500 ms total
}
analogWrite(PWM_PIN, targetPWM);
}
S-Curve (Trapezoidal) Ramp
The most mechanically gentle option: slow start, fast middle, slow end. Minimises mechanical shock at both start and end of ramp. Ideal for robots with precision mechanical systems or fragile payloads:
void motorSoftStartSCurve(int targetPWM) {
for (int i = 0; i <= 100; i++) {
// Smooth S-curve using cosine interpolation
float factor = (1.0 - cos(i * PI / 100.0)) / 2.0;
int pwm = (int)(targetPWM * factor);
analogWrite(PWM_PIN, pwm);
delay(5); // 500 ms total
}
analogWrite(PWM_PIN, targetPWM);
}
25GA-370 12V 12RPM DC Reducer Gear Motor
The 25GA-370 at 12 V has significant inrush current — this is exactly the type of motor that benefits most from PWM soft start to protect your driver and extend motor life.
5. Hardware Soft Start with RC + MOSFET
For applications where the microcontroller is not involved in motor startup (e.g., a motor controlled by a simple toggle switch), a hardware RC soft start circuit achieves the same inrush limiting without code.
Basic RC Soft Start Circuit
The concept: charge a capacitor through a resistor, and use the capacitor voltage to drive the gate of a power MOSFET. The motor sees the slowly rising gate voltage as a gradually increasing PWM-equivalent duty, limiting inrush.
V+ ──────┬────── Motor+ ────── Motor ────── Motor-
│
[Gate Resistor 10kΩ]
│
[MOSFET Gate] ──────[Cap 100µF]──── GND
[MOSFET Drain] ──── Motor-
[MOSFET Source] ─── GND
The time constant τ = R × C. With R = 10 kΩ and C = 100 µF: τ = 1 second. The MOSFET gate reaches full enhancement voltage (VGS_th typically 2–4 V for logic-level MOSFETs) at approximately 1–2× τ after power-on — giving a 1–2 second soft start. Adjust R and C to change the ramp rate.
Limitations of Hardware RC Soft Start
- The ramp time is fixed at design time — not adjustable in software
- The MOSFET operates in its linear (active) region during startup — dissipating power as heat (V_GS × I_D). A heatsink is essential
- Does not limit peak current precisely — only slows the rise time
- For very high-current motors (20+ A), the MOSFET needs to be very robust (RDS_on × I² heat)
6. MOSFET Selection for High-Current Soft Start
For direct MOSFET switching of DC motors (bypassing a driver IC), select the MOSFET based on:
| Parameter | Requirement | Example (12V, 5A motor) |
|---|---|---|
| V_DS (drain-source breakdown) | > 2× supply voltage | > 24 V (choose 30–60 V) |
| I_D (continuous drain current) | > 3× stall current | > 50 A continuous |
| R_DS(on) | As low as possible | < 10 mΩ preferred |
| V_GS(th) (gate threshold) | < 5 V for logic-level drive | 2–4 V (logic-level MOSFET) |
| Package | TO-220 for heatsink, D2PAK for PCB | TO-220 with aluminium heatsink |
Good choices widely available in India: IRLZ44N (55 V, 47 A, 2.3 Ω, logic-level), STP60NF06 (60 V, 60 A), IRF3205 (55 V, 110 A, very low R_DS_on — excellent for high-current loads).
Ebike 500W 24V DC 2500 RPM Motor (MY1020)
At 500 W and 24 V, this e-bike motor draws over 20 A at stall — a perfect example of why hardware soft start or a high-current ESC with soft start is mandatory to protect the system.
7. Protection Circuits: Fuses, Crowbar, Current Limiting
Fuse Selection
Even with soft start, always fuse your motor circuit. A slow-blow fuse rated at 1.5–2× the motor’s rated running current protects against sustained overcurrent without nuisance tripping during the (now softened) startup transient. Fast-blow fuses are not suitable for motor circuits — they will blow every time even with soft start.
Resettable PTC Fuse (Polyfuse)
Polyfuses (e.g., MF-R300) automatically reset after cooling. They are ideal for robotics projects where you cannot easily access a fuse holder. Select a PTC with a hold current slightly above running current and trip current at 2–3× running current.
Software Current Limiting
If you have a current sense resistor and ADC, implement firmware overcurrent protection:
const float SENSE_RESISTOR = 0.1; // 0.1 Ohm sense resistor
const float MAX_CURRENT_A = 3.0; // Cut power above 3A
const int SENSE_PIN = A0;
void checkCurrent() {
float voltage = analogRead(SENSE_PIN) * (5.0 / 1023.0);
float current = voltage / SENSE_RESISTOR;
if (current > MAX_CURRENT_A) {
analogWrite(PWM_PIN, 0); // Cut motor power
Serial.println("OVERCURRENT: motor stopped");
}
}
8. Practical Application Examples
4WD Robot with TT Motors
Run all four TT motors through an L298N-pair. Implement soft start before each motion command. Use a 500 ms linear ramp (PWM 0→target). The driver and the 3S LiPo will thank you — no more voltage sag causing Arduino resets at startup.
12 V Conveyor Gear Motor
A 25GA-370 type gear motor driving a small conveyor belt should use both a hardware capacitor bank (3× 1000 µF on the supply rail) to buffer the inrush spike, and a software PWM ramp over 1–2 seconds for smooth belt acceleration.
Linear Actuator
Linear actuators benefit enormously from soft start — mechanical play (backlash) in the gearbox causes violent jerking if full voltage is applied suddenly. A 1–2 second S-curve ramp eliminates this jerk and extends the actuator’s service life significantly.
DC12V 500MM 2000N Electric Linear Actuator
High-force linear actuators experience severe inrush current at startup. Adding a soft start ramp circuit or PWM ramp via Arduino dramatically reduces gear shock and extends actuator life.
9. Advanced: Current-Feedback Soft Start
The most robust soft start technique doesn’t use a fixed time ramp — it maintains constant current throughout the startup phase using current feedback:
// Current-controlled soft start
// Sense resistor 0.1Ω on A0, motor on D9 via PWM
const float SENSE_OHM = 0.1;
const float TARGET_INRUSH_A = 1.5; // Limit startup current to 1.5A
const float TARGET_RUN_A = 0.5; // Normal running current
const float FINAL_PWM = 200; // Target duty cycle
float readCurrent() {
return (analogRead(A0) * 5.0 / 1023.0) / SENSE_OHM;
}
void currentControlledSoftStart() {
int pwm = 0;
unsigned long startTime = millis();
while (pwm < FINAL_PWM) {
float current = readCurrent();
if (current 5000) break; // Timeout safety
}
}
This approach automatically adapts to different load conditions and motor characteristics. Under light load, the ramp completes quickly. Under heavy load (high friction, slope), the ramp slows automatically to keep current within the limit. This is the industry-standard approach in commercial soft starters.
Frequently Asked Questions
Is soft start necessary for small BO or N20 motors?
For small motors with stall currents under 500 mA, soft start is not critical for motor longevity. However, it still prevents the voltage sag that can reset your Arduino or ESP32 microcontroller at startup, which is reason enough to implement it.
How long should my soft start ramp be?
For most robotics applications: 200–500 ms is adequate. For applications with heavy mechanical loads or precision gearboxes: 500 ms–2 seconds. For large industrial motors (beyond hobbyist scope): several seconds to minutes. Too long a ramp causes the motor to linger in the stall-current zone, which is also harmful.
Can I implement soft start with a BLDC motor?
Yes, but BLDC motors use an ESC (Electronic Speed Controller) which already implements its own startup sequence. The ESC typically has a configurable “timing” or “startup” setting. Adjust the ESC’s slow start setting rather than implementing external soft start.
Does soft start affect maximum motor speed?
No. Soft start only affects the ramp-up phase. Once the motor reaches the target PWM, it operates identically to direct start. The final duty cycle and hence the maximum speed is unchanged.
Will soft start fix my motor driver brownout problem?
Soft start significantly reduces the startup current spike. Additionally, add a 470–1000 µF electrolytic capacitor directly across the motor driver’s power supply pins. This combination eliminates the voltage sag that causes brownout resets in nearly all hobbyist motor driver setups.
Can I implement soft stop (braking ramp) similarly?
Yes. Instead of ramping UP, ramp DOWN from the running PWM to zero. This prevents sudden deceleration that causes flyback spikes and mechanical gear shock. For many applications, a smooth stop is as important as a smooth start.
Conclusion
Inrush current is a hidden destroyer of motors, motor drivers, and batteries in robotics projects. A software PWM ramp on Arduino — just a for-loop with delays — is all it takes to reduce inrush current by 80–90% and extend the life of every component in your drive system.
For higher-power applications, combine the software ramp with a hardware capacitor bank on the supply rail, a properly selected MOSFET or driver IC, and appropriate fusing. For the most robust solution, implement current-feedback soft start that adapts dynamically to load conditions.
The effort is minimal — 10 lines of code or a handful of passive components — but the reliability improvement is substantial. Every serious robotics project should implement soft start as a standard practice.
Shop motors, drivers, and actuators at Zbotic: We stock gear motors, linear actuators, motor driver modules, and stepper motors for all your robotics and automation projects. Browse zbotic.in/product-category/motors-drivers-pumps-actuators/ for fast delivery across India.
Add comment