Shop OBEX P1 Docs P2 Docs Learn Events
Hall Effect Sensor Help — Parallax Forums

Hall Effect Sensor Help

Twisted PairTwisted Pair Posts: 177
edited 2007-12-21 15:24 in General Discussion
I need help to figure out if this will work. I wish to replace an exsiting potentiometer used as a voltage divider, with a Linear Hall effect sensor. The exsiting pot·varies the voltage going into the control voltage pin on a 555 IC chip, which in turn controls the direction of a RC servo. The servo only rolls ninety degrees in each direction. I'm looking at the Allegro A1301KUA-T.... Will this sensor replace and act like my exsiting potentiometer ? The reason for replacing the potentiometer is that the turning torque on the pot is to much and this does not allow my wheel on a shaft to turn freely. I have attached a rough drawing of my shaft & wheel assy which shows the exsiting pot along with the concept Hall sensor. Also included is a PDF of the Linear Hall effect sensor information.
750 x 529 - 32K

Comments

  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-11-16 19:14
    Twisted Pair,

    I do not expect the Hall sensor will deliver a linear output change as your shaft is rotated using the mounting configuration shown. I think you may need to mechanically change the shaft rotation into a linear displacement of the magnet or sensor to improve the linearity of the output signal.

    Also, the original pot produces its most extreme signals (either high or low) near the ends of the 180 degrees of travel. Since the lines of flux for your magnet are not drawn I am unsure if it is axially or diametrically magnetized. This will make a difference. If the magnet has poles that are aligned axially, its placement on the rotating wheel will result in central high signal level (or low depending on pole orientation) around the center position that then tapers back toward half the supply voltage regardless of direction. The direction of travel will be indistinguishable. If the magnet has poles that are diametrically aligned, its placement on the rotating wheel will result in a steeply changing region near the center of travel with signal levels that taper back toward half the supply voltage as the outer limits of rotation are reached. Basically, as soon as the physical edges of the magnet have passed the sensor the signal level will begin to return to the quiescent voltage. For this device, that is equal to about half of the supply voltage.

    I do not think that either outcome is what you want. However, if you mechanically change the rotation of the shaft into a linear displacement of the sensor between opposite poles of two magnets and provide some means of adjusting the signal gain so it matches that of the original pot, then I think it just might work. At least the theory would then seem sound to me. Others may have more insight.

    - Sparks
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-16 21:29
    Sparks,

    Thanks for the reply. I have attached a re-hashed drawing of my exsiting setup, minus the pot and with a flat magnet shown mounted flat against the side of the wheel. The position of the magnet centerline is aligned with the Hall sensor centerline, thus this should give me an output of 2.5 volts from the sensor if the supply voltage to the sensor is 5 volts. The volts rise gradually with the approach of the magnets south pole while the approach of the north pole gradually decreases the volts down to near zero. Would this be correct ? The flat magnet shown is for demonstration but round ones can be used if needed. Is a particular kind of magnet recommeded for use with the hall effect sensor or will any type of magnet·work ? In regard to the Hall sensor, it could be moved under the wheel for better linear results if needed. Is this what you meant by making the shaft linear ? In the drawing, I have the Hall sensor mounted to the fixed support bracket. I had planned on inserting a round magnet through the wheel towards the sensor. Is that an incorrect way of mounting it ? Sorry about all the questions but this is my first time working with Hall effect sensors. Is there more data, schematics or information on these great devices anywhere ?·I forgot to mention in my first post that the wheel must freely rotate to find earths center by means of a weight that is attached to the wheel. The stiff turning exsiting pot does not allow this to happen, hence the reason for wanting to use the Linear Hall effect sensor.

    Twisted Pair....


    Post Edited (Twisted Pair) : 11/16/2007 9:42:20 PM GMT
    750 x 529 - 32K
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-11-16 22:57
    Twisted Pair,

    I need to dash off right now but I think I grasp what you are trying to do. You are making some kind of electro-mechanical stabilizer, right?

    You may not need a directly linear response for that. By linear I mean that if you graphed the voltage output from the sensor against the position of the shaft the result would approximate a straight line as opposed to something with a distinct curve.

    What I think you need to remember is that the magnetic force is going to be greatest on the furthest pole faces of the magnet. If you start with the center position of the shaft or wheel and the center of the magnet directly over the sensor, the effect from both poles will tend to cancel each other out leaving you with a mid level voltage. (You already have this clearly understood.) When one pole or the other is close enough to saturate the sensor you will see either a maximum or minimum voltage depending on which pole is very close to the sensor. (You understand this as well.) My expectation is that once a pole passes the sensor and continues to rotate further away from the sensor the output voltage will tend to return again toward half the supply voltage as the pole face of the magnet moves further way. If that happens it will then be hard to distinguish whether or not the wheel has rotated more toward the center or more toward the limit of travel in a certain direction.

    I wish I could describe it better but I can’t with the time I have. However, if you were to use a bar magnet that was mounted through (or at least near) the center of the wheel, that should avoid the situation that concerns me most. (I tried to illustrate this by modifying your drawing slightly.) I think you want to devise a solution where either magnetic pole can rotate toward the sensor but neither one can rotate past the sensor. That is my main concern with my understanding of previous drawings.

    - Sparks
    750 x 529 - 32K
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-16 23:42
    Sparks,

    You have hit the nail right on the head. That is exactly what I'm making. Sorry that I didn't know what to call it earlier. You have explained it well and I understood your tutorials. I took a voltage reading using the exsiting pot and here are the results. Center postion of the servo arm = 2.5 volts....Ninety degrees left = 1.0 volts....Ninety degrees right = 3.5 volts....I will experiment with the magnets placement to get the best saturation angles after I figure out which magnet is best to use. Do you have any recommendations regarding the type of magnets to use and where to get them? I had planned on using small round ones and just mount them through the wheel towards the sensor. On one side of the wheel centerline would be a North pole while on the other side a South pole with gap between them for the quiescent voltage. The smaller the magnet the better. Another point that I forgot to mention is that the wheel may stop at any point from zero to ninety degrees, left or right, depending on how much the bracket holding the wheel is tilted. Will the Linear Hall effect sensor saturation levels pick up these small variations or will the swings be large ? These variations will be as small as one to·five degrees of tilt at times....Will the Allegro A1301KUA-T work for what I want it to do ?

    Thank You Sparks

    Twisted Pair....

    Post Edited (Twisted Pair) : 11/17/2007 12:17:23 AM GMT
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-11-21 19:34
    Twisted Pair said...
    Do you have any recommendations regarding the type of magnets to use and where to get them?
    Not really. I heard that a friend of a friend bought a nice magnet from magnet4less.com. I have no experience with them myself. Personally, I would probably start by pulling a small magnet out of something and use it for initial testing. Try to determine if you will need one bigger or smaller in size and stronger or weaker in intensity.

    Using two magnets might work as you describe and is probably worth exploring. It might be helpful for determining placement if you can somewhat visualize the magnetic lines of flux either mentally or with iron filings and paper. Unless you have a full comprehension of the mathematics for all the factors involved (I do not), you will likely need to try, test, adjust and retry until you get something that works for you. I think that what you are suggesting has enough merit to be worthy of exploration. I think there is a good chance this can be made to work!
    Twisted Pair said...
    Will the Linear Hall effect sensor saturation levels pick up these small variations or will the swings be large ?
    I would not know how to determine that without a lot more data. If it is too much, use a less powerful magnet and/or move the sensor further away. If it is too little, use a more powerful magnet and/or move the sensor closer.
    Twisted Pair said...
    Will the Allegro A1301KUA-T work for what I want it to do ?
    I can not say for sure. Based upon what I read and what I think you want to do, it seems like a good choice to me.


    - Sparks
  • parskoparsko Posts: 501
    edited 2007-11-21 19:48
    Twisted,

    I know Radio Shack as rare earth magnets that are about 1/8" dia x 1/8" long. I used them for a pick-up for the speed sensor for my dirtbike. It worked great. At around $2, local, you could have one tonight.

    http://www.radioshack.com/product/index.jsp?productId=2102642&cp=&sr=1&origkw=magnet&kw=magnet&parentPage=search

    I think that is the link above to what I used. It says 3/16, but I recall it being smaller...

    -Parsko

    PS - Call to make sure they have it first... I called 2-3 stores before I found one that had them in stock.
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-22 03:48
    Since my last post, I've done a lot of research regarding the types of magnets used with Hall Effect Sensors. It should be noted that there are many types of sensors and magnets that widely vary with each individual application. The data sheets are of great importance in deciding which is best for your needs. The magnets themselves seems to be straight forward but still have many characteristics which to choose from. These selections include but are not limited to Temperature Coefficients, Magnet Materials, Coercive Force, Magnetic Flux Density and the physical dimensions of the magnet just to name a few. The proper selection of the right magnet for your application will greatly enhance the sensors ability to operate within the parameters set fourth by the manufacture regarding tight slope curves and gain resolution. Along with the proper air gap, mounting of the sensor and magnet, your project should be long life and trouble free. Some of the best magnet choices for coverage of all areas regarding the above would be Samarium-Cobalt and Alnico 8, although you might select other types for your project depending on your budget. Algebra is used to calculate most of the individual areas mentioned above but it is not complicated when using the correct formulas. The bottom line here is to know what you want the Hall Effect to do, do the research on the components, do the math, build your project and enjoy.
    Sparks, your help has proved invaluable and I look forward to hearing more from you regarding Linear Hall Effect Sensors. Parsko, thanks for the link to Radio Shack but I didn't buy any magnets from them because there were no Data sheets for the magnets that they sell. They might have worked but since my project is a precision device, I needed magnets with high flux and strength. As I continue forward with my project, I will update this post accordingly.

    Twisted Pair....
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-24 01:44
    My Linear Hall Effect project is moving right along. Today I machined out the parts for the wheel assembly and of coarse I didn't make the ball bearings or the magnets. This is phase one of the project with much more to go. If anyone has comments, questions, help or advice, please feel free to do so. I'm sure that I will have many more questions soon. Thanks....

    Twisted Pair....
    750 x 367 - 35K
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-11-26 20:43
    Your assembly looks very nice. Let us know how well it works.

    - Sparks
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-28 00:01
    Thanks Sparks. I received my order of Hall Effect IC's today. I got a couple of A1301KUA-T's and A1302KUA-T's. These things are small. I hooked up a A1301 to my proto board and proceeded with some preliminary testing. It works great with the magnets I'm using. However, I'm still trying to clarify the differences in the output sensitivity of the two Hall Effect IC's. The A1301 has an output sensitivity of 2.5 mv/g and the A1302 is 1.3 mv/g. If I'm understanding these figures right, does the smaller sensitivity spec of 1.3 mv/g for the A1302, mean that there is less change in the Hall Effect plate for the same amount of magnetism and movement for the A1302 ?

    Twisted Pair....
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2007-11-28 20:03
    Yes. My understanding is that the A1302 will output a smaller voltage difference under the same magnetic field than the A1301. The A1301 should generate a larger signal variation in response to a given magnetic field than the A1302. As a result, the A1301 may therefore generate a usable output signal over a smaller distance range than the A1301 due to the fact that it will reach the high and low signal levels sooner.

    I expect that a tradeoff exists between the magnitude of the signal level variations and the useable working distance of the sensors to a magnet.

    - Sparks
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-11-30 13:24
    Ok Sparks, you were right once again. Two gold stars for you. I connected up the A1302 into my circuit today and began running some test on it's sensitivity range. The working distance/air gap when using the same magnets as on the A1301 is about .020" for the A1302, as compared to .045" for the A1301. The amount of rotational degree's required before a voltage change occurs is also less for the A1302. There is 22.5 degress difference between the two IC's. Since I had already machined out a wheel with a predetermined magnet placement for the A1301, simply exchanging the A1301 with the A1302 results in less change in reaction, or voltage change, for the same amount of wheel degrees needed in my project. A total of 180 degrees, 90 left and 90 right is needed, so when using the A1302 as a drop in replacement for the A1301, the A1302 drops back to the quiescent voltage level long before the wheel reaches its full 90 degree travel in either direction. If less rotational degrees were needed, I would use the A1302 with less sensitivity and of coarse, I would re-calculate the magnet placement for this IC....For now, it looks like the A1301 will work fine. Just my 2 cents worth....

    Twisted Pair....
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-12-20 19:58
    I've made more progress in getting the control block and pivot shafts machined out. Once the two Sensors are installed and connected to my circuit, I will be able to monitor and control both the Pitch and Roll of any device its mounted on. The two protruding shafts in the photo are used to fine tune the Sensors center position. More to come....

    Twisted Pair....
    450 x 450 - 12K
  • FranklinFranklin Posts: 4,747
    edited 2007-12-21 04:50
    Have you looked at this device? It talks SPI and is non contact and will read out in degrees. [noparse][[/noparse]url}http://forums.parallax.com/forums/default.aspx?f=5&m=236194

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Twisted PairTwisted Pair Posts: 177
    edited 2007-12-21 15:24
    Thanks for the link Franklin. That is a great IC chip. I will try to work it in my circuit in the near future, but for now, I will be using the Allegro sensors since I bought many of them just for this project. Have you tried the MLX90316 yet ?

    Thanks,

    Twisted Pair....
Sign In or Register to comment.