Controller

Summary

An e-bike controller is the electronic power-control unit that converts battery energy into the precisely timed electrical currents required by the motor. It interprets rider commands, sensor data, assist settings, and system limits to control motor torque, speed, engagement, and protection.

The controller is a major contributor to ride feel, but it is not necessarily the e-bike’s only “brain.” Battery protection, display functions, charging, connectivity, and vehicle-level logic may be divided among the motor controller, battery-management system, display, and other networked modules.

Key Facts

Category: Technology / E-Bike System
Also known as: Motor controller, inverter, electronic speed controller, drive controller
Primary function: Control motor commutation and phase current
Common motor types: Three-phase BLDC and permanent-magnet synchronous motors
Control methods: Six-step commutation, sinusoidal control, field-oriented control
Typical inputs: Torque, cadence, speed, throttle, brake, motor position, current, voltage, and temperature
Typical outputs: Motor phase currents and system-control signals
Locations: Inside a drive unit, battery cradle, frame enclosure, or external controller box
Works with: Motor, battery, BMS, sensors, display, controls, and firmware
Configured through: Factory programming, approved apps, or dealer diagnostic software

Overview

The battery supplies direct-current electricity, but a modern brushless e-bike motor requires controlled current through multiple motor phases. The controller performs this conversion by switching power transistors in a carefully timed sequence.

It determines:

  • When assistance begins
  • How quickly power ramps up
  • How motor output follows rider effort
  • How much current the system can draw
  • When assistance must be reduced
  • When a fault requires shutdown

Early and inexpensive controllers may respond primarily to a cadence sensor or throttle. More advanced systems combine torque, cadence, speed, motor-position, temperature, and battery data. The resulting behavior is defined by both electronic hardware and firmware.

A powerful motor connected to a poorly matched controller may feel abrupt, noisy, inefficient, or weak. Conversely, a carefully tuned controller can make modest hardware feel responsive and controlled. Motor construction, sensor quality, gearing, battery performance, and frame integration still matter, so ride feel should not be attributed to the controller alone.

How It Works

Input Processing

The controller receives information from sensors and other electronic modules. Depending on the system, inputs may include:

  • Torque: Rider force applied through the pedals
  • Cadence: Crank rotational speed
  • Wheel speed: Bicycle speed and speed-limit information
  • Throttle position: Requested motor output on throttle-equipped bikes
  • Brake signal: Command to stop assistance
  • Rotor position: Motor-shaft position from Hall sensors, encoders, or electrical estimation
  • Current and voltage: Electrical load and battery condition
  • Temperature: Motor, controller, or battery heat
  • Gear position: Used by some electronically integrated drivetrains
  • Bicycle attitude: Pitch or acceleration data on certain advanced systems

Not every controller receives every input. A basic cadence-sensing hub system may use only pedal rotation, wheel speed, throttle, and brake cutoffs. An integrated performance system may process torque, cadence, gear position, temperature, and bicycle attitude simultaneously.

Assist Calculation

Firmware compares the sensor information with the selected assist mode and programmed limits. It then calculates a requested motor torque or current.

This calculation can include:

  • Assist ratio
  • Starting-current ramp
  • Maximum battery current
  • Maximum motor phase current
  • Speed limit
  • Cadence-dependent output
  • Torque-sensor filtering
  • Traction-management logic
  • Thermal derating
  • Shift-related power reduction

If the rider pushes harder, a torque-sensing system may increase assistance proportionally. If the controller detects excessive temperature, low battery voltage, or a speed above the assistance threshold, it can reduce or stop motor output.

Power Stage

The controller’s power stage commonly contains six MOSFETs or similar switching devices arranged as three half-bridges. These switches connect the battery to the motor’s three phases in controlled patterns.

Pulse-width modulation rapidly switches the transistors to regulate current. However, PWM alone does not determine motor behavior. The timing of phase energization, rotor-position information, current feedback, and control algorithm determine how smoothly and efficiently torque is produced.

