Shop OBEX P1 Docs P2 Docs Learn Events
Anyone used the MLX90316 Hall Effect Position Sensor IC or similar? — Parallax Forums

Anyone used the MLX90316 Hall Effect Position Sensor IC or similar?

T ChapT Chap Posts: 4,223
edited 2015-01-06 15:32 in General Discussion
http://www.melexis.com/Position--Speed-Sensors/Triaxis%C2%AE-Hall-ICs/MLX90316-566.aspx

I am looking for a solution to do the following for use with a Propeller:

A metal knob (or dielectric material that can be used for touch sensitive IC like Qprox capacitive).
The knob will need infinity rotation, no detents, smooth rotation with ball bearings or similar very smooth feel.
A magnet attached to the end of the shaft that the knob sits on.
A Hall effect position sensor IC ie the MLX90316 or I2C variant preferred.

The goal is to touch the knob, which clears any angular output to 0.
If you touch the knob, the Propeller will tell the GUI that the knob has been "touched" and the GUI will be set to read inc/dec values starting at 0.
If you turn the knob to the RIGHT, you get an output by any measure that can be used to tell a GUI that there is some increment amount.
If you turn the knob to the LEFT, you get an output by any measure that can be used to tell a GUI that there is some decrement amount.
If you remove your finger from the knob, the output goes back to 0(Qpox or other method detects touch removed),
and the Propeller will tell the GUI that the knob has been "released"

One question is, if you reset the Hall Sensor, does the angular value reset to 0. I assume this is true, since the device appears to use "relative" angular change, based on the starting point.

Next, does the IC have a center detent value, so that there is + and - capability for angular change ie 0 to 180, 0 to -180. If not then hopefully there is a way to have the Prop convert the negative angle to a decrement output.

The last thing to handle is, how to get a metal knob to conduct through a shaft and ball bearing. I will test the conductiveness today from the ID to the OD of a sealed ball bearing. There is grease inside the ball bearings, but it is possible that the housing and shield will be conducting.


A quad encoder knob would be ideal except all the ones I have seen have detents, if anyone knows of a type that does not have detents and is continuous rotation, that would be nice to see. The issue with a pot or rotary encoder is how to get a wire attached to the metal knob. The path through a bearing seems doable.

Any thoughts or suggestions appreciated. There could be an easier approach to getting an inc/dec value than, especially since I don't care about angles, only that I can output a inc/dec value proportional to the rotation, and scale the rotation to the resolution of output as needed. For example, I may want to turn 1 degree for +1, or turn 10 degrees for +1, the Prop code will have methods select what the output scale is as needed.

Edit: A standard sealed bearing reads all over the map from 1ohm to meg ohm as you turn it. So this concept of Qprox reading through the bearing to the knob has to be rethought.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-06 07:54
    T Chap wrote: »
    One question is, if you reset the Hall Sensor, does the angular value reset to 0. I assume this is true, since the device appears to use "relative" angular change, based on the starting point.

    I haven't used those particular sensors but after reading a bit about them, I'm pretty sure the sensor doesn't reset its angular value to zero. But this should be very easy to do in software.

    I've used these AMS5055 sensors.

    attachment.php?attachmentid=103278&d=1376239687

    I think post #24 of the software thread has the best video of that particular thread.

    The image above is from the hardware thread.
    T Chap wrote: »
    Next, does the IC have a center detent value, so that there is + and - capability for angular change ie 0 to 180, 0 to -180. If not then hopefully there is a way to have the Prop convert the negative angle to a decrement output.

    My guess is the device gives you a 12-bit angular position value. You'd need to keep track of the change in value to figure out if it's incrementing or decrementing.
  • T ChapT Chap Posts: 4,223
    edited 2015-01-06 08:02
    Thanks Duane, that is interesting what you are working on. If the position is absolute, even after power off the position always comes back the same, I suppose there is a way in code to simply compute if there was a change +/-, so it may not matter what the angle is.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-06 08:09
    T Chap wrote: »
    Thanks Duane, that is interesting what you are working on. If the position is absolute, even after power off the position always comes back the same, I suppose there is a way in code to simply compute if there was a change +/-, so it may not matter what the angle is.

    Agreed.

    It looks like the Melexis sensor requires diametrically magnetized magnets. These are different than the commonly available round magnets.
  • DomanikDomanik Posts: 233
    edited 2015-01-06 11:09
    For your touch detector, you can run it into a cheap op-amp operating open loop, with a 10meg to ground in parallel with the input. Anytime it’s touched you’d get a 60Hz square wave on the op-amp’s output, this could be rectified into a one or zero logic level. You might also connect a diode and 10k resistor on the other input to act as a 0.6V threshold detector.
  • tonyp12tonyp12 Posts: 1,951
    edited 2015-01-06 14:00
    No movement for 2seconds counts as not being touched? is that good enough?
    At power up or after no movements a software counter use current hardware degree the new 0 soft degree.
  • T ChapT Chap Posts: 4,223
    edited 2015-01-06 15:32
    Tonyp12 that is not an option, I need the closest thing to 1ms reaction time on touch and release as that is the scan time for the USB device.

    I like the resolver, I will research that idea. The problem still remains of having a touch sensitive knob that is infinity turns so it does not require reset. I will also test an idea of a non sealed ( exposed ) ball bearing and conductive grease. This may give a consistent resistance through from a fixed shaft through the bearing to the metal knob.

    http://www.mcmaster.com/#1219k57/=vcr131

    http://www.mcmaster.com/#standard-ball-and-roller-bearings/=vcr33s
Sign In or Register to comment.