Shop OBEX P1 Docs P2 Docs Learn Events
hall effect sensors — Parallax Forums

hall effect sensors

cavelambcavelamb Posts: 720
edited 2012-09-10 21:20 in Propeller 1
Anyone who has played with these things knows that there are a bewildering number
of variations on that theme.

I found this guy. It's a 5v chip, but the output seems like it might work with the prop.

With no magnetic field the output hovers about 1/2 of supply voltage.

A magnetic south causes the output to go low.
A magnetic north causes the output to go high.

So 2 pins set as inputs, if not high and not low, then no go.
If one of the pins goes high there is a magnetic field within range.
Which pin tells which polarity.


Input resistors as for 5 volt inputs?


http://wiki.bildr.org/index.php/Linear_hall_effect_sensor_-_A1321

Comments

  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-09-09 18:29
    If magnetic polarity does not matter, may be simplest to put output into a window comparator. Set output to H/L (your choice for purpose) when magnetic field present or not. I would do it that way if it will ever be built by someone else just in case they install the magnet in the wrong orientation; i.e. if you are looking for a high because you designed it to see that polarity and ignored the other way, well when the magnet is installed wrong, the circuit fails.....

    I don't think I would trust the thing to be floating in the deadband to give entirely accurate output results in all cases. could be wrong........
  • cavelambcavelamb Posts: 720
    edited 2012-09-09 21:30
    If magnetic polarity does not matter, may be simplest to put output into a window comparator. Set output to H/L (your choice for purpose) when magnetic field present or not. I would do it that way if it will ever be built by someone else just in case they install the magnet in the wrong orientation; i.e. if you are looking for a high because you designed it to see that polarity and ignored the other way, well when the magnet is installed wrong, the circuit fails.....

    I don't think I would trust the thing to be floating in the deadband to give entirely accurate output results in all cases. could be wrong........

    That's what the data sheet says it does.
    I don't think a resistor divider to center the pin is necessary.
    The chip has plenty of drive power.

    At least it doesn't have to have an opposite polarity transition to release
    like the latches do!
  • MJBMJB Posts: 1,235
    edited 2012-09-10 01:45
    If you are not really interested in the actual analog value of the magnetic field
    you can use switch types instead of analog types.

    Allegro has many of them.
    There are even 2-pole variants that supply a different current based on field vs. no field.
    Having a correctly dimensioned low shunt resistor gives you high or low input for prop

    MJB
  • cavelambcavelamb Posts: 720
    edited 2012-09-10 10:45
    MJB wrote: »
    If you are not really interested in the actual analog value of the magnetic field
    you can use switch types instead of analog types.

    Allegro has many of them.
    There are even 2-pole variants that supply a different current based on field vs. no field.
    Having a correctly dimensioned low shunt resistor gives you high or low input for prop

    MJB

    Thanks MJB,

    I spent the morning digging through the Allegro site.
    They have a lot of stuff there. But I didn't see anything there that was more attractive than the piece I already had an eye on.

    But I did find a link to some others that I had not seen before.

    At first glance this one looks like a possible winner. APE9101 by Advanced Power?
    Data Sheet http://www.a-power.com.tw/files/AP_ProductData/PD_File/APE9101.pdf

    Not latched, but output stays valid until flux drops below the release point.
    Automatic polarity set up.
    Supply voltage 2.4 to 5 vdc (!)
    Input current - max 4 ma. A lot less when sleeping.
    Single output pin with no funny stuff.
    SOT-23 package.

    Looks like the only downside could be the repetition rate?
    The data sheet lists Period (Tperiod) as 70 to 120 ms.
    (But then never show what they mean by Tperiod)

    If I'm reading the tea leaves right, worst case should be about 500 RPM.
    (maybe as much as 850 RPM, depending on the device).

    After all the time spent researching this I'd really like for it to work.
    But my confidence level is not all that high.

    I keep wondering if a photo transistor and a light source could do the job as well.
  • lyassalyassa Posts: 52
    edited 2012-09-10 14:56
    Try the circuit below. For the Propeller, voltage lower than 1.6 is logic 0, higher than 1.6 is logic 1.


    When there is no magnetic field near by, the voltage at p1 is 2.5v (high or 1) and p2 is 1.1v (low or 0).
    With South pole near by, the hall output drops. P1 is low, and p2 is low.
    With a North pole nearby, both P1 and P2 are high.

    Of course you need to take into account interfacing 5V to 3.3V propeller. I think 1K resistor in between is good enough.
    The circuit below is not tested. Just off the top of my head. The resistor shown below can be 10K.
    Pardon the circuit drawing. Did it in Paint.

    ci.jpg
    177 x 197 - 7K
  • cavelambcavelamb Posts: 720
    edited 2012-09-10 21:20
    lyassa wrote: »
    Try the circuit below. For the Propeller, voltage lower than 1.6 is logic 0, higher than 1.6 is logic 1.


    When there is no magnetic field near by, the voltage at p1 is 2.5v (high or 1) and p2 is 1.1v (low or 0).
    With South pole near by, the hall output drops. P1 is low, and p2 is low.
    With a North pole nearby, both P1 and P2 are high.

    Of course you need to take into account interfacing 5V to 3.3V propeller. I think 1K resistor in between is good enough.
    The circuit below is not tested. Just off the top of my head. The resistor shown below can be 10K.
    Pardon the circuit drawing. Did it in Paint.

    ci.jpg



    That would depend on the sensor.
    What's ya got?
Sign In or Register to comment.