Figure 1 shows the filtering circuit of the Hall signal of the brushless motor. In order to ensure the quality of the waveform, the simple resistive-capacitance filtering does not completely solve the waveform abnormality caused by the actual complex working environment, and the mass-produced brushless driver module also has this circuit.
In order to ensure the quality of filtering, an NPN transistor is added behind the RC filter, using the response speed of the transistor itself to achieve the purpose of high-quality filtering.
Triode response speed has a minimum width requirement, usually tens of nanoseconds to hundreds of nanoseconds, the signal is greater than the minimum pulse width requirement to ensure normal output without distortion.
Figure 1: Brushless motor Hall signal filtering
Usually when you do the drive, you will encounter the Hall signal or encoder signal processing, the signal is a pulse (square wave) signal, before filtering the waveform as shown in the left of Figure 1, in fact the burr will be more and more mixed.
The burr width is usually only a few tens of nanoseconds. Adding a triode after the RC filtering can filter out the burr at all, making the output cleaner and of higher quality, as shown on the right of Figure 1.
Figure 2, Figure 3 and Figure 4 are the waveform comparison before and after the filtering of the Hall signal of the brushless motor, the red waveform represents the Hall signal before filtering; the blue waveform represents the Hall signal after filtering. The burr before filtering is exceptionally horrible.
Figure 2: Comparison before and after filtering
Figure 3: Before and after filtering comparison (enlarged)
Figure 4: Comparison before and after filtering (zoom in again)
Figure 5 is a comparison of the measured brushless motor Hall signal after RC filtering and triode filtering waveform, the red waveform represents the Hall signal after RC filtering, the blue waveform represents the Hall signal after RC filtering and then after triode filtering;
Note: The two waveforms are not inverted, because the red waveform above has been wavering left and right, randomly captured.
Figure 5: RC filtering and three-stage tube filtering comparison
Key points.
① This type of signal belongs to the OC output, so you need to add the pull resistor (R4);
② resistive filtering (R2, C1) is low-pass filtering, the signal frequency should be lower than fc=1/2πRC;
③ transistor conduction must work in the saturated state, usually the base current Ib>1mA can ensure that the transistor work in the saturated state;
④ transistor output waveform and input waveform inversion, this point in the program can do to invert the processing.