6 mosfet sine wave series of controller

Sensors and Controller for ebike: Signal Chain & Control Logic

Sensors and Controller for ebike: How the Signal Chain Actually Works

Quick Answer

An ebike sensor and controller system is a closed control loop. The sensors measure pedal force, cadence and wheel speed. The controller samples those signals, turns them into a motor command, and enforces the limits on current, voltage, temperature and pedal-stop cutoff. The sensors decide how good the input signal is, the controller decides how good the output is, and neither can make up for the other. Two bikes with the same motor and battery can still feel completely different.

What an Ebike Sensor and Controller System Is

On a pedelec the brushless DC motor supplies the power, but the controller makes the decisions. Everything the controller knows about the rider arrives through the sensor set. Take the electronics apart and three layers appear: sensing, which converts human effort into electrical signals; control, which turns those signals into a switching pattern for the motor phases; and actuation, which puts torque on the drivetrain.

A production ebike controller sits between all three. It ties the battery, the motor, the display, the throttle (accelerator) and every sensor into one system. It tracks pedal activity, pack voltage, motor power and acceleration, then decides how much assistance the motor should deliver on the next control cycle. The sensor set looks like the smaller half of that system, but it carries more weight: a bike with good sensing reads the rider’s intent, and a bike without it guesses.

Regulation explains why the sensor exists at all. Under EPAC (Electrically Power Assisted Cycles) rules, assistance may only start while the rider is pedaling, and it must stop when pedaling stops. A manufacturer can meet that requirement with a speed sensor on the pedal shaft, or with a sensor that measures the torque the rider puts into the pedal. In either case the sensor is the legal trigger for assistance, not a comfort feature added afterwards.

That gives a way to read a spec sheet for this product category: the sensor sets what the system can know, the controller sets what it is allowed to do. A high-resolution torque signal into a badly programmed controller will still ride worse than a modest cadence signal into a well-tuned one.

How the Sensor-Controller Loop Works

The loop repeats for as long as the cranks turn. Walking through one iteration is worth the space, because most ride-quality complaints trace back to one specific step.

  1. Force is converted to a signal. A torque sensor measures the actual force on the pedals and outputs a value proportional to it. A cadence sensor, mounted on the crankshaft assembly with sensing contacts and magnetic steel rings, outputs pulses instead, one per magnet passing the pickup.
  2. The controller samples and conditions the signal. Raw sensor output is noisy, so the firmware filters it. Filter too lightly and the assist surges on every pedal stroke. Filter too hard and the assistance arrives late, which riders describe as a laggy or soft bike rather than a faulty sensor.
  3. The controller computes a target. On a torque-based system that target is usually a multiple of the rider’s own torque. On a cadence-based system it is a function of pulse frequency, so a higher cadence asks for more assist.
  4. The controller enforces limits. Before a command leaves the controller, it checks battery current, phase current, pack voltage, MOSFET temperature and motor temperature. Most reports of a bike that feels weak today start here.
  5. The output stage switches the motor. The gate driver fires the MOSFETs in the pattern the control algorithm asks for: sinusoidal commutation on a sine wave controller, six-step switching on a square wave unit. The motor then produces the torque it was asked for.
Engineering note on filtering. A torque signal sampled at a few hundred hertz and smoothed over about 100 ms is a reasonable starting point on a pedelec, since the mechanical system cannot respond any faster. Tightening the filter to hide sensor noise buys quiet at the cost of the instant feel that good torque sensing gives. What separates a premium ride from an average one is usually the filter constant, not the sensor brand.
Ebike controller hub diagram connecting battery, motor, display, throttle, brake sensor and pedal sensor
Every input on a pedelec passes through the controller: battery, motor, display, throttle, brake sensor and pedal sensor. Image source: elecycles.com

For a component-level look at the same chain, see our explainer on how an electric bicycle controller works. For the motor side of the calculation, the guide on calculating motor torque covers it.

Torque vs Cadence Sensors: What Each Measures

A torque sensor measures force. A cadence sensor measures rhythm. Most of the behavioural difference between the two systems follows from that, including the part riders describe as natural versus switch-like.

Torque sensing

A torque sensor converts the force the rider puts into the pedals into a torque value, and the controller reads that value directly. Because the reading is proportional, the assistance can be proportional too: push harder and the motor support rises with you, ease off and it falls away. Premium pedelecs sell this as an extension of your legs. The feel is mechanical rather than algorithmic, because the sensor is reporting the rider’s own output.

