Back to Home Page

Although there is much information to be found about decoding Hall Effect Sensors for use in a microprocessor controlled Brushless DC Motors, I have never found anything regarding actual algorithms or programming to practically achieve a working motor. All just theoretical stuff. I have built a Picaxe micro controlled system using 2 micros which does work OK. The first micro reads the Hall Sensors and converts the waveform input into a coded output on three pins for the 6 required motor steps. The main micro reads these pins and determines which MOSFETs to activate. As the program requires three commands for each step, I have also designed a board with some gates and diodes which will allow the micro to activate the 2 MOSFETs required for each step, with just one command. This speeds things up somewhat.

However, while seeking ways to improve micro performance and simplify programming, I discovered that this type of motor does not need a micro processor at all. I have avoided using motor drivers which are available, as I need to be very flexible with the way my motor is operated. I assume these drivers are a type of preprogrammed micro.

What I have found is that the motor can be controlled with just three dual OpAmps and a few other components. The motor has 6 steps. The MOSFET bridge is set up with 3 high side and three low side MOSFETs  AH AL, BH BL, CH CL. One high side and one low side  MOSFET are activated simultaneously for one step, but never both A,,B, or C.
together.
The steps may go  AH   CH   CH   BH   BH  AH
                                 BL    BL    AL   AL   CL   CL  
The 3 coils, or sets of coils, used to drive the motor are named A, B, & C, and by switching the steps the polarity in the electromagnet coils will change. Only 2 coils are active during a step.

The three Hall Sensors are mounted between  coils, and we can also call them A, B, & C. Measurements can be taken of the voltages from the Hall Sensors and a graph drawn . This shows the actual crossover positions where switching is desired. If the Hall output voltages are fed into OpAmps so that one of a dual OpAmps, (say "A") switches  on as the voltage rises above an adjustable reference voltage of say 3.5v, we can call this A High, or AH. AH will turn off as the voltage drops below the ref  3.5v. As the voltage continues to fall, the other OpAmp A will now turn on at a reference voltage of say 1v. This creates an output which we can call A Low or AL. All three Hall Sensors will do the same thing, but with different timing.

It can be seen that the OpAmps are switching in the same sequence as required by the MOSFET bridge, or with a little adjustment made to do so.

AH   CH   CH   BH   BH  AH
BL    BL    AL   AL   CL   CL    

AND gates are used on the High Side outputs to introduce PWM for motor speed control. This also does not require a micro, but is very easy to do so with a micro.  A 555 could be used just as easily, but some micros are required in other areas so the programming is worth learning. The Picaxe is made for  children's education, and is not difficult. But it is very powerful. The Dual OpAmps used are LM385. I refer to this timing system in these pages as Direct Drive.

In an effort to experiment with power saving I have extended the length of the drive magnets, and this has meant designing a system with dual sets of Hall Sensors, offset from each other by the amount of excess magnet length. The decoding is done with a PCB with quad OpAmps in place of the dual OpAmps. Schematics and PCB layouts are included for both systems. 
I suspect I should have used Comparators instead of OpAmps, but so far the opAmps are
working OK. Their performance may not be adequate as Rotor velocity increases. Unfortunately the quad OpAmp pinout is not the same as the quad comparator so the dual Hall Sensor PCB would need adjusting a little. The Dual Opamp and Dual comparator are the same pinout, so the PCB for the normal Hall Sensor setup is OK. Just swap the chip.

The "H' for High Side and "L" for Low Side can also be referred to as "N" for   North Pole and "S" for South Pole. I have also designed another way to switch the BLDC motor which eliminates the 3 phase bridge and its associated problems. This motor requires a minimum of 6 coils and 8 magnets. Three coils are North Pole and the other three coils are South Pole. All of these coils are switched in a Low Side configuration. I refer to this as  Low Side Only switching.
Hall Effect Sensor Mounting
Machine Construction Home Page
Back To Electronic Drive Home Page
Hall Sensor Decoding
Graph Of Hall Sensor Voltages
VeeCad PCB Circuits