At low motor speed, phase current can be substantially different from battery current. For this reason, a controller’s advertised battery-current limit does not provide a complete picture of motor torque or electrical stress.

Motor-Control Methods

Six-Step or Trapezoidal Control

Six-step controllers energize motor phases in a sequence based on rotor position. Position may be detected by Hall sensors or estimated from the motor’s back electromotive force.

Characteristics include:

  • Relatively simple electronics and firmware
  • Low production cost
  • Good compatibility with basic hub motors
  • More torque ripple
  • Greater potential for audible electrical noise
  • Less refined low-speed control

Six-step control remains common in conversion kits and cost-sensitive e-bikes.

Sinusoidal and Field-Oriented Control

Field-oriented control, or FOC, regulates motor current as rotating magnetic-field components rather than treating each phase as a simple on/off channel. This allows more precise torque control over a broad speed range.

Potential benefits include:

  • Smoother low-speed response
  • Reduced torque ripple
  • Lower audible motor noise
  • More accurate current control
  • Improved efficiency under appropriate conditions
  • Better control during rapid acceleration

FOC requires more processing power, current measurement, and accurate motor parameters. It may use rotor-position sensors or estimate rotor position from voltage and current feedback. Microchip’s e-bike reference design, for example, uses FOC with either Hall-sensor or sensorless feedback. Microchip e-bike controller reference design

CharacteristicSix-step controlField-oriented control
Control complexityLowerHigher
Typical torque rippleGreaterLower
Low-speed refinementBasic to moderateGenerally better
Rotor feedbackHall sensors or back-EMFSensors or calculated position
Common applicationBasic and conversion systemsRefined OEM and performance systems

Controller type alone does not guarantee quality. Poorly tuned FOC can perform worse than a properly matched six-step controller.

Controller Hardware

A typical controller includes:

Microcontroller

The microcontroller runs the firmware, reads sensors, calculates motor commands, manages communications, and responds to faults.

Gate Driver

The gate driver amplifies low-power commands from the microcontroller so they can switch the power transistors accurately.

MOSFET Power Stage

MOSFETs switch battery current into the motor phases. Their voltage rating, current capacity, cooling, and circuit layout determine how much electrical and thermal load the controller can withstand.

Current Sensors

Shunt resistors or magnetic sensors measure battery or phase current. This feedback allows torque regulation and overcurrent protection.

Position Feedback

Motor position may come from Hall sensors, an encoder, or sensorless calculations. Incorrect position information can cause rough running, cogging, weak output, or failure to start.

Capacitors

Capacitors stabilize the controller’s DC input and absorb switching transients. They can remain charged temporarily after the battery is disconnected.

Communication Interface

Integrated systems communicate with batteries, displays, sensors, chargers, and diagnostic tools through a digital network. Physical connector compatibility does not guarantee communication compatibility.

Integrated and External Controllers

Integrated Controllers

Many OEM mid-drives place the controller inside the motor housing.

Advantages include:

  • Short motor-phase connections
  • Reduced external wiring
  • Better physical integration
  • Coordinated motor and sensor development
  • Improved protection from direct exposure

Trade-offs include:

  • Greater heat concentration
  • More difficult access
  • Proprietary diagnostics
  • Replacement of a larger assembly when the controller fails

Some integrated motors use a replaceable controller module. Others require drive-unit replacement or authorized internal service.

External Controllers

External controllers are common on hub-motor bikes, conversion kits, cargo bikes, and high-output systems.

Advantages include:

  • Easier replacement
  • Better access for testing
  • Greater cooling area
  • More configuration options
  • Separation from motor heat

Disadvantages include:

  • Additional wiring and connectors
  • Exposure to water or impact
  • More opportunities for mismatched components
  • Less refined frame integration

Controller, BMS, and Display

The controller should not be confused with the battery-management system.

The motor controller regulates power sent to the motor. The BMS monitors the battery cells, manages charging and balancing, and protects the pack against conditions such as excessive temperature, overload, or deep discharge. Bosch e-bike battery guide