Of the two approaches, torque sensing is the more precise and the more complex. The extra cost sits in the sensing element and its calibration; the money does not go into the controller. For background on the component itself, see what a torque sensor measures on an ebike and the ebike torque sensor range page.

Cadence sensing

A cadence sensor, also called a step-frequency sensor, is mounted on the crankset and built from sensing contacts and magnetic steel rings. It does not measure force at all; it counts how fast the cranks turn. Assistance is therefore set by pedaling speed, and a higher cadence brings stronger support. Cadence sensing costs less, but the response is coarser, because the sensor cannot tell a rider pushing hard in a high gear from one spinning easily in a low gear.

There is a second consequence that gets discussed less. A pulse-counting sensor needs one magnet to pass before it registers movement, so a cadence-based system cannot respond inside the first fraction of a crank revolution. Riders feel it as a slight delay when they start from a standstill. No firmware update removes it, because it comes from counting pulses rather than sensing force.

Side-by-side

CharacteristicTorque sensorCadence (step-frequency) sensor
Signal sourceForce applied to the pedals, reported as torqueSensing contacts and magnetic steel rings on the crankset
What the controller receivesA continuous, proportional torque valueDiscrete pulses; frequency encodes pedaling speed
Assistance behaviourRises and falls with rider effort; immediate and proportionalSet by pedaling speed; higher cadence, stronger assist
Response characterContinuous, feels like an extension of the legsStepped, can feel switch-like at low cadence
Relative cost and complexityHigher; sensing element and calibration dominateLower; a pulse counter is sufficient
Best fitRiders and brands where assistance must mirror effortCost-sensitive builds where simple pedaling detection is enough

Hybrid and emerging sensing

A high-performance electric assisted bicycle usually carries more than one sensor. With cadence and torque together, the controller can work out the current riding state from how fast and how hard the rider is pedaling. That is what makes more elaborate power delivery algorithms possible; either signal on its own would not support them.

Newer inputs are joining the same loop: accelerometers, gradient sensors, GPS. With those signals a controller can anticipate a terrain change instead of reacting to it, and move power around before the climb starts. The direction of travel is a system that adapts to the rider and to the ground at the same time.

What the Ebike Controller Actually Does

Inside the controller, four jobs run at the same time. A specification that covers only one of them is incomplete.

Computation. The controller is the bike’s processing unit. It takes in torque, speed and cadence, works out an output, and controls motor speed, start, stop and cutoff. It also tracks pedal activity, battery voltage, motor power and acceleration, and that data set feeds every protection decision.

Power management. Between battery and motor it regulates the energy flow, turning pack voltage into a switched three-phase output. How efficient that conversion is depends on the MOSFETs, the gate drive and the switching strategy. It is also why sine wave and square wave units run at different temperatures as well as different noise levels.

Protection. This layer is what makes a controller a safety device rather than a speed device.

ProtectionWhat it guardsTypical triggerWhat the rider notices
Over-currentMOSFETs and motor windingsPhase current above the programmed limit, usually on a climb or from a standstillAssistance flattens out instead of climbing further
Over-voltageController capacitors and MOSFETsPack voltage above the rated window, often on a full charge or during regenAssistance cuts until voltage falls back into range
Under-voltageBattery cellsPack voltage sagging under load near the end of dischargePower steps down; the display may show a low-pack warning
Over-temperatureMOSFETs and motorCase or motor temperature above threshold, sustained load in hot weatherProgressive derating rather than an abrupt stop
Brake cutoffRider and drivetrainAny brake lever pulled, via the brake sensor inputMotor assist stops immediately while braking
Error codesDiagnosisSensor open circuit, hall fault, throttle fault, communication lossA code on the display instead of an unexplained dead motor

The battery has its own high-voltage and low-voltage protection, which prevents overcharging and excessive discharge. The controller also watches motor temperature and current, so the protections, brake cutoff included, keep working when the system is under load.

Communication. The controller talks to displays, Bluetooth modules and diagnostic tools. This is how the assistance mode reaches the rider, how service data gets read, and how a manufacturer updates tuning in the field. On B2B projects the interface list is usually the first thing a systems integrator asks about, because it decides whether the bike can be diagnosed without opening the housing.

Sine wave ebike controller with heatsink housing and labelled motor, battery and pedal sensor connectors
Aluminium housing, sealed harness and labelled connectors: the mechanical side of a controller is as much a specification as the firmware. Image source: Greensky Power

