Author Topic: Hall sensor jitter on dc motors  (Read 4857 times)

0 Members and 1 Guest are viewing this topic.

Offline qpit3aTopic starter

  • Contributor
  • Posts: 43
  • Country: au
  • Electronics hobbyist.
    • Not really about trains
Hall sensor jitter on dc motors
« on: November 12, 2021, 12:13:08 am »
Hi,

I have been attempting to use the hall sensors on a robot motor to keep the speeds of two motors in step.  I am using interrupts on a KL25Z to determine the pulses and I have checked that I can measure frequencies way higher than the pulse rate would be.  However my issue is that the signals from the sensors jitters and has high frequency noise (the high frequency noise might be causing my interrupts to trigger incorrectly I guess) . So my questions is if I pay enough money can I expect to be able to get clear motor speed readings, ie should I be able to control the speeds of two motors for a robot using the output of the hall sensors?   Do I perhaps need to process the pules maybe a Schmitt trigger or something?  Is there a recognized good brand of motors with sensors? 

Thanks for any help.
Peter Cupit
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Hall sensor jitter on dc motors
« Reply #1 on: November 12, 2021, 12:15:14 am »
I would start by trying a low pass filter on the signal from the hall sensors. A very simple passive filter consisting of a resistor and a capacitor ought to do.
 
The following users thanked this post: Smokey, qpit3a

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6958
  • Country: ca
Re: Hall sensor jitter on dc motors
« Reply #2 on: November 12, 2021, 04:04:36 am »
Another issue can be the Hall sensors picking up the motor's PWM from their magnetic field. It will radiate some switching noise. You can try a shield (steel) on the back of the Hall or move it and its magnet somewhere else.
It could also be the wiring to the Hall sensors, that must be kept far away from the motors' wiring. If there is a pullup resistor on the interrupt line, make sure it's not too high value. I would start with a 10-33nF cap to GND on the signal.
It takes some time to figure out the source of the interference.
 
The following users thanked this post: Smokey, qpit3a, I wanted a rude username

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3341
  • Country: nl
Re: Hall sensor jitter on dc motors
« Reply #3 on: November 12, 2021, 11:14:38 pm »
Start by using an oscilloscope on your hall sensor signals.
Maybe it's even "mechanical" such as an eccentric magnet disc or differences in the strength of the magnets.
 
The following users thanked this post: qpit3a

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Hall sensor jitter on dc motors
« Reply #4 on: November 13, 2021, 12:29:25 am »
Hall sensor jitter should be insignificant compared to motor speed.  Hall effect sensors are slow, but motors are even slower.
 
The following users thanked this post: qpit3a

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Hall sensor jitter on dc motors
« Reply #5 on: November 13, 2021, 04:08:08 am »
There are all kinds of other sources of glitches. Microcontroller interrupt pins are very fast and DC motors are notoriously noisy electrically speaking. It may not be the hall sensor at all that is causing the jitter, but noise being picked up by the wiring. Either way a low pass filter is a good place to start.
 
The following users thanked this post: qpit3a

Offline Power-Electronics

  • Contributor
  • Posts: 24
  • Country: us
Re: Hall sensor jitter on dc motors
« Reply #6 on: November 13, 2021, 02:42:53 pm »
Assuming that the Hall sensor has an open-collector output, did you connect a pull-up resistor?
« Last Edit: November 13, 2021, 03:27:37 pm by Power-Electronics »
 
The following users thanked this post: qpit3a

Offline qpit3aTopic starter

  • Contributor
  • Posts: 43
  • Country: au
  • Electronics hobbyist.
    • Not really about trains
Re: Hall sensor jitter on dc motors
« Reply #7 on: November 30, 2021, 08:26:03 pm »
I didn't but will try that. One issue I have found is just the leads I am using are often bad connections, so moving them causes issues.  I am going to make all the leads myself.  Also using linear power supplies and 0.1uf across motor power helps.   
Peter Cupit
 

Offline Power-Electronics

  • Contributor
  • Posts: 24
  • Country: us
Re: Hall sensor jitter on dc motors
« Reply #8 on: November 30, 2021, 09:20:04 pm »
If the leads make that much of a difference, then wouldn't that suggest that the outputs are probably floating?
« Last Edit: December 01, 2021, 01:45:02 am by Power-Electronics »
 
The following users thanked this post: qpit3a

Offline qpit3aTopic starter

  • Contributor
  • Posts: 43
  • Country: au
  • Electronics hobbyist.
    • Not really about trains
Re: Hall sensor jitter on dc motors
« Reply #9 on: January 24, 2022, 10:43:58 pm »
Biggest problem was the type of level shifter being used.   (even after putting pull up resistors on the hall outputs).  Using a bi-directional TXB01008 one causes wierd stuff to occur.  The simple ebay uni-directional shifter works ok.
Peter Cupit
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf