Shop OBEX P1 Docs P2 Docs Learn Events
Glitches on a Hall Effect Sensor — Parallax Forums

Glitches on a Hall Effect Sensor

John BondJohn Bond Posts: 369
edited 2005-03-11 14:36 in General Discussion
Hi Guys
·
I'm using a hall effect sensor to monitor whether a 230V motor is running. This is part of a BS2p data-logging excercise. Checking if the motor is running works well so I want to increase the functionality of the logger. I·would also·like to know how fast the motor is running. The speed of the motor is controlled by an inverter.·It is important for safety reasons that this device is not connected electronically to the motor circuit and the Hall Effect IC is already in place.
·
The Hall Effect sensor·drives an opamp comparator and I thought of using this output to measure the frequency of the changing magnetic flux. This way I'd know the inverter frequency and have a good idea of the motor speed. When the motor is running, the Hall Effect sensor puts out a rather distorted sine wave·either side a·voltage of 2.5V but this is no problem. The problem is that, as the·wave passes through the center 2.5V voltage, there are a series of higher frequency glitches which the opamp faithfull reproduces. I need a simple·low pass filter.·The range of the inverter is from 30Hz to 600Hz so I guess the cut-off frequency of the filter·will be·about 2K Hz so as to suppress the spikes. The trouble is that·I know·very little about·filter design.

Please help

Kind Regards from Kwa Dukuza


John Bond

Comments

  • NateNate Posts: 154
    edited 2005-03-10 23:05
    John,

    Do you have a O'scope screen shot of the noise and surrounding sine wave that you could post?

    nate
  • paysonbadboypaysonbadboy Posts: 81
    edited 2005-03-11 04:37
    Wierd. when I was working with my EFI idea for my ATV I used a hall Effect Sensor on my cam gear and it seems to put out good square waves. They were so small tho so I too used a op amp. The stamp seemed to trigger fine with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.paysonarizona.net/
  • John BondJohn Bond Posts: 369
    edited 2005-03-11 07:58
    Hi Guys

    Nate - The signal looks like the image below. (Sorry about the poor picture but PC Oscilloscopes haven't reached Kwa Dukuza yet). If you strain your eyes a little, you can see the glitches.

    I'm working with an analogue Hall Effect Sensor, Not a Hall Effect Switch. They look similar but the output voltage from this device·is proportional to the magnetic field.

    The question is, how do I remove this trash in the signal.

    Kind Regards from Kwa Dukuza

    John Bond
    2048 x 1536 - 291K
  • NateNate Posts: 154
    edited 2005-03-11 10:57
    John,

    I asked for a O'scope shot because I wanted to see the signal to see if a low pass filter really would remove the noise.· I can't see the noise clearly, but I think it might be worth a shot with a low pass to see what the filtered signal would be.·

    (EDIT-- I am kind of assuming you are trying to get the magnitude of the noise lower than the sine wave, and then using a uP to count the peaks of the sine wave.· PasonBadboy has a point that a Hall effect switch would work better for this, but you might have a reason for wanting to have a signal that is actually proportional to the current.· Be aware that noise is a b**** to get rid of, and no filter, much less a single stage one, has a "brick wall" at the cut-off frequency.· People spend their lives trying to get rid of "trash" from siganls, and no one has discovered a perfect and cheap way to do it yet, that I·am aware·of)

    I don't know how much you know about RC filters, so I'll make it simple:· A single stage RC filter simply has the signal fed to a resistor and capacitor in series.· The output of the filter is the voltage over the capacitor.· The cut-off frequency (in Radians/Sec) of a single stage, low pass filter is defined simply as 1/(R*C).· So if you wanted a cut-off frequency of 2 kHz (12566 Rad/Sec), you could use a 1 uF capacitor and a·79 ohm resistor.· Or you could use a .1 uF capacitor and a·795 ohm resistor.· And so on.· Make sure the capacitor is of a non-polarized type (you are feeding it a sine wave) and·is rated for your voltage.

    If you need more info or a circuit diagram, let me know.· I'm interested to see what the results of this are, please keep us posted.

    regards,
    Nate

    Post Edited (Nate) : 3/11/2005 11:41:13 AM GMT
  • John BondJohn Bond Posts: 369
    edited 2005-03-11 12:07
    Hi Nate

    Thanks for your very quick response.

    You're quite intuitive, The noise peaks were almost as big as the signal.

    I'm measuring quite small changes in the magnetic field. I tried Hall Effect switches first but they were far too insensitive. Even with the analogue sensor, the signal peak to peak is less than 50mV (16 Gauss magnetic field - the switch needed more than 300 Gauss). This is sufficient to switch an opamp but susceptible to the noise. It turns out that the noise isn’t even coming from the sensor but from my power supply.

    I have limited knowledge of filters but by working empirically, I found that a 2.2.uF cap and an 18K resistor reduced the noise P to P to about 10mV. Your component values have therefore solved my filter problem. (I’ll trek into Durban tomorrow to get the caps)

    The technical notes suggest a small 3mm metal rod behind the sensor to increase its sensitivity. I reasoned that bigger P to P signal equals less problems from noise. This also worked very well and surprisingly, the amplitude of the noise also decreased (this confused me).

    I now have a workable speed-measuring tool to add to this data logger.. Thanks a lot!

    Kind Regards from Kwa Dukuza

    John Bond
  • NateNate Posts: 154
    edited 2005-03-11 14:13
    John,

    Glad your circuit is working out.· Note that when calculating your components for the filter, the cut-off frequency has to be in Rad/Sec (I miscalculated the first time through).

    Remember to size your R/C combination so that the current demand of the filter is less then the rated current output of the Op-Amp (bigger resistor/smaller cap =·less current demand).

    Running the values you used in your filter (2.2 uF and 18 kohm) I get a cut-off frequency of 4 Hz.· Either I am making a mistake (very possible) or the circuit is mitigating your noise through some other electrical phenomena.· But if it works, it works.

    Nate
  • John BondJohn Bond Posts: 369
    edited 2005-03-11 14:36
    Hi Nate

    Thanks a lot for your assistance, My circuit looks like this. I'm not sure if this a low pass filter. The sensor can sorce or sink 1ma.


    Hall Effect >
    /\/\/\/\---o---/\/\/\/\
    >Stamp
    1K l 18K
    l
    ---- 2.2uF
    ----
    l
    l
    o
    Ground

    I don't have access to the net over weekends so I'll give you an update in the morning.

    Kind Regards from kwa Dukuza

    John Bond
Sign In or Register to comment.