Sine Wave vs Square Wave Controllers

Both topologies switch the same three motor phases. What differs is the shape of the current they produce, and that shape is what the rider hears and feels.

Sine wave controllers

Sine wave controllers produce a smooth sinusoidal current. Because the waveform follows the motor’s back-EMF more closely, torque ripple stays low, and in practice the motor runs almost silently with very fine control. The trade-off is a more demanding control loop and a higher bill of materials, which is a fair price for high-end urban and touring ebikes, where noise and refinement are part of what the product promises. The sine wave controller series covers this family, including the 12-MOSFET sine wave platform.

Square wave controllers

Square wave controllers switch with simpler digital patterns. The abrupt current steps excite mechanical resonance in the motor and frame, which comes out as a hum, and torque delivery is a little less smooth. In exchange the control logic and power stage are simpler, so the unit costs less, which suits entry-level applications.

Choosing between them

Decision factorSine waveSquare wave
Output waveformSmooth sinusoidal currentAbrupt switched steps
Acoustic resultVirtually silent operationAudible humming under load
Control precisionExtremely precise; low torque rippleLess smooth delivery
Cost positionHigher; more demanding control loopLower; simpler switching
Where it fitsHigh-end urban and touring platformsEntry-level, cost-led platforms

The decision trades acoustic performance and control precision against system cost, and it depends on the ebike category and the market rather than on a spec sheet read in isolation. A commuter platform and a touring platform can justify opposite answers on the same motor.

Programming and Assistance Modes

The controller’s program defines how the bike rides. Hardware sets the ceiling. The program decides how the rider gets there.

ModeProgrammed intentPower ceilingRange effect
EcoMost economical assistanceLowestLongest range per charge
TourBalanced, comfortable assistanceModerateBalanced against effort
SportProgressive power for energetic ridingHighShorter range, stronger response
Sport+Sport mode with an enhanced power curveHigherShortest range in the sport family
BoostMaximum power output for challenging terrainHighest permittedReserve for climbs and headwind

On the Frey Evolve platform the display shows 0.0 for no assistance, then E, T, S, S+ and B. Choosing a mode sets the power available for the rest of the ride, and the program, more than the motor alone, decides what a mode gives you.

Ebike display showing no-assist and Eco, Tour, Sport, Sport+ and Boost assistance levels
Assistance levels on the display: 0.0, E, T, S, S+ and B. Image source: Frey Evolve

The program matters more than the headline number. A controller’s algorithm is its control program, and our technical team calls it the part of the bike you can feel but cannot see. Two controllers with the same rated current can ride quite differently, because ramp rate, current-limit shape and mode mapping are software decisions. A unit tuned for a cargo bike and a unit tuned for a touring bike should not feel the same, even when they share a power stage.

How to Specify a Controller: Worked Example

Specification is where B2B projects lose the most time: the criteria that decide whether a platform ships are rarely the ones on the first quotation. Five are worth putting on paper.

CriterionWhat to verifyWhy it decides the projectRed flag
Motor and system compatibilityRated voltage window, phase current, sensor type and connector pinout against the motor data sheetA controller only behaves as designed when matched to the motor it drivesA pinout that differs from the drawing supplied with the sample
Environmental sealingIP classification and the sealing method at the harness entryIngress protection is hard to add after the housing is tooledAn IP rating quoted for the housing but not for the connectors
ProgrammabilityWhich parameters are exposed: current limit, ramp rate, mode mappingDetermines how far one platform can be tuned for different markets“Fixed firmware” offered as a feature rather than a limitation
CertificationCE, UL and the marks required by the destination marketMarket access depends on it, not on performanceCertificates available only after the order is placed
Connectivity roadmapDisplay protocol, Bluetooth module support, OTA capability, anti-theft functionsThe industry is moving toward connected controllers with app integration and over-the-air updatesNo diagnostic path other than opening the enclosure

Worked example: does the assistance ratio survive the power cap?

Most specification discussions skip this calculation, and it explains a complaint that otherwise looks like a sensor problem. Take a rider producing a tangential pedal force of 200 N on a 170 mm crank at two different cadences, with the torque sensor ratio programmed at 150% and assist power capped at 250 W.

Step 1: crank torque. T = F × r = 200 N × 0.17 m = 34 N·m. That is the number the torque sensor reports, and cadence does not change it.

