Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 5 1 2 3 4 5
#3225807 - 03/06/11 12:52 AM DIY hall sensor ...  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
I've been pretty lax in getting this particular project done. smile I wanted to replace the ultra-noisy cheap pots I used in the '109 with hall effect devices. The video below shows the prototype of the replacement.

I'll post detailed build pics later. The design is based on the work of folks like Sokol1(sp?). The whole thing can be built for about $5 each.



(and yes, the volt meter is very, very old. smile )

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
Inline advert (2nd and 3rd post)

#3225983 - 03/06/11 07:21 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Here's the parts you need:



The parts shown are a 22MM bearing (just a little shy of 7/8" diameter), two 1/4 x 1/4 neodymium magnets, an Allegro A1302 hall effect sensor and a Bic pen body.

Using a vice, carefully press in a short segment of pen body into the bearing - do NOT hammer it! The pen body plastic is very brittle. Steady force using a vice will "drift" in the pen body quite easily.

Next, glue the two neodymium magnets to opposite sides of the pen body - the magnets should be oriented N-S (they'd come together if the pen wasn't in the way). The way I did mine was to rest the magnet on the inner race of the bearing with a business card keeping it from physically touching the race. I then used "thick" CA (cyanoacrylate) to glue the magnets in place - have some kicker handy to speed up the cure process.

You should end up with something that looks like this:



Now you need to build the board that will hold the sensor in place. I used a small slice of copper clad perf-board. This holds the 3 pin connector and the A1302 very well.



Next, you want to get some 1/2" or 3/8" plywood and bore a 7/8" diameter hole in it using a forstner bit. Dont' bore the hole completely through - leave about 1/8" of material. Then drill a 1/4" hole using the same center as the 7/8" hole. I use a set-screw to hold the bearing in, but you could easily hot-glue it in if you're careful to keep the glue out of the bearing races. Tape the bearing in for now so you can align the hall sensor properly. A properly aligned sensor will fit in the center of the pen body with the magnets on either side of it.

You should end up having something that looks like this:



Assembled, it should look like this:





You can connect any kind of pushrod arm, gear, or whatever to the pen body - just don't apply too much side force to it. Too much side stress will crack the plastic. This setup gives 180 degrees of usable travel and works very well! The bearing size that you get should have an inner diameter just a tiny bit less than the widest point on the hexagonal Bic pen body. This allows for a very tight friction fit that doesn't require any adhesive to hold it in place.

You can easily custom design your own bracket for this - this was a simple prototype that proved out the technique and a refined version will end up in my '109 as well as a replacement for the pitch axis sensor I screwed up in my BRFS gimbal build. smile

Enjoy!

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3226256 - 03/06/11 05:13 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Thanks Troll. The A1302 is .164" wide, so anything with an inside diameter of say .170" or larger would be fine.

I built this thing to replace some really cheap and noisy pots that I used in the '109 build. It will replace any three wire pot.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3226385 - 03/06/11 07:40 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: May 2009
Posts: 122
Redhornet Offline
Member
Redhornet  Offline
Member

Joined: May 2009
Posts: 122
Instead of a Bic pen, could a solid piece of plastic rod be used or even a metal rod (say aluminum so it's not magnetic)?

#3226405 - 03/06/11 08:15 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
The advantage of the Bic pen is that it has an hex shape, so it makes it easier to glue 2 magnets to any two opposite flat surface. But you could just grind flat surfaces on a round tube and get the same results, but the flat surfaces must be perfectly parallel or I assume it might warp the magnetic field.
Even though Al is non-magnetic, I wonder if it does not interfere with a magnetic field.

#3226406 - 03/06/11 08:15 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Allegros A1302 are hard to come by. If I'm not mistaking that part has been discontinued.

#3226407 - 03/06/11 08:17 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
(But what was I thinking?? I forgot to congratulate Gene for this nifty mod!!)

Gene, the idea with the bearing... brilliant! thumbsup

#3226408 - 03/06/11 08:19 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
The bic pen body provides not only a flat surface to mount the magnets to, but it's hollow as well so the A1302 can fit inside it. You could use pretty much any non-ferrous material for the input shaft as long as it's hollow or has a pocket of some kind bored in the center for the sensor to fit.

You can buy the Allegro A1302 in the US from Jameco:
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1718743_-1

They're $1.29 in single quantities.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3226409 - 03/06/11 08:22 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Where did you hear that the A1302 had been discontinued? Jameco seems to have stock.

Thanks for the kudos aRareKindOfMonster, but I just took ideas from others to their logical conclusion. smile

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3226427 - 03/06/11 08:46 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Jameco? I will buy some then.

I tried digikey a while back and they were out (and still are).
Mouser doesn't sell them.
There were none to be had on ebay, so I assume - wrongly - that they were discontinued.
Glad to know I was wrong on this.

Thanks for the info.

#3226550 - 03/06/11 11:02 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
That's a good way to put it all together. I always struggle with mounting bearings!

The Allegro A1321 was discontinued, which may be the one that the 1302 is being confused with here. NA85 on the ubi forums mentioned that he had contacted Allegro, and said that they were expecting to have a replacement for the 1321 out at some point. The reason that the 1321 was desirable was its sensitivity, which is 5mV/G.

This leads me to another point. In the video the shaft is rotated almost 180 degrees to get from minimum to maximum voltage. I'm not sure what your application is Gene, but this sensitivity probably isn't the most suitable for a joystick, for two reasons. Firstly, the amount of rotation required (the average stick rotates between 20 and 45 degrees I think), and secondly the output will be sinusoidal (half of a sine wave anyway), rather than linear. Even if you use levers or gears to amplify the rotation of a stick's axis, you'll still have sinusoidal output.

This might suit your particular application, but for people looking to put the sensor in a joystick (Troll) I can suggest a few things.

A linear output is desirable for a joystick, as it outputs just like a potentiometer equipped stick, and you can then apply whatever sensitivity curve you need in-game. To get this, you need to get the sensor to read from minimum to maximum voltage over an angle of 40 degrees or less. Doing this ensures that the sensor is operating only in the linear section of the sine wave (well, pretty close to linear).

There are two ways of doing this - use a higher sensitivity sensor, and increase the sensor's magnetic flux. To increase the sensor's magnetic flux, you can use stronger magnets (higher N number), use larger magnets (thicker rather than wider I think), and place the magnets closer to the sensor.

When you're trying for a linear response, it's better to initially have too much sensitivity, because you can then decrease it by making some adjustments to the geometry of the sensor (eg space the magnets wider, or change the position of the sensor so it's not directly between the magnets), or even use only one magnet.

Anyone looking to replace an existing joystick's pot would need to measure the angle that each axis of the stick rotates over, and optimise the sensor for this angle. Doing this ensures that you get the full resolution of whatever analog to digital converter that you're using, rather than needing to 'zoom in' on the output curve, or put up with sinusoidal output, for something which is typically linear. Typically in flight sims people will either leave the sensitivity curve alone (linear) or decrease the sensitivity around the center of stick movement - which is exactly the opposite of what happens when your stick has part sinusoidal sensitivity.

#3226614 - 03/07/11 12:33 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Julian265, the setup I'm using doesn't use off the shelf joystick parts. It's all scratch built. I'm using a BI Plasma MM2 as the interface and the input curves can easily be adjusted. Keep in mind that standard pots have a 270 degree travel and most of that is wasted in joysticks that are using them.

The primary benefit here is a noise-less (electrically) system that doesn't cost an arm and a leg. A good quality pot can run well over $10 each.

I don't understand the linear vs sinusoidal thing though. If you've got a stop at 0 and a stop at 180, you're going to get a linear response line. Yes, if you go beyond the 0 and 180 points, it's going to go odd on you, but that should never happen with the kind of mechanical systems we're talking about. I suspect you may know something I don't however, so educate me! smile

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3226659 - 03/07/11 01:53 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jun 2007
Posts: 630
Ltfransky Offline
Sith Lord
Ltfransky  Offline
Sith Lord
Member

Joined: Jun 2007
Posts: 630
Peterborough, ON, Canada
The 1302s are linear output.


Please Heatware Me!

Ours is not to reason why. Ours is to do or die.
Tennyson

I have slipped the surly bonds of earth
And danced the skies on laughter-silvered wings..
Gillespie Magee, RCAF
#3226774 - 03/07/11 05:42 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Ltfransky
The 1302s are linear output.


Absolutely - the sensor's output voltage is linearly proportional to the magnetic flux (within it's operating zone anyway). However:

Originally Posted By: Gene Buckle
Julian265, the setup I'm using doesn't use off the shelf joystick parts. It's all scratch built. I'm using a BI Plasma MM2 as the interface and the input curves can easily be adjusted. Keep in mind that standard pots have a 270 degree travel and most of that is wasted in joysticks that are using them.

The primary benefit here is a noise-less (electrically) system that doesn't cost an arm and a leg. A good quality pot can run well over $10 each.

I don't understand the linear vs sinusoidal thing though. If you've got a stop at 0 and a stop at 180, you're going to get a linear response line. Yes, if you go beyond the 0 and 180 points, it's going to go odd on you, but that should never happen with the kind of mechanical systems we're talking about. I suspect you may know something I don't however, so educate me! smile

g.


If you rotate the magnets through 180 degrees around the sensor, the sensor's magnetic flux will vary according to a sine wave:



Of course you're only using the region between 90 and 270 degrees on the above graph, however you can see the slope of the line drops off as it approaches 90 and 270 degrees - in other words, you will have reduced sensitivity at the extents of stick travel. But you don't have to take my word for it: Get a protractor or other angle measurement device, start at minimum voltage and move the input shaft by 10 degrees or so, each time writing down the angle and voltage that you're getting. Then type the values into excel or other graphing program, and look at the curve you get. In the graph in my PDF, you can just see the sinusoidal influence, but my measurements were only taken over about 45 degrees of travel, or 22.5 degrees either side of neutral.

I'm not familiar with the BI Plasma MM2, and if it allows something like a lookup-table adjustment (or a curve to "linearise" a sine wave), then you'll be set. Maybe some windows/mac software already does this also? But for myself and others using the BU0836 or similar units, it's probably easiest just to get a linear response from the stick, and then apply your game-specific adjustments if needed. If for some reason (like for a throttle or knob) you need more than 45 degrees of travel, and linear response to angle, then the only way to achieve it is by using a look-up-table or carefully tuned sensitivity curve to eliminate the sine curve.

#3226824 - 03/07/11 09:49 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
I ordered some A1302 from EBAY it turned out that they were china manufactured clones (i checked from the markings and thay are similar to allegro by spec sheet) ,but they work really well the only strange thing is that i can't get full travel in other words by using a 12 bit A/D i only get around 690 to 3700 (wich is anyhow fairly good by being more than 3000 discrete positions) instead of ideal 0 to 4096, the sensor is placed right in the middle of the "BIC assembly" and i used 5x5x5 neodimium magnets I tested by spinning the magnet assembly freely 360 several times and i never exceed thoose values. I laso tried to increase flux by adding magnets but the result not change. Im already satisfied with this setup but i was wondering if this is normal.


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3226846 - 03/07/11 10:57 AM Re: DIY hall sensor ... [Re: ]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Troll
Hi Julian!
Really informative guide you made!

Still, I'm no electrics wizzard. Here is a product details leaflet of the hall sensors available to me.
https://www1.elfa.se/data1/wwwroot/assets/datasheets/mnSS400.pdf

Could you, or anyone, help me to find out if any of the sensors listed there are useable For this purpose?
The sensors you listed are switches - they turn on at a certain flux, and turn off at a different flux, and unfortunately unsuitable for our purposes! You need to look for *linear* hall effect sensors.

Originally Posted By: Troll

Edit:
OMG!!
I searched the site of the onlinestore with the best selection around here. Turns out they have the Allegro brand hallsensors, but they spelled Hall wrong, thus hiding them from a search for Hallsensors..!

Could the A1321 be used instead of the 1301?

https://www1.elfa.se/data1/wwwroot/assets/datasheets/07333925.pdf



Get the A1321 if you can as they're the most sensitive that I've seen available - I'm not saying that you can't make a good stick with less sensitive ones (many people do), but I am saying that higher sensitivity gives you more options regarding magnets, placement, distances, and more opportunity to be able to reduce the sensitivity to get the desired response, rather than having to possibly work around less than desired sensitivity. However, the A1321 has been out of production for a while, and I've heard of a number of people who haven't been able to get them. By the way, in the PDF you linked, the sensitivity is on page 5 up the top of the table. The options for the A1321/2/3 are 5, 3.125 and 2.5 mV/G in the "typical" column.

Last edited by julian265; 03/07/11 11:01 AM.
#3226854 - 03/07/11 11:15 AM Re: DIY hall sensor ... [Re: Bluedeath]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Bluedeath
I ordered some A1302 from EBAY it turned out that they were china manufactured clones (i checked from the markings and thay are similar to allegro by spec sheet) ,but they work really well the only strange thing is that i can't get full travel in other words by using a 12 bit A/D i only get around 690 to 3700 (wich is anyhow fairly good by being more than 3000 discrete positions) instead of ideal 0 to 4096, the sensor is placed right in the middle of the "BIC assembly" and i used 5x5x5 neodimium magnets I tested by spinning the magnet assembly freely 360 several times and i never exceed thoose values. I laso tried to increase flux by adding magnets but the result not change. Im already satisfied with this setup but i was wondering if this is normal.


Clones that perform to a certain spec are pretty common with electronic components.

By the sounds of it, your setup has less sensitivity than it needs to 'saturate' the sensor. If you have calibrated it so that the stick can reach 0 and 100% in games (really important!), and you're happy with the center position then you're all good - 3000 steps is plenty. The 1302 has a sensitivity of 1.3mV/G, compared to 2.5 for the 1301 - so if you did want to increase it, you have the option to, if 1301s are available. The linearity of the setup is purely set by the angle range that the stick moves through. Much more than 45 degrees (total) and you'll start to see variable sensitivity.

According to the spec sheet, the 1301/2 (like the 1321) output can be between 0.2 and 4.7V - which means you can't get the A/D converter to read less than 160 or more than 3850, even when you have plenty of magnetic flux. This just needs to be calibrated out in the operating system, unless you want to use a signal amplifier to get a true 0 to 5 V output.

#3226892 - 03/07/11 12:52 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
since these sensors are able to accept 6v power would this increase range? (linearity is already OK and centering is also, but I'm kinda curious)


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3227023 - 03/07/11 03:06 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
If memory serves, I was getting a range of about .13 to 4.93 volts out of the one I used in the video.

julian265, considering that most will use the "middle" 90 degrees of travel on something like this, is the fall off at the ends of the travel _really_ going to matter that much? Considering what the typical setup will lose just in mechanical slop, I suspect the difference would get lost in the noise. smile

The Plasma MM2 is an _awesome_ device. Unfortunately Beta Innovations is no longer in business. Something bent him sideways and he closed his doors - I've never gotten an explanation. The software will allow adjustment of the response curve though. Eventually I'm going to get the Arduino firmware written to allow you to use an Arduino Uno (or similar) as a control input device. That will also have the ability to tweak the response curves.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3227161 - 03/07/11 05:29 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
Even in an ideal situation you won't really get the full range without some conditioning circuitry. The Allegro sensors can only give you an output in a range from slightly above the 0V rail to slightly below the 5V rail. I believe that 0.5 to 4.5 Volts is the common output range. Usually the joystick's internal self calibration takes care of this, so on modern joystick you won't really notice it and the number of discrete steps will be really limited by the software. I suspect that modern joysticks sample the signal at a higher resolution than that of the values returned to the PC, in order to condition the signal and apply noise filtering.
Btw, very clean job Gene, looks very good. You might try to add a mild steel flux ring (a few wraps of steel wire on a wooden dowel?) on the outside of the magnets to provide some shielding and possibly increase the magnetic field between them. Since it would turn along with the magnets histeresys would not be an issue, though I realize it would make things a bit bulkier and complex.

Last edited by Brandano; 03/07/11 05:29 PM.
#3227170 - 03/07/11 05:32 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Quote:
Can I just cut the wires between the circuitboard and potentiometers, and solder the wires to the hallsensor instead..?


Yes, but observe that pinout in HALL sensor is different from pots.

Pots: +5v - SIGNAL - GND (invert +5v wires and GND to inverted response).

HALL (A1302 - front view): +5v - GND - SIGNAL (invert wires to get inverted response is NOT allowed).
http://www.leobodnar.com/products/BU0836X/A1302-BU0836.gif

So, check the datasheet of HALL that you buy for correctly pinout.
A1302: http://www.leobodnar.com/products/BU0836X/A1302.pdf

Sokol1

#3227176 - 03/07/11 05:36 PM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
Originally Posted By: Sokol1
[quote].. (invert wires to get inverted response is NOT allowed)...

But for that you can easily invert the magnets, especially with the bic pen design. So, before closing things up, see if the axes move the way you want, and if they do not turn the magnets 180 degrees smile

#3227638 - 03/08/11 01:02 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Gene Buckle
If memory serves, I was getting a range of about .13 to 4.93 volts out of the one I used in the video.

julian265, considering that most will use the "middle" 90 degrees of travel on something like this, is the fall off at the ends of the travel _really_ going to matter that much? Considering what the typical setup will lose just in mechanical slop, I suspect the difference would get lost in the noise. smile

The Plasma MM2 is an _awesome_ device. Unfortunately Beta Innovations is no longer in business. Something bent him sideways and he closed his doors - I've never gotten an explanation. The software will allow adjustment of the response curve though. Eventually I'm going to get the Arduino firmware written to allow you to use an Arduino Uno (or similar) as a control input device. That will also have the ability to tweak the response curves.

g.


It really sucks when a good product disappears off the market!

If you're going to use only the middle 90 degrees, then I agree that the loss of linearity won't be noticeable in-game - however if you do this with your current setup, you'll only be using the voltage range between ~.73 and ~4.3. This is fine if you are happy with the resolution that you will be left with, as long as you calibrate it to still reach 0 and 100% in-game. I am under the impression that most sticks don't have 90 degrees of travel though, and long-throw sticks use even less.

Therefore you match the sensitivity of your sensor to the axis that it will measure (so it reads minimum and maximum voltage at the extents of movement), you can directly attach it (thus avoiding cogs and levers), and not have any mechanical slop at all - this was pretty much the reasoning that motivated me to build my stick, along with non-wearing, non-spiking sensors.

#3227643 - 03/08/11 01:06 AM Re: DIY hall sensor ... [Re: Bluedeath]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Bluedeath
since these sensors are able to accept 6v power would this increase range? (linearity is already OK and centering is also, but I'm kinda curious)


I'm not really sure what would happen. Different things might happen if you powered your A/D circuit with 6V as well, compared to just the sensor. I think it would depend on the design of the A/D circuit, and how well the A/D would work with something that can exceed its own supply voltage.

#3227646 - 03/08/11 01:11 AM Re: DIY hall sensor ... [Re: Bluedeath]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Bluedeath
I ordered some A1302 from EBAY it turned out that they were china manufactured clones (i checked from the markings and thay are similar to allegro by spec sheet) ,but they work really well the only strange thing is that i can't get full travel in other words by using a 12 bit A/D i only get around 690 to 3700 (wich is anyhow fairly good by being more than 3000 discrete positions) instead of ideal 0 to 4096, the sensor is placed right in the middle of the "BIC assembly" and i used 5x5x5 neodimium magnets I tested by spinning the magnet assembly freely 360 several times and i never exceed thoose values. I laso tried to increase flux by adding magnets but the result not change. Im already satisfied with this setup but i was wondering if this is normal.


One thing I forgot to mention - you can get 3000 steps over 180 degrees, but what can you get within the extents of the axis that you intend to measure? In other words if you are only measuring +/-30 degrees, you'll only have 1500 steps.

#3227761 - 03/08/11 04:24 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
10 bit ADCs only give you 0..1023, which is "typical" for off the shelf joysticks. I know that Leo Bodnar offers a 12 bit interface - that should provide a 4096 "step" resolution if memory serves. Considering in the "old" days, you had 255 steps, even 10 bit is luxury. biggrin

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3227853 - 03/08/11 08:48 AM Re: DIY hall sensor ... [Re: julian265]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
@ Julian. The range that i get using the TM TQS travel is not full but is close to 2500~2800 steps, more than enough, I still have to build the assembly for the joystick I'll send some results when it's ready .

Last edited by Bluedeath; 03/08/11 08:49 AM.

"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3228226 - 03/08/11 05:29 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
This guy get 0 to 5 v output with this circuit:



HALL Sensor is reused from 5" or 1.44" floppy drive.

Magnets seen like ferrite ones...

Trin pot allow easy find 2,5v center and adjust gain.

Google translation:

http://translate.google.com/translate?hl...55fcbdf2ddd393d

Edit: Notice that magnet travel in this setut is ~40 degrees (+20, -20)

Sokol1


Last edited by Sokol1; 03/08/11 05:33 PM.
#3228408 - 03/08/11 08:52 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
@Brandano: A flux ring could be made of a short bit of steel tubing of the right inside diameter pretty easily. I don't know if there would be any advantage here considering the strength of the magnets.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3229654 - 03/09/11 08:51 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
It would concentrate the flux between the facing poles by providing a shorter, more permeable path between the free poles. With a less sensitive sensor this would mean needing a smaller angle to reach the saturation extremes, and therefore a more linear response though on a smaller range of movement. However, if you already get the proper signal swing for the proper angle adding a flux ring would be counter-productive. The other advantage to a flux ring is that it will shield the free poles, reducing the stray magnetic field, and reducing the possibility that one sensor will affect the reading of another nearby. It will also make it harder for it to pick up stray iron filings... your workspace looks very tidy, but in my case that's a realistic problem.

#3229665 - 03/09/11 08:59 PM Re: DIY hall sensor ... [Re: julian265]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
Originally Posted By: julian265

...
According to the spec sheet, the 1301/2 (like the 1321) output can be between 0.2 and 4.7V - which means you can't get the A/D converter to read less than 160 or more than 3850, even when you have plenty of magnetic flux. This just needs to be calibrated out in the operating system, unless you want to use a signal amplifier to get a true 0 to 5 V output.


Another possible approach would be to replace the positive and negative rail references for the ADC with values that allow to scan the whole range. The feasibility of this will depend on the ADC used, though. I believe it might be possible, but perhaps not for everyone. I tend to agree with Gene, if my joystick is fully swung in one direction it means I am not looking for fine input.

#3229715 - 03/09/11 09:37 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
I'm aware of what a flux ring does Brandano. smile My supposition was that it wouldn't likely provide any benefit in my case due to the proximity of the magnets to the sensor and their strength. If I was using ceramic or "standard" magnets, then a flux ring may be of some benefit.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3229758 - 03/09/11 10:14 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jul 2002
Posts: 2,846
Falstar Offline
Senior Member
Falstar  Offline
Senior Member

Joined: Jul 2002
Posts: 2,846
Edina, MN 55439
I think the only advantage to the flux ring is ease of mounting. Stick a bolt through it. Little surprised it's not a nylon bolt though.

#3230319 - 03/10/11 02:08 PM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
Originally Posted By: Sokol1
This guy get 0 to 5 v output with this circuit:



HALL Sensor is reused from 5" or 1.44" floppy drive.

Magnets seen like ferrite ones...

Trin pot allow easy find 2,5v center and adjust gain.

Google translation:

http://translate.google.com/translate?hl...55fcbdf2ddd393d

Edit: Notice that magnet travel in this setut is ~40 degrees (+20, -20)

Sokol1



ANy change that someone is knows what are the resistorr values and what are the specific models of components needed?


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3230785 - 03/10/11 10:44 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet

Last edited by Sokol1; 03/10/11 10:54 PM.
#3231197 - 03/11/11 01:37 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Alternative to HALL sensor.

http://www.eetindia.co.in/ARTICLES/2002DEC/A/2002DEC11_AMD_AN08.PDF?SOURCES=DOWNLOAD

The advantage of this magnetoresistive sensor is that is not affected by near metal parts,
and work well with ferrite magnets.

Cons - cost more than HALL sensor, since need a amplifier, build a PCB...

Sokol1

#3232002 - 03/12/11 02:15 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jun 2007
Posts: 630
Ltfransky Offline
Sith Lord
Ltfransky  Offline
Sith Lord
Member

Joined: Jun 2007
Posts: 630
Peterborough, ON, Canada
The KMZ41 and UZZ9000 have been replaced by the KMA200. It has the amp on-board.


Please Heatware Me!

Ours is not to reason why. Ours is to do or die.
Tennyson

I have slipped the surly bonds of earth
And danced the skies on laughter-silvered wings..
Gillespie Magee, RCAF
#3232378 - 03/12/11 02:56 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Ltfransky,

You know how calculate the resistor values to desirable angle?

Russian guys use KMZ41 plus MCP601/2, each cost about ~2,00.



Unfortunately the only place where I find theses items is in mouser.com
but the shipping for my address is U$ 40!!! Local Farnell dont have. frown

Sokol1

#3232849 - 03/12/11 11:39 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
FYI, the A1321LUA-T is still available from Newark Electronics and some other vendors. The link is:
http://www.newark.com/allegro-microsyste...?CMP=AFC-HEARST

They're $1.62 each in single quantities and they've got 2800 in stock.

julian265, would it be worth it to order these as replacements for the A1302's that I'm using now?

tnx.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3232869 - 03/13/11 12:23 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jun 2007
Posts: 630
Ltfransky Offline
Sith Lord
Ltfransky  Offline
Sith Lord
Member

Joined: Jun 2007
Posts: 630
Peterborough, ON, Canada
Newark kills you on shipping. They have good prices, but they sure make it up in other places.

Actually Sokol1, I'll have to look into it. I'm not sure


Please Heatware Me!

Ours is not to reason why. Ours is to do or die.
Tennyson

I have slipped the surly bonds of earth
And danced the skies on laughter-silvered wings..
Gillespie Magee, RCAF
#3232907 - 03/13/11 01:45 AM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Originally Posted By: Sokol1

Unfortunately the only place where I find theses items is in mouser.com
but the shipping for my address is U$ 40!!! Local Farnell dont have. frown

Sokol1


How many would you need?

If you come up with a design and publish it - is this option better than Willynovi's implementation? if yes, I am interested - I will buy some and ship it to you.

#3233031 - 03/13/11 05:38 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
aRareKindOfMonster

Thank you for your offer, but I need understand how assembly this "MaRS" thing first. smile

Quote:
is this option better than Willynovi's implementation?


What Willynovis's implementation you refer?
I know only your USB controller, "Controladora Joy.01"

Sokol1

#3233475 - 03/13/11 09:01 PM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Originally Posted By: Sokol1
What Willynovis's implementation you refer?
I know only your USB controller, "Controladora Joy.01"

Sokol1


The PIC18F2550 based USB controller.

Let me know when you got the MaRS gizmo figured out and I'll send you a couple.

#3234367 - 03/14/11 10:43 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Originally Posted By: Gene Buckle
FYI, the A1321LUA-T is still available from Newark Electronics and some other vendors. The link is:
http://www.newark.com/allegro-microsyste...?CMP=AFC-HEARST

They're $1.62 each in single quantities and they've got 2800 in stock.

julian265, would it be worth it to order these as replacements for the A1302's that I'm using now?

tnx.

g.


Thanks for the link!

If you want to make a sensor that can be adapted to different axes and their angle ranges, I think so. You can use weaker, smaller, wider spaced, single magnets, or an offset sensor to get the best sensitivity for each axis.

But if you don't notice any non-linearity, and you have enough resolution over the range of angles you need to measure, then no. Also if you find stronger magnets, or are able to increase your current magnetic flux in any other way, then you could increase the senstivity without replacing the sensor.

Last edited by julian265; 03/14/11 10:43 PM.
#3234518 - 03/15/11 01:40 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
I think I'll stick with the A1302 then. If I need to expand the mechanical input range, I can cut a set of wood or acrylic gears pretty easily.

I made a new pair of sensor "bodies" this weekend out of UHMW instead of 1/2" plywood. They turned out pretty nice.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3234555 - 03/15/11 02:27 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Originally Posted By: Gene Buckle
I made a new pair of sensor "bodies" this weekend out of UHMW instead of 1/2" plywood. They turned out pretty nice.


You got us into the habit; where are the pictures?? biggrin

#3237676 - 03/18/11 03:02 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Sitting on the SD card. smile

I'll get some posted soon - working on other things at the moment.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3284182 - 05/01/11 04:03 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Guys,

how good is hall sensor compared to the usual ch pots (HP100)?
is it noticeably more accurate or about the same?

If it is truly better, I am thinking of replacing my old CH pots with hall sensor.
Which one is the most suitable: A1301, A1302 or A1321 ?

Please advise.
Thanks.

#3285223 - 05/02/11 04:35 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
On the plus side: no pot noise, no wear. None at all. On the minus side, it's a bit fiddly to deal with, you can forget about your warranty, and the useful range is normally a bit reduced (unless you are lucky with magnet strength or play a bit with reduction ratios, which however introduce backlash). In my experience Hall sensors for all major axes are worth the trouble.

#3286645 - 05/04/11 03:49 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
I wonder; what is the CH Products controllers' resolution? Some controllers can only recognize up to 256 steps. And while that should be enough - or is it? - a higher resolution, if supported, is a winner, especially with HALL sensors.

#3286752 - 05/04/11 09:08 AM Re: DIY hall sensor ... [Re: aRareKindOfMonster]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
Given the quality of CH Products i would be surprised if a raw resolution of analog axes lower than 1024 steps while 4096 or more could be the most probable answer. 256 values is the resolution of the good old PC game port.


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3286916 - 05/04/11 03:06 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Accord JoyTester is CH controller is 256 steps (8 bits).

http://www.sukhoi.ru/forum/attachment.php?attachmentid=45161&d=1124883145

Sokol1

#3287207 - 05/04/11 10:36 PM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: May 2010
Posts: 108
julian265 Offline
Member
julian265  Offline
Member

Joined: May 2010
Posts: 108
Last time I checked it was 256 also.

#3287264 - 05/05/11 01:14 AM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Dec 2008
Posts: 1,065
aRareKindOfMonster Offline
Member
aRareKindOfMonster  Offline
Member

Joined: Dec 2008
Posts: 1,065
Sokol,

How would that graph look like if you had used a high resolution IC (HALL sensor)?

I notice there is some jitter on the rudder and throttle axis, would a HALL sensor - due to its sensitivity - show more of it, or less?

#3287498 - 05/05/11 11:09 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
@ Sokol and Julian, i cannot believe that!!! 8Bit! my respect for CH engineers is fading away.


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3287583 - 05/05/11 01:53 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Bluedeath.

You shold consider that actual CH sticks are "old" projects - probably the change to USB occurred around 2000, when 8 bits are almost stantart.

I think that secret of CH good performance in games is due drivers.

Look: Apparently Bob Church work for CH in this area.
Back in 1990's Thrustmaster F22PRO are problematic with pots - but pots used in F22PRO are virtually identical to ones used in CH... (I have both here)
then Bob Church made a new firmware - sold as upgrate- for F22PRO that cure these problemns. wink

aRareKindOfMonster

To compare see this test (JoyTester) with Warthog:

http://img853.imageshack.us/img853/549/joytes01custom.jpg
http://img69.imageshack.us/img69/7011/joytes03custom.jpg
http://img705.imageshack.us/img705/5669/joytes04custom.jpg
http://img845.imageshack.us/img845/286/joytes05custom.jpg

Here result of the same CH with some modification in coils (?):

http://www.sukhoi.ru/forum/attachment.php?attachmentid=45162&d=1124883145
http://www.sukhoi.ru/forum/showthread.php?t=35320

Here, a CH upgrated with (VKB) MaRS (a "tuned" sensor):

http://www.sukhoi.ru/forum/attachment.php?attachmentid=97239&d=1249737843
http://www.sukhoi.ru/forum/showthread.php?t=57218

Sokol1

Last edited by Sokol1; 05/05/11 02:29 PM.
#3287696 - 05/05/11 03:47 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
Of course i was exaggerating about ch engineers, the pots are similar but not identical. Pots in my TM flcs failed, by fail i don't mean only spiking I mean that after very little time the rivets that held the soldering contact in place were so loose that was impossible to fix them. The spiking instead was horrible right out of the box so had to lubricate and clean them the very day i bought the F-16 FLCS , calibrating the thing was a nightmare (but i loved it anyway).
I workaround the problem of not finding the correct ones by using modified cheap stock 500k pots with no spiking or problem at all (I contacted Bob who was very helpful a lot of time back then), my TM wheel pedal pots suffered the same issue.

CH pots after intensive use (even transplanted now to a my FLCS) never gave me any problem at all just the joystick was too light.

I love TM stuff but i always thought that CH put more care in their products (They just don't give me the right feel when i use them), But 8 bit of resolution is really too low (i didn't consider the "old venerable" design, but even low end products of Saitek line have better resolution) i took for granted that the design was keep up with the time standard, on the software I really can't comment because I owned game port version of both the controllers and I tended to use fox2 at the time and in the end i gave the CH stuff to a friend.


"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3287701 - 05/05/11 03:53 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
But do you think you would be able to position a joystick reliabley in 256 discrete positions by hand? My Cougar has a sensor range of 2048 on the X, Y, Z and Z1 axes, but it's sincerely overkill, even to the point of causing trouble when trying to set a calibration manually on Linux, though the automatic calibration works perfectly.

#3287752 - 05/05/11 04:40 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2011
Posts: 658
Bluedeath Offline
BS 62 "Pegasus" CAG
Bluedeath  Offline
BS 62 "Pegasus" CAG
Member

Joined: Jan 2011
Posts: 658
Actually is possible and relatively easy to hit a discrete position over a 1024 range with a joystick (the longer is the neck of the stick the more precise you can be) or a throttle (and be steady enough to maintain the value within the jitter rejection range of your controller) Try with Diview you will see that you can be precise to the first decimal of the percentage (even the second if you are good gunslinger wink without too much effort if you are not at the center of the stick (where springs do have the most of the resistance) if mechanical parts are in good shape, if this kind of precision is needed that's another story but 256 discrete position can be achieved even by untrained hand for example in MAME you can "feel" the difference between an 8 bit (which theoretically is the native resolution of most of the arcade analog controllers) and a 10 bit (or more) controller by the smoothness of the response because of the aliasing elimination.

Like Audio is better to work with the highest possible sampling rate even when the final products will have CD quality.

Any how i agree that extreme resolution are most of the time overkill, but they come very handy when is needed to use only a fraction of available range.

BTW XBOX 360 pads do have 16 bit (at least my windows PC sees them as such when i check raw values) of resolution on the analog "Mushrooms" that is definitely overkill



Last edited by Bluedeath; 05/05/11 04:52 PM.

"When you plan revenge best dig two graves" Confucius
"They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety" Benjamin Franklin
#3288327 - 05/06/11 12:07 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
@Brandano,
thanks for the reply.
hall sensor sounds very intriguing, I think I am going to try it.

@aRareKindOfMonster,
actually, I have changed my gameport CH with mjoy16.
so with mjoy16 (10 bits), hall sensor should be more accurate?

@Sokol & Julian
I didn't know that CH use 8 bits.
How about if I buy a new CH Fighterstick now?
Does it still use 8 bits?

I plan to change x and y axis of my CH flightstick.
With the magnets from cd/dvd drive, do I have to worry about shielding the magnets?
if yes, how to shield the magnets from each other?

Last edited by tirta; 05/06/11 12:11 PM.
#3288516 - 05/06/11 04:10 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Tirta,

I think that you dont need shield, X and Y axis is not too close, and dont have another ferrous metal part around inside stick.

Anyway, since you disassemble a defective CD/DVD-ROM drive (to get magnets) these things have a small DC motors, disassemble one - leave metal case and internal ferrite magnet - and use around your HALL assemble. Sample:



Clarification to CH purists: Tirta no making any sacrilege putting HALL in your Fighterstick.
Are a old gameport model "USBbified" with DIY Mjoy16 controller. wink

BTW - Cost to replace 2 CH pots ~ 20 U$ + 10 U$ postage (last time I buy. And in my case + country fees, around 100%).

Cost of DIY 2 HALL + magnets assembly ~ 10 U$.

Sokol1

#3288572 - 05/06/11 05:17 PM Re: DIY hall sensor ... [Re: Sokol1]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Sokol1,

thanks for the reply.

Quote:
metal case and internal ferrite magnet

is that the circular one?
is this for shielding?

so I still need the 2 little magnet blocks near the laser for the hall sensor, right?

#3288848 - 05/06/11 11:17 PM Re: DIY hall sensor ... [Re: tirta]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
You still need the Neodymium magnets - these circular ferrite probable dont have necessary force to work with HALL. But make a test.
I suggest use just for shield - in fact only the case of motor (or a piece of tube of ferrous material) is suitable to shield. But start without this, probable find that is not necessary.

DIY HALL assembly is very flexible - you just need do some experimentation. Just dont mix + and - wires. smile

Sokol1

#3289078 - 05/07/11 08:34 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
ok, Sokol1, thanks for all the replies.
I have learned a lot about from reading this thread and yours.
I will let you know the result. biggrin biggrin biggrin

#3290266 - 05/09/11 03:41 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
A few pics from the final version of my A1302 based hall effect pot replacement:







The first picture shows the control arm mounting plates that I made - they press-fit onto the pen body. They're VERY tight.

The second pic shows the completed assemblies with the control arms installed.

The third pic shows them installed in the Jentron MK2 gimbal. The original pots would jitter around center anywhere from 200 to 400 points. These hall effect replacements are rock solid. No jitter or spiking at ALL. They're stupidly easy to make too!

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3291681 - 05/10/11 09:37 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Here's where you can get the bearing that I used in the project:

http://www.vxb.com/page/bearings/PROD/SB/Kit1063

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3306691 - 05/29/11 11:56 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
A different an interesting arrange for DIY HALL:

http://www.sukhoi.ru/forum/attachment.php?attachmentid=134869&d=1306067091

HDD magnets, that are use not only do excite HALL but to replace gimbal springs, the joystick is centered by magnet force. Gimbal made with HDD parts, include disc.

http://www.sukhoi.ru/forum/showthread.php?t=59583&p=1625474&viewfull=1#post1625474

Sokol1

#3318677 - 06/14/11 04:48 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Guys,

I have finished converting my CH flightstick + pro throttle + pro pedal, all the major axis to hall sensor successfully.
I use Allegro 1302, since that is the only hall sensor I could find in my town.
The magnets are from used dvd/cd drive.
I must say the result is very good, the HOTAS feels very smooth, very stable, very accurate and no more spikes! biggrin

I would like to say thanks to you all for contributing to this thread especially to Gene for starting it and to Sokol1 for his special help.

Happy simming! biggrin biggrin biggrin

#3318679 - 06/14/11 04:55 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Pics! Pics! smile

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3318864 - 06/14/11 08:59 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jul 2002
Posts: 2,846
Falstar Offline
Senior Member
Falstar  Offline
Senior Member

Joined: Jul 2002
Posts: 2,846
Edina, MN 55439
Originally Posted By: Gene Buckle
Pics! Pics! smile

g.


+1 biggrin

#3328367 - 06/26/11 07:50 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Ok Guys, finally I manage to get some pictures here.
Sorry they are rather unclear, I do not have my camera so I use my psp cam.

so here is my CH HOTAS :

Sorry I miss the Pro Throttle, it is still under the table.
I have use this since the 90s, so now it is almost 20 years.

here is the inside part:

this is used to be a gameport joystick,
I have made it USB by using mjoy16, thanks to Sokol1. cheers

here is the hall sensor and the magnets:

I glued the magnet to a unused pots part, and put the sensor above the magnet.

The magnet is very near, but does not touch the sensor.



Sokol1, with A1302 there is no need for shielding the magnet, mine works just fine.

Gene is right, after you know what to do, hall sensor is very easy to make. copter

#3329368 - 06/27/11 01:53 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Very nice! Congrats!

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#3330162 - 06/28/11 10:04 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
Yup, very clean setup, congratulations. What is the sensor used? The position of the sensing plate relative to the magnet seems a bit odd to me.

Last edited by Brandano; 06/28/11 10:04 AM.
#3330250 - 06/28/11 12:47 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
thanks all for the kind words.
I use Allegro 1302.

I am sorry if the picture is not very clear,
the sensor position is based on this picture:

Thanks to Sokol1. thumbsup

#3330341 - 06/28/11 02:17 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
Ok, that's a bit odd because on the A1302 the sensing portion is parallel to the body of the package, and it should sense the flux lines going through it. I am going to try this arrangement on some of the sensors I have left to see if the sensitivity is the same.

#3330788 - 06/28/11 10:29 PM Re: DIY hall sensor ... [Re: Brandano]  
Joined: Mar 2011
Posts: 13
wledzian Offline
Junior Member
wledzian  Offline
Junior Member

Joined: Mar 2011
Posts: 13
The 1302 does sense flux strength perpendicular to the package. Important to note in that graphic is that the magnet pivots along an axis below the sensor. When aligned as in the graphic, the flux lines will be parallel to the package face, and should produce a 2.5v output. When the magnet pivots to either side, the field lines will no longer be parallel to the face, and will produce an off-center output.

If the magnet were to pivot around an axis through the sensor, that arrangement [/i]would[i] fail.

#4106498 - 04/15/15 11:20 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Guys,

I have just changed my hall sensor from A1302 to S495A

My joystick is CH Combatstick.
I have measured the angle movement:
for x axis, it is around 60 degrees from extreme left to right.
for y axis, it is bigger: around 70 degrees from extreme up to down.

using this setup:

with A1302, I can use it right away, no problem here.

However, with ss495a, now I find its max angle movement is too small for y axis,
I have not moved the stick to its extreme down position,
but the sensor value has already reached 0.
the same with max up position (around 4060).
the maximum angle movement for s495a is around 55-60 degrees.

Since my max angle movement for y axis is around 70 degrees,
what should I do to make the angle movement of the sensor bigger?
Please advise.

#4106598 - 04/15/15 01:40 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2004
Posts: 1,215
f15sim Offline
More projects than sense!
f15sim  Offline
More projects than sense!
Member

Joined: Jan 2004
Posts: 1,215
Graham, WA
Try moving the sensor so that the top is pointed at the magnets. You should get 90 degrees out of it easily.

g.


Proud owner of 80-0007
http://www.f15sim.com - The only one of its kind.
http://geneb.simpits.org - the Me-109F/X Project
#4107071 - 04/16/15 11:20 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Gene,

Thanks for the reply.
I tried to set up the sensor so the top is pointed at the magnets.
However, now the sensor value can not reach 0 and 4060.
They are around 300 (min) and 3800 (max).

However, these values does not work well with mmjoy.
When I test it with joytester in joysetup.exe,
the values always changes, they can not be used optimally.

You can read about that more clearly here:
http://SimHQ.com/forum/ubbthreads.php/topics/4092126/Re:_MMJoy_-_Build_your_own_USB#Post4092126
http://SimHQ.com/forum/ubbthreads.php/topics/4093559/Re:_MMJoy_-_Build_your_own_USB#Post4093559

#4107608 - 04/17/15 09:25 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
You can't reach the full range of the ADC converter in the microcontroller with a Hall sensor, unless you use additional circuitry or have a way to set a different reference voltage on the ADC. Even in optimal situations a common hall sensor will swing the output voltage only between 0.5 and 4.5 volts (approximately) and this means that 20% of the full range of the converter won't be used. This is generally not a problem, since you would find it really hard to position a control with the accuracy of the remaining range, and indeed many joysticks only have 256 "steps" per axis. You just have to calibrate the controller to make use of the available range, something that the firmware can probably do automatically by assuming the controls to be centred when it is powered up, and extending the maximum and minimum value for each axis every time a new value exceeding the current one is reached.

#4108116 - 04/18/15 07:00 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Hi Brandano,

Thanks for the reply.
Yes, I am aware that HALL sensor can not reach the full range.
But I have used HALL with 2 of my joysticks,
and on one of them I can get rather the sensor values rather close to full range:

x axis: 96 - 4068
y axis: 100 - 4060
this is with A1302.

Using this joystick with the current mmjoy is very precise,
and when testing it in joy-tester after I calibrate it,
I find the values are stable, they do not change.


However, on my other joystick, the one that I change to S495A,
I only get around:
x axis: 300 - 3800
y axis: 300 - 3800

With this values, mmjoy does not seem can use it correctly.
Even after I calibrate it, the maximum and minimum values always get smaller after a while,
like I write here:
http://SimHQ.com/forum/ubbthreads.php/topics/4092126/Re:_MMJoy_-_Build_your_own_USB#Post4092126
http://SimHQ.com/forum/ubbthreads.php/topics/4093559/Re:_MMJoy_-_Build_your_own_USB#Post4093559

If I understand correctly,
using HALL sensor with less than full range should not be a problem with mmjoy,
since values get stretched to 0-4096 after calibration.

However with the second joystick,
after calibration, the stretched value is 0-4096 for a while,
then after I move the stick,
the values always decrease, like this:

first, just after calibration: 0 - 4096 (perfect!).
then, after a few moves : 100 - 4096 (it started to change)
then, move it a few more : 200 - 3900 (more changes)
then, move it a few more : 400 - 3700 (more changes)
(this is an approximation since the real value always changes a little bit)

so the max and min values always changes,
but it is getting smaller all the time.

it might be a bug with mmjoy?
or there is something wrong with the sensor or my setup?





#4108228 - 04/18/15 01:42 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Aug 2007
Posts: 293
Brandano Offline
Member
Brandano  Offline
Member

Joined: Aug 2007
Posts: 293
Caput Mundi (well, it used to ...
I think this might be a case of temperature drift. As the current starts flowing through the sensor its temperature starts slowly to rise, changing the response over time. The best way to check if this is the case would be to monitor its output with a voltmeter. in this case there's little that c an be done other than re-calibrating with he circuit in its warm state. I never had this problem with the allegro, but I generally leave the joystick plugged in even if not in use.

#4108271 - 04/18/15 03:15 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
Yes, I leave my joystick plugged all the time too.

But it is still strange since the the changing sensor values only affect one joystick,
the other is super stable all the time.

I forget to tell you that before I can change the HALL sensors to S495A,
I also used Allegro A1302,
and with those, I also get the the same changing sensor values on that same joystick.


#4108306 - 04/18/15 04:46 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Tirta,

Do you test with Joytester2 to confirm these changes?

http://www.tuttovola.org/index.php?action=downloads;sa=view;down=877

Test exchange - if possible - the X and Y magnets.
Or, more easy, the X an Y axis connections in the controller.

#4108667 - 04/19/15 06:21 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
using joystester2 is harder to see,
but yes, it does gives me the same changing sensor values.

I also try changing the old magnet that I got from dvd player
to a stronger one: 10mm x 10mm x 10mm cube neodymium magnet.

however, with the new one I get lesser values,
do I have to position the HALL sensor further away from the magnet if I use stronger magnet?

#4108671 - 04/19/15 06:41 PM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2012
Posts: 161
LocNar Offline
Member
LocNar  Offline
Member

Joined: Nov 2012
Posts: 161
I've found the 1302 to be the least useful of the Alegro sensors. The sensitivity on them is 1.3mV/Gauss, so take nearly 180 deg of a strong magnet for a full voltage swing, at least with the Bic pen arrangement. The A1301 behaves the same but can use half the magnet, at 2.5mV/Gauss which allowed me to implement some miniaturization.

Here's the post I made a while back about miniature DIY sealed Hall pots (I think of them as gen 2 versions of Gene's), which are easy to make and incorporate into controls projects.

DIY Sealed Miniature Hall Pots, on the cheap!

Since controls don't typically move 180deg, this rules out direct mounting and tends to waste usable range of motion/resolution. Lately I've experimented to good effect with A1324 (5mV/Gauss) and have found them to be most suitable for typical controls, only taking about 90deg for a full swing, allowing direct mounting as well as better utilization of available resolution.

That said, I've never had any problems with drift with any of my Alegro's. I only buy them from reputable dealers (Newark Electronics in my case) however, because I hear ebay and other sources are full of sub-par counterfeits.


Last edited by LocNar; 04/19/15 06:43 PM.
#4108746 - 04/19/15 10:22 PM Re: DIY hall sensor ... [Re: tirta]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet
Originally Posted By: tirta
using joystester2 is harder to see,
but yes, it does gives me the same changing sensor values.


OK. Using Joytester2 you eliminate problem with JoySetup embed tester.

Quote:

I also try changing the old magnet that I got from dvd player
to a stronger one: 10mm x 10mm x 10mm cube neodymium magnet.

I suggest exchange mangetes or axis connections to isolate problem with magnets - a squad mate owner or X-52 notice that one of his magnets became rush and dont work properly. Replace the magnet solve the problem.

Quote:

however, with the new one I get lesser values,


If you still have issues, after exchange axis connection in Arduino board - for confirm that the problem is related with board input and not with HALL/Magnet assembly, rest the board as source of the problem, they can be defective.

These DIY HALL assembly involve a lot of (tedious) magnets positions experimentation/test. smile

I have a case in Suncom conversion that the axis became inverted. smile

My next try will be with this TLE.. sensor, despite the PCB building need, looks more "PnP. wink


#4108889 - 04/20/15 08:05 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Jan 2010
Posts: 440
tirta Offline
Member
tirta  Offline
Member

Joined: Jan 2010
Posts: 440
@LocNar
I have never tried other variants of Allegro.
A1302 is the only one that I can find in my local store.
So I have used it in 2 of my joystick and on one of them is very good.

I will try looking for A1301 and A1324.
Thanks for the information.


@Sokol1
Yes I have tried changing the magnet and the sensor, and the problem remains.
now I will try changing the axis pin on the arduino board.

Can I know what sensor values do you get from your setting?

#4287146 - 08/13/16 01:07 AM Re: DIY hall sensor ... [Re: f15sim]  
Joined: Nov 2001
Posts: 3,774
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,774
Internet

Page 1 of 5 1 2 3 4 5

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Manly Tape for Manly Men
by KRT_Bong. 05/26/20 04:28 PM
Best/good WW2 aviation sim ?
by Catfish. 05/26/20 02:17 PM
Memorial Day 2020
by F4UDash4. 05/25/20 11:52 AM
WiFi Paranoia
by Nixer. 05/23/20 12:21 AM
It's Fryday!
by MarkG. 05/22/20 04:08 PM
A mad Englishman and his shed
by bolox. 05/22/20 11:51 AM
Captain Kimberly Hampton Remembered
by F4UDash4. 05/22/20 11:38 AM
Stuff like this makes me mad.
by NoFlyBoy. 05/22/20 08:11 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0