The two modules may exchange information, but each can impose its own limits. A sudden shutdown under load may therefore be caused by:

  • Controller overcurrent protection
  • Controller overheating
  • Motor overheating
  • Battery voltage sag
  • BMS current protection
  • A loose battery connection
  • Communication failure

The display is usually an interface rather than the motor’s power controller. It sends rider selections and displays system information, while the high-current switching occurs elsewhere.

Role in Ride Feel

Controller settings strongly influence several rider-perceived characteristics.

Starting Behavior

Starting current and ramp rate determine whether assistance enters gradually or arrives as a surge. Excessive starting current can break traction, strain the chain, or make low-speed handling difficult.

Torque Response

A torque-sensing system must filter pedal-force signals without creating excessive delay. Too little filtering can make assistance nervous; too much can make it feel disconnected.

Cadence Response

Some systems reduce output at high cadence, while others maintain assistance across a wider pedaling range. This behavior is determined by motor capability and controller programming together.

Overrun and Cutoff

Controllers determine how quickly motor assistance stops after pedaling ceases or a brake cutoff activates. Excessive overrun can be unsettling in technical terrain or traffic.

Thermal Derating

When the motor or controller becomes hot, firmware may progressively reduce power. This can feel like a weak battery even when the battery remains charged.

Electrical Noise

Switching frequency, commutation method, and current waveform affect motor sound. Bearings, reduction gears, frame resonance, and motor construction also contribute.

System Integration

Advanced controllers can coordinate with other electronic components.

For example, Shimano’s integrated systems can use cadence, torque, and speed data for automatic shifting and can coordinate the drive unit with compatible Di2 components. Shimano EP6 system

Avinox systems add gear-position and bicycle-attitude data to their control strategy. Avinox system FAQ

Firmware updates can change assist curves, sensor calculations, communications, and shifting behavior without replacing hardware. Shimano’s E-Tube platform, for example, supports approved firmware updates and assist customization. Shimano E-Tube Project

Regenerative Braking

Some controllers can return electrical energy to the battery during braking, but the motor and drivetrain must support it.

Regeneration is most practical with direct-drive hub motors because the wheel remains mechanically connected to the motor. Geared hub motors and most mid-drives contain freewheels or one-way clutches that disconnect the motor while coasting, preventing conventional regenerative braking.

A controller advertised as regeneration-capable cannot provide regeneration if the motor and battery system are incompatible.

Protective Functions

Depending on the design, a controller may monitor for:

  • Excessive phase or battery current
  • High controller temperature
  • High motor temperature
  • Battery undervoltage or overvoltage
  • Invalid throttle position
  • Missing speed signal
  • Hall-sensor or rotor-position faults
  • Phase-wire faults
  • Brake-signal faults
  • Communication errors

Protection limits reduce damage risk but do not make incompatible tuning safe. Increasing current limits can exceed the capacity of the motor windings, MOSFETs, battery, BMS, wiring, connectors, or drivetrain.

Mechanic’s Perspective

Controller faults are frequently misdiagnosed. A no-assist condition does not automatically mean the controller has failed.

Before testing, record:

  • Bicycle and drive-system model
  • Controller model
  • Nominal voltage
  • Battery model
  • Motor type
  • Display and control-unit models
  • Connector type and pinout
  • Firmware version
  • Current and stored error codes
  • Circumstances under which the fault occurs