Step 2: rider power at each cadence. P = T × ω, with ω = 2π × rpm / 60. At 50 rpm, ω = 5.24 rad/s, so P = 34 × 5.24 = 178 W. At 80 rpm, ω = 8.38 rad/s, so P = 34 × 8.38 = 285 W.

Step 3: requested versus available assist. At 150% the request is 267 W at 50 rpm and 427 W at 80 rpm. The cap allows 250 W either way. At 50 rpm the delivered assist is 250 W, an effective ratio of 250 / 178 = 140%. At 80 rpm it is still 250 W, an effective ratio of 250 / 285 = 88%.

The insight. Same pedal force, same mode, same sensor, and the assistance ratio quietly drops from 140% to 88% as cadence rises. Power scales with torque times speed while the cap is fixed in watts. Riders read that as the assist fading when they spin fast, and the usual diagnosis is a sensor fault. The sensor is fine; the power cap is doing exactly what it was set to do. If the product brief promises a constant feel across the cadence range, the cap has to be specified against that range, not against a single test point.

Worked example: the range arithmetic is inverse, not linear

A 36 V, 10 Ah pack holds 36 × 10 = 360 Wh before efficiency losses. At an average draw of 12 Wh/km the usable range is 360 / 12 = 30 km. Switch the program to a leaner curve that averages 8 Wh/km and the range becomes 360 / 8 = 45 km.

A 33% cut in consumption produces a 50% gain in range, because range is inversely proportional to consumption, not linear in it. That is the quantitative reason a mode ladder does more for range than a bigger battery: the same 4 Wh/km saving buys 15 km on this pack, while extra capacity buys kilometres in proportion and costs mass, volume and price.

How to use these numbers. Both examples use round, stated assumptions, so the arithmetic can be checked line by line. They are illustrative engineering calculations, not specifications of any product. Put in your own pack, cadence range and power cap, and the same formulas will describe your platform.

Five Specification Mistakes We See

These failure patterns cost the most time between sample and production, and none of them appear on a one-page datasheet.

1. Selecting by headline current only. A controller rated for high phase current at 25 °C ambient is a different product at 45 °C inside a sealed down-tube. Every current rating has a thermal basis, and the first question to ask is what that basis is.

2. Treating sealing as a property of the housing. Water gets in at the harness entry, the connector seals and the grommets, not through the extruded aluminium. A high IP rating on the box with unsealed connectors is a warranty claim waiting to happen.

3. Reading a cadence signal as a speed signal. A pulse train from the crankset reports how fast the cranks turn. It says nothing about how fast the bike moves or how hard the rider pushes. Systems that infer rider effort from crank speed alone produce the switch-like assist riders complain about, and tuning cannot recover a variable the sensor never measured.

4. Leaving brake cutoff logic to the harness. Brake sensors come in normally-open and normally-closed variants, and a controller programmed for one will read the other as a permanently engaged brake. Check the polarity in the specification, before the first test ride.

5. Swapping a controller without a pinout audit. Controller wiring is complex and the swap needs professional knowledge, so beginners should not attempt it. Even an experienced workshop should check pin by pin before power-up. A mislanded 5 V and ground pair is the quickest way to destroy a sensor set that was working perfectly.

Replacement warning. Riders chasing more speed are behind most controller swaps, and the failure gets expensive: a unit picked for its headline rating, wired into a harness whose connector functions do not match, with protections calibrated for a different motor. If more performance is the goal, specify against the motor and battery the bike actually has rather than a generic higher-rated box.

Troubleshooting Table

Most rider-reported faults come down to a handful of causes. The table below is ordered by how often each one turns up.

SymptomMost likely causeFirst checkFix
Assist cuts in and out at steady cadenceCadence sensor gap or magnet spacingRing-to-pickup gap and magnet count against the drawingReset the gap; replace a cracked magnet ring
Strong at low cadence, weak at high cadenceAssist power cap reached as cadence risesProgrammed power limit against the cadence range in the briefRe-specify the cap, or accept the behaviour by design
Motor stops on light brake inputBrake cutoff polarity or lever adjustmentWhether the brake sensor is normally open or normally closedMatch the controller logic to the sensor variant
Power fades after long climbsOver-temperature deratingCase temperature and heatsink contact to the frameImprove the thermal path; reduce sustained current
Pack cuts out under load near emptyUnder-voltage protection responding to sagPack voltage under load versus the programmed thresholdAdjust the threshold to the pack’s sag profile
Error code immediately after a swapHarness pinout or connector function mismatchPin-by-pin continuity against the controller drawingCorrect the harness before applying power again

