Trouble with hall effect sensors for RPM counting (tachometer) - Page 1
Forum section: electronics / beginners

author: ttodorov
author_rank: Regular Contributor
timestamp: June 07, 2018, 09:06:06 am
content: Hi everyone,I have a small desktop CNC and want to add an RPM display to show the spindle speed. So I thought to superglue a small neodymium magnet to the top end of the shaft and have a hall effect sensor create PWM pulses to be counted by a small MCU and displayed on a 7segment display driven by a MAX7219. The circuit is very easy and there are tons of projects on the Internet to copy.First I tried the obsolete A3144 and thought everything worked great, until I realized that the reported RPM is way too low for given motor supply voltage. I verified that by comparing the counted pulses by the MCU with the frequency counter of my oscilloscope - they agreed totally. Then I tried to use the also obsolete AH49I. That one outputs an analog value at a bit lower than half of the supply voltage when no magnetic field is near and goes close to one of the supply rails when one or the other pole is detected. I put in a TS861 comparator to produce a clean PWM and the circuit worked again, except the readings were off too. At first I thought that the comparator didn't have the bandwidth, but then I decided that neither hall sensors were sensitive/fast enough for my application. So I ordered some TSH193 and TSH188, which according to their respective datasheets are designed for BLDC motors, speed sensing, and revolution counting among others. I surely hoped those would be fast enough... But no. I tried to see, if anywhere in the speed range of the DC motor the measurements with the hall effect+oscilloscope would align with what a digital laser tachometer shows, but neither high, medium or low speed were similar.Here are some examples taken while using the TSH193:- 2V motor supply, digital laser tacho gives 550 RPM, the oscilloscope is measuring 9.1 Hz PWM from the hall effect sensor- 3V motor supply, digital tacho gives 850 RPM, the oscilloscope shows 14.3 Hz PWM from the hall effect sensor- 5V motor supply, digital tacho gives 1500 RPM, the oscilloscope shows 25 Hz PWM- 10V motor supply, digital tacho gives 3000 RPM, the oscilloscope shows 50 Hz PWM- 15V motor supply, digital tacho gives 4500 RPM, the oscilloscope show 76.9 Hz PWMI have attached a few screenshots captured from the oscilloscope, which show a very clean PWM with 50% duty cycle in all cases. And while the proportional differences between measurements for each motor voltage step are kind of close enough, I am still wondering - is it me doing something wrong with the hall effect sensor, or have I chosen the wrong sensor for the job? Has anyone seen similar issues in their work, or have a guess how to fix this?As a last bit of info - my top motor speed is 21 000 RPM so I am looking for a hall effect sensor able to measure that kind of speed. Recommendations welcome!Thanks for your help!

author: capt bullshot
author_rank: Super Contributor
timestamp: June 07, 2018, 09:11:45 am
content: There's nothing wrong with it:rpm = 60 * frequency (in 1/s)so just multiply your frequency readout by 60 to get the rpm value.

author: ttodorov
author_rank: Regular Contributor
timestamp: June 07, 2018, 09:41:22 am
content: I just cannot describe how dumb I feel right now...

author: Dubbie
author_rank: Unknown
timestamp: June 07, 2018, 11:06:55 am
content: Lol. This is something I can imagine myself doing. Don’t feel bad, we’ll never mention it again.