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.

DRV5032: Count the number of rotations of motor with hall sensor

Part Number: DRV5032

Hello,

I try to count the number of rotation of motor using DRV5032FADBZR sensor and atmega328p.

Sensor not detects the accurate count, gives me the wrong reading.

Rotation of the motor is 306 which I measured using digital tachometer but the hall sensor counts only 102 rotation.

Is there any option to get accurate result?

  • Hello Shivangi,

    Thank you for using the TI forum. Please see a related thread here: https://e2e.ti.com/support/sensors/f/1023/t/781634

    To sum up, latch devices are better suited for counting motor rotations (rotary encoding) than switches because the output state is held longer, and the DRV5032 does not have a very high bandwidth, which is probably why you are not counting all of the rotations.

    If this answered your question, please click the "This resolved my issue" button. Thanks!

  • Hello,

    thanks for the reply but I still have confusion

    Sampling rate of drv5032 is 20Hz that means it can detect 20 interrupts in one second, and according to my motor speed sensor need to detect maximum 6 count in one second,

    Sensor has  that capability then why it not count accurately?

    Any help or suggestion would be appreciated

    TIA

  • Hello,

    I see what you are saying. There are a few reasons this could be happening.

    The first thing to check is which version of the DRV5032 you have. If you are using the DRV5032FB version, then it only has a 5Hz sampling rate.

    Second, make sure that the strength of the magnet is strong enough to turn on the sensor for a long time. It is possible that the magnet is just strong enough to only briefly turn on the sensor when the strongest point of the magnet is facing the sensor. If the magnet is only just within the Bop range of the sensor then there could be two likely problems:

    The first problem is that the sensor may only be triggered sometimes, due to the Bop being right on the edge. To get around this potential problem, I would recommend trying the setup with the sensor closer to the magnet or with a stronger magnet.

    The other possible problem is that the output of the sensor may only change for a very short time, which may not be long enough for the MCU to detect the pulse. To get around this potential problem, I recommend using a latch device, which will hold the output state until the sensor sees the opposite magnetic pole.

    One other important thing to note is the difference between what the digital tachometer measures verses what the Hall device measures. I noticed that the digital tachometer is counting exactly 3 times what the Hall device is counting. The Hall device will be counting the number of magnetic poles it sees (either north, south, or both based on the sensor you selected and the physical layout). Based on your type of digital tachometer, you could be counting something other than the magnetic poles the Hall device is seeing, which event is likely occurring 3 times more often than what the Hall device is sensing.