Diagnostic Sequence

  1. Confirm the complaint. Determine whether the problem is no assist, reduced power, intermittent cutoff, rough running, noise, overheating, or a display fault.
  2. Check the battery first. Verify charge, mounting, connector condition, and whether voltage collapses under load.
  3. Inspect brake cutoffs. A stuck or damaged brake sensor can inhibit an otherwise functional controller.
  4. Check the speed sensor and magnet. Misalignment can disable assistance or produce incorrect speed behavior.
  5. Inspect the wiring. Look for bent pins, backed-out terminals, corrosion, melted connectors, crushed harnesses, and water ingress.
  6. Read fault codes before disconnecting components. Stored information may be lost after power cycling or substitution.
  7. Inspect motor feedback circuits. Hall-sensor, encoder, or phase-wire problems can imitate controller failure.
  8. Check temperature-related behavior. A bike that works when cold but loses power during climbing may be thermally derating.
  9. Verify firmware and component compatibility. Communication faults often appear after an incorrect display, battery, or controller has been installed.
  10. Perform a controlled load test. A repair-stand test may not reproduce battery sag, high phase current, or thermal shutdown.

Electrical Safety

Disconnect the battery before opening connectors or removing the controller. Follow the manufacturer’s specified discharge time because internal capacitors may remain energized.

Do not short phase wires or probe high-current circuits casually. Improvised testing can damage the controller, create an arc, or start the motor unexpectedly. Integrated systems should be diagnosed with the approved service tool whenever available.

Replacement Compatibility

A replacement controller must match more than nominal voltage. Confirm:

  • Maximum battery voltage
  • Battery- and phase-current ratings
  • Motor phase configuration
  • Rotor-position sensor type
  • Throttle and brake-signal format
  • Torque- or cadence-sensor compatibility
  • Display communication protocol
  • Battery communication requirements
  • Firmware and regional configuration
  • Connector pinout

Two controllers with identical plugs may be electrically incompatible.

Tuning

On configurable systems, record the original parameters before making changes. Adjust one variable at a time and test under controlled conditions.

Increasing maximum current is not the correct response to every performance complaint. Poor gearing, battery voltage sag, a damaged phase connection, incorrect wheel size, dragging brakes, or a failing torque sensor can all make a system feel weak.

Common Misconceptions

“The Controller Is the Entire E-Bike Computer”

Control may be distributed among the motor controller, BMS, display, sensors, and other modules.

“PWM Simply Changes the Voltage Going to the Motor”

PWM is part of the switching process, but torque depends primarily on controlled phase current and correct motor commutation.

“A Higher-Amp Controller Always Makes the Bike Faster”

Higher current mainly increases available torque and acceleration. Maximum speed also depends on battery voltage, motor winding, gearing, wheel size, firmware, and legal limits.

“Any Controller With the Correct Voltage Will Work”

Motor feedback, phase arrangement, current limits, connectors, display protocol, and firmware must also match.

“Every Controller Can Be Reprogrammed”

Many OEM controllers allow only approved configuration through manufacturer software. Others are locked to the bicycle brand or complete system.

“A Controller Fault Code Proves the Controller Is Defective”

The controller reports faults elsewhere in the system. An error generated by the controller may identify a battery, sensor, motor, wiring, or communication problem.

Notable Architectures

Integrated OEM mid-drives: Bosch, Shimano, Brose, Yamaha, and Avinox generally integrate motor control into a coordinated drive system.

Bafang systems: Architecture varies from configurable conversion drives to closed, frame-integrated OEM systems.

External hub-motor controllers: Common on conversion kits, utility bikes, and cost-sensitive e-bikes.

Programmable specialist controllers: Used in custom and high-output builds where the motor, battery, wiring, and thermal limits are engineered together.

Related Terms

Motor Controller
Battery Management System
Torque Sensor
Cadence Sensor
Hall Sensor
Field-Oriented Control
Pulse-Width Modulation
MOSFET
Firmware
Pedal Assist System
Thermal Derating
Regenerative Braking

References

Microchip E-Bike Traction Motor Control Reference Design
Microchip AN5709 E-Bike Motor-Control Application Note
Texas Instruments BLDC and PMSM Field-Oriented Control Guide
Texas Instruments Electric-Bicycle Controller Design Considerations
STMicroelectronics Field-Oriented Control Overview
Bosch E-Bike Battery Guide
Shimano E-Tube Project
Avinox Drive System FAQ

Scroll to Top