I designed this controller for my Crystalite Sparrow 48V electric bicycle hub motor. The core function of a DC motor controller is to periodically read the throttle setting and adjust the current being supplied to the motor. It does this with a technique called pulse-width modulation or PWM (more on this later). Other functions of the controller include: 1) low-voltage cutoff .. monitor the battery voltage and shut down the motor if the battery voltage is too low .. this protects the battery from over-discharge. 2) over-temperature cutoff .. monitor the temperature of the FET power transistors and shut down the motor if they become too hot .. this protects the FET power transistors. 3) over-current cutoff .. reduce the current to the motor if too much current is being supplied .. this protects both the motor and the the FET power transistors. 4) brake cutoff .. shut down the motor when the brake is applied .. this is a safety feature .. if the user applies brake and throttle, the brakes win.
DC Motor Controller for Electric Bicycle - [Link]