May 4, 2014

BLDC Hall Effect Sensors

So I've had two posts now where I talk about adding hall effect sensors to a BLDC motor. I figure it's time to explain a bit more how the process works.

This method only works with an outrunner style motor (that is, the rotor spins around the outside of the stator) with the magnets exposed on the underside of the rotor, such as this:




It involves designing a custom PCB to hold the hall sensors at the proper spacing/curvature, and some sort of mounting holes. Along with the mounting holes you need to make sure there is the ability to rotate the sensors with respect to the stator to adjust timing correctly. I've done this on two motors now and took slightly different approaches with timing adjustment on each. The first one I did was an EMAX CF2822 motor (above). That red flange at the base can be rotated with respect to the stator, so the sensor PCB bolted directly to the flange and I could adjust timing by rotating the flange.



The next motor was a Turnigy Multistar 4822. It didn't have anywhere on the motor I could mount to, so I had to include mounting features on the plate that the motor was going to be mounted to.



These PCB's are simple, small, and cheap (less than $2 each). Since they are so cheap I can afford to splurge on the hall sensors and get top of the line Honeywell SS360's at $1.44 each from Digi-Key. The sensor board requires 5 connection points: power, ground, and 3 hall sensors. Pull-up resistors need to be included somewhere in the circuit, I like using the internal pull-up resistors in the atmega microcontroller. Good PCB practice also dictates that you include a ~0.1uF decoupling ceramic capacitor between Vcc and GND.

The hardest part about this whole thing is getting the sensors in the correct position. You will need to know the middle diameter of the magnets which requires either having the motor on hand to measure or a detailed drawing of the motor. You also need to know the number of magnets (sometimes called poles) or pole pairs (half of the number poles). From the pole pairs you can calculate the angular spacing between the sensors with the equation

360 deg / (3*pole pairs)

In the case of the Turnigy Multistar 4822, which is a 22 pole motor

360 deg / (3*11) = 10.909 deg

This is how far each sensor is rotated around the center of the mounting circle from its neighbor. From here it's just a game of sines and cosines and the mounting diameter to calculate the coordinates of each sensor to place them on the board. The amount of adjustment you need for timing to guarantee you can get the sensors lined up properly should be at minimum the same number of degrees that the sensors are spaced at.


Hopefully this is all the information you need to design your own hall effect sensor PCB for your motor. If your motor happens to be one of the two featured in this post, you are welcome to use my designs here and here. You can even order them straight from OSH Park here and here. If you want help designing your own feel free to email me and I'm sure we can work out a deal.

5 comments:

  1. is it possible that your equations are wrong?

    (3*360 deg) / (11) = 10.909 deg is not correct. the result would be
    3*360= 1080, 1080/11 = 98,181818 ....

    where is the mistake?

    ReplyDelete
    Replies
    1. (360deg)/(3phase*11polePair) = 10,909degrees.

      Delete
    2. Sorry for the delay updating this. The 10.909 degrees is the right number, the 3 should be in the denominator.

      Fixed now.

      Delete
  2. should we calculate rpm with this motor and what is max range of bdcl motor

    ReplyDelete
  3. Thanks for your post. I beleive that the field lines from the magnets will be parallel to the PCB, but the sensors you have chosen expect them to be perpendicular to the components?

    ReplyDelete