For faults on the motor side rather than the controller side, see the guide on troubleshooting a DC motor, which covers the mechanical and winding checks a controller cannot report.

Why Specify with Greensky Power

Greensky Power Co., Ltd. develops, manufactures and sells ebike controllers. The specification conversation happens with the team that builds the power stage and writes the control program, rather than with a trading desk.

We offer both standard and custom controller solutions, and the distinction matters, because the two kinds of enquiry are different projects. A standard unit suits a platform that is already defined. A custom unit is what a manufacturer needs when the mode ladder, the current limit shape or the connector map has to match an existing product line. Capability details across the motor and controller range are on the motor and controller capability page.

Specifying a controller for an ebike platform? Send the motor data sheet, the target cadence range and the harness drawing, and we will come back with the matching controller family and the protection settings it should ship with. Talk to our sales team.

Reading paths by intent, general first:

References

  1. International Electrotechnical Commission. IEC 60034-1: Rotating electrical machines — Rating and performance. webstore.iec.ch
  2. International Electrotechnical Commission. IEC 60034-30-1: Efficiency classes of line operated AC motors (IE code). webstore.iec.ch
  3. International Electrotechnical Commission. IEC 60529: Degrees of protection provided by enclosures (IP code). iec.ch
  4. British Standards Institution. EN 15194: Cycles — Electrically power assisted cycles (EPAC) — Safety requirements and test methods. knowledge.bsigroup.com
  5. American National Standards Institute / NEMA. ANSI/NEMA MG 1: Motors and generators. webstore.ansi.org
  6. U.S. Department of Energy. Improving motor and drive system performance: a sourcebook for industry. energy.gov (PDF)
  7. IEEE. Control of brushless DC machines: a review of commutation and current regulation methods. ieeexplore.ieee.org
  8. Texas Instruments. Sensorless brushless DC motor control application note (SPRABQ3). ti.com (PDF)
  9. maxon. EC technology: electronically commutated brushless DC motors. maxongroup.com
  10. FAULHABER. Know-how: drive technology fundamentals. faulhaber.com
  11. Siemens. SIMOTICS electric motors and drive systems. siemens.com
  12. International Energy Agency. Electric motors — energy system tracking. iea.org
  13. International Organization for Standardization. ISO 9001: Quality management systems — requirements. iso.org

FAQ

What is the difference between a torque sensor and a cadence sensor on an ebike?

A torque sensor measures the force applied to the pedals and reports it as a torque value, so assistance can rise and fall in proportion to rider effort. A cadence sensor uses sensing contacts and magnetic steel rings on the crankset to count how fast the cranks turn, so assistance is set by pedaling speed instead. Torque sensing is more complex and more precise; cadence sensing is generally more affordable but less nuanced.

Which is better, a sine wave or a square wave controller?

Neither is better on its own. Sine wave controllers produce smooth sinusoidal current, which gives near-silent operation and very fine control, and suits high-end urban and touring ebikes. Square wave controllers switch more simply and cost less, but they can hum audibly and deliver slightly less smooth power, which suits entry-level platforms. The decision belongs to the ebike category and the target market.

Why does my ebike stop assisting when I stop pedaling?

That behaviour is required, not a fault. Under EPAC standards a pedelec may only assist while the rider is pedaling, and assistance must stop when pedaling stops. The controller uses the pedal sensor, either a speed sensor on the pedal shaft or a torque sensor measuring pedal force, as the legal trigger for assistance.

Can I replace the ebike controller myself?

It is not a beginner task. Controller wiring is complex, the harness functions differ between units, and the swap requires professional knowledge. Even experienced workshops should verify the pinout against the controller drawing before applying power, because a mislanded supply pair can destroy a working sensor set.

Do I need both a torque sensor and a cadence sensor?

Not strictly, but high-performance electric assisted bicycles usually combine the two. Reading pedal force and pedal rhythm together lets the controller calculate the current riding state from both how hard and how fast the rider is pedaling, which supports power delivery algorithms that neither signal can justify alone.

What does an ebike controller’s power rating actually limit?

It limits delivered assist power, not pedal force. Because rider power scales with torque multiplied by cadence, the same pedal force asks for more watts at higher cadence. Once the cap is reached, the effective assistance ratio falls even though the sensor reading is unchanged, so the assist can feel weaker when spinning fast.