A motor controller can have an appropriate power stage and a well-structured control algorithm yet still behave poorly when its current measurements are late, distorted or unavailable during part of the PWM cycle. Current sensing therefore belongs in the architecture discussion, before amplifier selection and PCB routing become difficult to change.
This guide addresses the measurement path inside a custom BLDC motor controller. It complements the broader controller requirements and thermal-design guides by focusing on how winding current becomes a trustworthy digital value and how that value differs from an independent protection signal.
Define what the current signal must accomplish
Begin with the function of each measurement. A current-control loop needs sufficiently accurate phase information with known latency. Supply monitoring needs a defensible relationship to input power. Fault detection needs a response fast enough to protect the selected switching devices. These functions can share components, but they should not be treated as interchangeable requirements.
Document normal motoring current, regenerative current, short-duration peaks and the lowest current at which useful control is required. Include startup, low-speed operation, reversal and braking. Establish the permitted measurement error and delay for those operating cases rather than specifying an ADC resolution in isolation.
Choose the measurement location with the PWM strategy
A low-side shunt places the measurement near the inverter return and can simplify the analog interface. Its useful information depends on which switches conduct at the sampling instant. A single DC-link shunt requires reconstruction of phase information from valid switching states; narrow measurement windows can constrain the modulation strategy.
Inline sensing measures a motor phase directly and supports observation across more of the switching sequence. The amplifier must handle the changing common-mode voltage and recover from switching transients. Analog Devices describes these measurement-location and synchronization tradeoffs. Select the topology with firmware and power-stage engineers together.
Size the shunt from a complete error and loss budget
The basic relations are V = I × R and P = I² × R. As an arithmetic example, a 2 milliohm shunt carrying 40 A develops 80 mV and dissipates 3.2 W at that operating point. This is an illustrative calculation, not a component recommendation or an Outer Reef test result. RMS current determines average heating, while pulse conditions require separate evaluation.
A larger resistance improves the signal relative to amplifier offset and some noise sources, but increases dissipation and voltage drop. Review tolerance, temperature coefficient, thermal environment and pulse capability. Connect this work to the controller thermal and derating plan so that measurement accuracy is considered at operating temperature.
Check the amplifier beyond its headline bandwidth
Evaluate input common-mode range, differential input limits, offset, drift, gain error and output swing against the actual supply and fault conditions. Bidirectional phase current requires an output reference and measurement range that preserve useful information on both sides of zero. Leave room for expected transients rather than using every nominal ADC count.
For inline sensing, distinguish steady-state rejection from recovery after a PWM edge. The TI INA240 datasheet documents an amplifier intended for switching environments; it is a reference for questions to ask, not a universal part selection. Verify the chosen device with the expected bus voltage, switching behavior and signal-chain loading.
Schedule ADC acquisition inside a valid window
A fast ADC does not guarantee a useful measurement. Define the interval between a switching transition and a valid acquisition, allowing for amplifier settling, input-filter behavior and the ADC sample-and-hold requirements. Then confirm that the complete conversion and processing path fits the control-loop timing budget.
Check that the window remains usable at the duty-cycle extremes and electrical speeds the product must support. Account for dead time and any reconstruction logic. Synchronizing current measurement with PWM is central to avoiding misleading feedback, as explained in Analog Devices' motor-current measurement discussion. Specify what firmware should do when a sample is invalid.
Route the measurement as a small differential signal
The shunt carries power current; its sense connections should measure the intended resistor terminals rather than an uncontrolled length of copper. Use the selected resistor's Kelvin connection arrangement where applicable. Keep the measurement pair away from switching nodes and preserve a deliberate return and reference strategy.
Input filtering must be assessed as part of the complete signal path. Excessive filtering can make an apparently clean waveform too late for the control task. Mismatch between input paths can also degrade rejection. Analog Devices discusses Kelvin routing and current-sense settling; verify the implementation on the actual board.
Separate regulation from protective shutdown
A software current loop is not automatically a sufficiently fast short-circuit protection mechanism. Review worst-case detection and shutdown delays, including sampling, conversion, computation, gate-driver response and switching-device behavior. Consider an independent hardware comparator or gate-driver protection path where the fault analysis requires it.
Define threshold tolerances, blanking behavior, latching, reset conditions and the information retained for diagnosis. Excessive blanking can hide a genuine fault. A threshold close to normal operating current can cause nuisance shutdowns. The protection requirement should state the hazardous or damaging condition being limited and the evidence needed to demonstrate that response.
Calibrate with operating conditions in mind
Determine which errors can be calibrated and which vary with temperature or operating state. Offset calibration requires a known current condition; an assumption of zero current can be wrong while the motor is moving or the power stage is recirculating energy. Gain calibration needs a suitable reference and a documented uncertainty.
Document calibration order, stored coefficients and acceptance limits. Recheck zero crossing, both current directions and the intended operating-temperature range. Treat disagreement between channels as diagnostic information rather than silently adjusting measurements until they appear consistent.
Verify the complete feedback and protection chain
Build a verification matrix covering startup, steady load, reversal, regeneration, duty-cycle extremes and relevant temperature conditions. Compare the controller's reported values with an appropriate independent measurement, including the limitations of the reference instrument. Record sampling timing as well as amplitude error.
Exercise safe, controlled fault cases with a test setup designed for the energy involved. Confirm that invalid samples, amplifier saturation and protection events produce the intended system behavior. The design review should close with traceable requirements, a justified sensing topology, timing evidence, an error budget and a protection-response record, rather than a clean oscilloscope screenshot alone.