The current invention relates to in general, a motor driver controller with a pedal assist function for electric bicycles and more particularly, to circuits and methods for detection of backward pedaling movements and prevention of motion of the electric bicycle during such movements.
Electric bicycles are typically powered by motors and the user determines the speed at which the motor drives his electric bicycle through either:
a. the throttle control, or
b. pedal-assist function.
As this invention relates more to the pedal-assist function, hence, further elaboration of the pedal-assist function shall be described, and not the throttle control. As disclosed in Provisional Patent Application U.S. 60/886,413 (“Motor Driver Controller for Electric Bicycle”), an operation of such a pedal assist function is described.
Referring to
According to the pedal speed counter 29, decoder 31 decides which assisting level to provide. If the pedal is being stepped fast, higher assisting power is provided. Conversely, the slower the pedal is being stepped, lower assisting power is provided. Through a pedal assist select block 15, only PWM signal generated from the pedal assist block 35 is fed to drive the motor.
However, the limitation of this pedal-assist function is that the PWM signal generated from Comparator 34 will still be fed to the motor driver regardless of direction of pedaling, that is, whether forward or backward. This means, the electric bicycle under the pedal-assist mode will still move forward even if the user pedals in the backward direction. This poses a danger, as an unsuspecting rider may not anticipate such a reaction from the electric bicycle and may thus result in the rider falling off his vehicle. Another problem with the prior art is that if the backward pedaling occurs when the bicycle is stationary, there will be a sudden increase in current across the Motor Driver Bridge 19, and if the surge is large enough, may cause it to be damaged.
It is intended for the present invention to solve those problems mentioned. For the present invention, a backward pedaling detection circuit capable of detecting input signal with varying duty cycles from a pulse type hall sensor fixed at the pedal is disclosed.
The present invention makes use of the operating knowledge of pulse type hall sensors commonly used in the electric bicycle industry. An example of such is the WSY02 module manufactured by the Suzhou Bafang Electric Motor Science-Technology Co., Ltd of China. This module provides a pulse type hall sensor assembly that is able to generate pulse signals based on the direction of rotation of the sensors. For a forward direction, the fixed pulse width generated will have a duty cycle of less than 45%. For a reverse direction, the fixed pulse width generated will have a duty cycle of more than 55%.
The present invention is basically a protection circuit which can recognize that forward pedal movements produce a pulse signal with high duty cycle and backward pedal movement produce a pulse signal with low duty cycle. The present invention hence protects the motor driver from activation when the pedal is moved backward.
An object of this invention is to implement an analog type backward pedaling detection circuit which can effectively detect and differentiate input pulses with high and low duty cycles. This will thus provide protection for the motor driver with pedal assist function.
According to the present invention, said backward pedaling detection circuit comprises: a charging/discharging circuit with an external capacitor to adjust timing, a hysteresis comparator to set the threshold and logic ‘AND’ gates to collectively act like a switch.
Referring to
Referring to
Referring to
Referring to
Next, the operation of such an arrangement is described below.
The Hall Sensor output signal 101 will be fed to Backward Pedaling Detection circuit 103 and to Pedal Speed Timer block 102. Initially, when there is no signal from pedal hall sensor, it is said to be on PA (pedal assist) Low condition which means that the output of the Backward Pedaling Detection circuit 103 is default to LOW. This is because of the following reason: The Pedal Speed Timer block 102, which consists of counters, will give a HIGH signal at output 114, for a case of no pedaling detected. This will turn ON, transistor 202 (
As mentioned, pulse type hall sensors are used. For these sensors, for a motion in the backward direction, a signal with a duty cycle of less than 45 percent is outputted. When this occurs, the backward pedaling detection circuit 103 will output a LOW signal voltage. This means that it will not allow any signal coming from the DECODER 104 to activate any of the NMOS switches 105.
When none of the NMOS switches 105 is turned ON, the PWM COMP 109 inverting input is low and is below the threshold of the triangular signal 107. The PWM COMP 109 output is always on HIGH state. The output of the Pedal Assist Mode Select Block 110 will thus become HIGH which will not cause any switching to PWM LOGIC 111 and will not drive the MOTOR DRIVER BRIDGE 112 and will result in no commutation from the motor 113.
For the case when the rider suddenly pedals in the backward direction after pedaling in the forward direction initially, the following operation occurs: As mentioned, the Pedal Hall Sensor Signal 101 will give a signal with a duty cycle of less than 45 percent. The inverter 200 inverts the signal and thus causes NMOS 207 to be ON, and PMOS 206 to be OFF for most of the duty cycle. Meanwhile, since pedaling motion is detected, the Pedal Speed Timer Signal 114 will be LOW, thus NMOS 202 will be off. This results in the charges from External Capacitor 203 to be discharged via NMOS 207. The corresponding waveform of the External Capacitor 203 (node 208) is as shown in
The operation of the invention for the case of a forward pedaling is described as follows: For these Pulse Type Hall Sensors, for a motion in the forward direction, a signal with a duty cycle of more than 55 percent is outputted. Hence, when the duty of the hall signal from the Pedal Sensor 101 is more than 55 percent, the inverter 200 inverts the signal and thus causes PMOS 206 to be ON, and NMOS 207 to be OFF for most of the duty cycle. Meanwhile, since pedaling motion is detected, the Pedal Speed Timer Signal 114 will be LOW, thus NMOS 202 will be off. This results in the charging up of the External Capacitor 203 via PMOS 206. The corresponding waveform of the External Capacitor 203 (node 208) is as shown in
When one of the NMOS switches 105 is turned ON, the PWM COMP 109 inverting input is equal to the voltage set by the resistor tree 106. The DECODER 104 will determine which voltage level to set to by turning on the corresponding NMOS switch 105. This voltage will be compared to a triangular signal 107 to determine the duty cycle of the PWM COMP 109 output. The Pedal Assist Mode Select Block 110 output follows the PWM COMP 109 output signal. The switching signal will be processed by the PWM LOGIC 111 and then drive the MOTOR DRIVER BRIDGE 112 that will result in commutation from the MOTOR 113.
The Position Sensor 115 and the Drive Current Signal 116 serve as information feedback for the PWM logic to ensure that the desired Motor speed is achieved.