This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV5013-Q1: Problems when designing magnetic encoder for BLDC motor controller

Part Number: DRV5013-Q1

Dear all,

I am designing a BLDC motor controller and because of the reduced size of the motor I have to use a magnetic enconder and employ 3 HALL sensors to determine rotor position.

I am reading some articles about how to choose the following critical parameters:

- Position and orientation of HALL sensors regarding rotor magnets.

- Sensibility of the sensors >> It has to be "more" than the maximum magnetc peak measured in that position.

- Angle between them >> Angle = (2 / number of rotor magnets) x 120

- Bandwidth >> BW > 2 x Number of poles per second.(at maximum speed)

My system features the following parameters:

- 16 rotor magnets.

- 18 stator inductors.

- 4000 RPM maximum.

- 16 mT maximum peak measured at sensors' position.

So according to this data my initial setup would be:

- Position and orientation: http://www.ti.com/lit/ds/symlink/drv5011.pdf , figure 16, first case showed.

- Sensibility of the sensors >> Maximum peak measured 16mT, so sensor choosed: DRV5013AG +- 6mT.

- Angle between them >> Angle = (2 / 16) x 120 = 15º.

- Bandwidth >> BW >> 4000 RPM / 60 = 66,67 RPS >> 66,67 RPS x 16 magnets per revolution >> 1066,67 magnets/second >> BANDWITH > 2x1066,67 = 2133 Hz. DRV5013AG features 30KHz.

Combination of 3 digital data has to encode a 60º by 6 allowed codes (000 and 111 are forbidden in the sequence).

My PCB looks like the following:

I am experimenting trouble regarding 2 points:

- When I spin the motor manually, I read 000 and 111 codes which are not supoosed to be allowed.

- Sensor on the right side is reading almost half the magnetic intensity compared to the other sensors. (I taught measurement only depends on Z axis, not XY orientation as well).

Could you please help me to solve this issue? Motor controller is reading forbidden codification and is not working properly. In addition, sizing sensors' sensibility is not easy if one sensors is reading half of what is is supposed to read...

What do you think?

Many thanks in advance!

  • Dear carlosgdj07,

    Thanks for choosing the TI forum. 

    Can you share how high above the sensor you've placed the motor, and how much overlap you're allowing on the sensors? Also, would it be possible to get a graphical truth table of how the hall sensors are sequencing?

    Regarding the third sensor showing a much different result, you are correct in that only the Z component of the field should matter here. A few things to look at here:

    - Can you check and verify that the third sensor matches the sensitivity of the other 2, i.e., that they are all the same variant of the device.

    - Can you ensure that the rotors are spinning level over the three sensors. If there is some small amount of offset, this could result in differing readings. 

  • Dear Carolus,

    I havven`t got the motor now cause my jobmates had taken it to the lab but I will come back to you with the sequence soon.

    Third sensor is the same reference as the other 2, double checked. In addition, I can guarantee concentricity of the sensors board with respect to motor axis and magnets of the rotor. The only difference as you can see, is that rotation of 180º on XY.

    I'm sorry, I did not understand this sentence of you:

    "Can you share how high above the sensor you've placed the motor, and how much overlap you're allowing on the sensors"

    Did you mean distance from sensors to magnets?

    What do you mean by overlapping the sensors?

    Thank you and best regards,

  • carlosgdj07,

    The 180° rotation should have no bearing on the measurement. 

    By "how high above the sensor you've placed the motor," I was asking about z-offset as below:

    By "how much overlap you're allowing on the sensors," I was asking where underneath the magnet you've placed the sensors:

    Also, one thing I noticed: in your description, you are calculating the placement for a 120edeg system, but then you say you are looking for 6 states inside of 60° degrees. This is why we should look at your sequencing, as your phases may be too tightly grouped.

  • Dear Carolus,

    Z offset is 3,2mm.

    Overlap between center of the magnet and the sensitive element of the sensors is 1,5mm.

    Maybe I'm little mistaken regarding the concept of electrical and mechanical degrees... My application is 3-phases BLDC motor and we wanted to know rotor position by hall sensors, this is clear.

    What it is not clear for me is, regarding aplication notes for applications alike, several strategys are followed to measure rotor position:

    - 3x Hall sensors placed at 120º geometrically.

    - 3x Hall sensors placed very close, at [ (2/nº poles) x 120].

    - 3x Hall sensors placed very close, at [ (2/nº poles) x 120] x N.

    What we are trying to use is the second option due to it minimizes PCB size, so I have followed this rule of thumb to know which angle I have to split them.

    Regarding I have 16 magnets in my rotor, I am assuming that the sequence is closed when 3 magnets have passed, it is 3x 22,5º = 67,5º, so I am obtaining a full 6-state codification each 67,5º.

    The point is, I understand that hall sensors have to be splitted 22,5º so that I will never had 000 or 111 sequence but, I have tried 22,5º and it does not work for me... I have those forbidden states cause quadrature of that 3 squared signals is not OK.

    What I wanted to know is theoretically, what would be the angle to split my sensors and why. 

    Could you please tell me if i am mistaken in my assumptions?

    Thank you very much and best regards,

  • carlosgdj07,

    According to your first thread, I thought you said the sensors were spaced at 15°, why are you now at 22.5°?

    The reasoning is this: for each mechanical rotation of the motor, it will turn 360°. This mechanical rotation is broken down even further into electrical rotations, which is divided by the number of magnetic pole pairs you place onto the shaft. Therefore, for the 16 poles you have placed here, you have 8 pole pairs, and will therefore see 8 full 3-phase sequences in one mechanical rotation of the motor. So, this means that a full electrical sequence takes place in 

    edeg = # mdeg / #pp = 360°/8pp = 45°

    This means that you will see a full sequence inside of 45°, not 67.5°. Also, as there are 6 states in the sequence, you can see that you should see a state change at 45°/6 = 7.5°

    Next, since this sequence is a 3-phase sequence, you need to find hall sensor placement that meets this, or

    Spacing = (mdeg/#phases)/ #pp = 120°/8pp = 15°

    So, the spacing between your sensors should be 15 degrees, for a total sweep of 30°

    Be aware that it is CRUCIAL to place the sensors mechanically as precisely as possible. Even a few mechanical degrees can mean several electrical degrees of error, and hence my original  request to see your waveform. If you are placing the sensors immediately under the poles of the magnet as shown above, this would easily cause the sequencing issues you mention. I would also advise you to make sure the sensors are aligned along the outside or inside edge of the magnet, as being directly under the magnet could also cause issues.

    Apart from this, I really need to see what your sequencing waveform looks like to better understand the issue here.