G27/G29 Hall Sensor Mod

GeekyDeaks

Staff
Premium
Thought it might be an idea to share some ideas @Neilski and I have been bouncing around about replacing the stock pots in the G27 and G29 with Hall Sensors (probably also work on a G25). We found a few discontinued options (e.g. https://www.simulaje.com/productos/accesorios/sensor-hall.html) and a current one that seemed ok but required a USB adapter (https://tomyracing.com/index.php?language=en&module=products&content=pedhallv130), which made us suspect its range might not be great and/or it didn't invert the signal. (EDIT: I didn't read the description properly! the mod can be used without a USB adapter)

So, in the interests of science we decided to get some bits and have a play. We went for the A1324/5/6 (https://docs.rs-online.com/958c/0900766b813d193a.pdf) as it appeared to have decent range of close to 0-Vcc (many are just +/-1v) and @Neilski worked out a simple arrangement that theoretically would produce a near linear change based on angle over the 70 deg the G2X rotates the pot:

1600181340738.png


This was then a great excuse to get a 3D printer, so I ordered an Ender 3 Pro (https://www.creality3dofficial.com/products/creality-ender-3-pro-3d-printer) and knocked up a simple model to hold the magnet and sensor whilst still utilising the existing pot for simplicity. The result was the following:

g2x_mag1.jpg


IMG_20200913_155039.jpg

Assembled and connected up to an Arduino to measure against the pot
IMG_20200913_164101_2.jpg


It's got an interference fit that seems fine and allows adjustment of the sensor angle to get the range as centred on Vcc/2 as possible. We played with some different magnet sizes, but found the 8mm with the most sensitive device (A1324) gave a range just over that of the stock pot. BLUE line is the pot, RED is the hall sensor

hall-v-pot-8mm.png

We are still playing but this is looking really promising as a simple swap for the standard pots in the G27 and everything but brake in a G29, although a less sensitive device like the A1326 could probably get the range down to that expected (more testing required!)

EDIT: forgot the link to the 8mm model - https://a360.co/3mvHXkX
 
Last edited:
Upvote 0
There presumably is an intended image, which does not display (at least for me)
I think I linked directly to the attachment in the private convo I was having with Neil...

Tomy Racing's documentation indicates that it can work without a USB adapter
but wants recalibration
Ah, I realise now I didn't read their main description very well either! It talks about not working with a Thrustmaster base or consoles
 
Upvote 0
How well did that configuration work? I have a bunch of 12.5mm diameter magnets..
Well, it seemed vaguely promising while holding the magnet with a pen and fingers, but not stable enough to be very sure! :laugh:
Other variants under consideration include one with a little bar magnet (slightly more compact).
 
Upvote 0
I love that you used the A1324... it's got the highest sensitivity of their lineup so can use the smallest magnets and has a 90deg swing. If you google search though you will find everyone following the advice of forums from years ago suggesting to use the A1302 likely stemming from Gene Buckle's (the inventer of the 'Bic Pen method') suggestion, but those are 1/4 as sensitive and have a 180deg swing making them a poor choice for pedals joysticks and throttles etc.

Spent a lot of time soapboxing the 1324 after first going the 1302 route but always felt like I was shouting into the void. Initially I switched to A1301 which are twice as sensitive as the 02 but still have a 180deg swing before discovering 1324. Here's an imgur album I made about using them to make sealed pots in 2012.. all of which are still in use without the slightest bit of wear though I switched to making them with smooth 1/4" shafts with a slot in the tip so they can be fine tuned after installation


(the album has descriptions and parts lists if you follow it to imgur)
 
Upvote 0
Here's an imgur album I made about using them to make sealed pots in 2012
Really like your compact design. I totally overlooked the flight sim resources for some reason as otherwise I might have found it here: https://simhq.com/forum/ubbthreads.php/topics/3674791/DIY_Sealed_Minature_Hall_Pots

The A1324 was more by chance to be honest as I didn't really understand how a hall sensor worked and simply wanted something to experiment with at first. Ended up reading quite a few data sheets, but that one seemed interesting with both the near rail to rail output and that it came in three variations of sensitivity. I wish I had stumbled on the bic pen idea when first researching though, as everything I initially found had the magnet and sensor moving parallel with respect to each other, so I wasted some time replicating it at first until I realised how the sensor works and came up with a similar configuration to the pen in order to measure how linear it was when rotating the field. I preferred @Neilski's configuration because I felt it would allow easier tweaking of the range by simply adjusting the distance between the magnet and the sensor
 
Upvote 0
Other variants under consideration include one with a little bar magnet (slightly more compact).
I forgot to ask about that. I tried the 8mm bar magnets, but they gave slightly less range than 3 of the 6mm disc ones stacked. I'm wondering if the diametrically magnetised ones you have would give better results for a more compact design?
 
Upvote 0
How well did that configuration work? I have a bunch of 12.5mm diameter magnets..
That's actually the configuration used in the 3D printed model, it just allows stacking magnets to see if it has any noticeable effect on the field strength. We found that using 2x8mm magnets stacked together was strong enough to drive the A1324 almost rail to rail over about 70deg rotation, but 3x6mm was not. I haven't checked to see if stacking really does affect the output yet
 
Upvote 0
still have a 180deg swing
I'm realising I'm not sure what you mean by 90 or 180 deg swing here. The way we've got the magnets and sensor configured, you get a sinusoidal effect as you rotate the magnets around the sensor element, so the +/- 35 degrees of the G2x pot movement allows a nice linear sweep if you start with the field lines parallel to the sensor (thus no Hall signal). If you go much bigger in angle, it gets nonlinear really quickly. So... I think I'm probably completely misunderstanding what you mean :)
I forgot to ask about that. I tried the 8mm bar magnets, but they gave slightly less range than 3 of the 6mm disc ones stacked. I'm wondering if the diametrically magnetised ones you have would give better results for a more compact design?
Hmm, I must retry the testing on the diametrically magnetised puppies, but on the first trials I was a bit disappointed.
Regarding the bars, I had suspected that a single one might be a bit less strong than needed, so I was thinking about a pair in the configuration below, which is even more compact than the single because the sensor can be 3+ mm closer to the G2x pot. (Oh and having wrestled with F360 while drawing this up, I sadly discovered that I can stop learning how to use it cos they just killed the personal version :()
The bar magnets are arranged with their poles pointing in the same direction so they repel each other, which ought to make the mount even easier to construct.
Edit: withdrawing the sensor along the rotation axis should still permit fine-tuning of the range, I think.

1600377345602.png
 
Last edited:
Upvote 0
I'm realising I'm not sure what you mean by 90 or 180 deg swing here. The way we've got the magnets and sensor configured, you get a sinusoidal effect as you rotate the magnets around the sensor element, so the +/- 35 degrees of the G2x pot movement allows a nice linear sweep if you start with the field lines parallel to the sensor (thus no Hall signal). If you go much bigger in angle, it gets nonlinear really quickly. So... I think I'm probably completely misunderstanding what you mean :)

I mean how far magnetic N/S need to be rotated around the sensor to achieve a full -/+ Vref voltage swing of the output. 90deg swing sensors like 1324 require the field to be moved 90deg to achieve this. As you notice only a portion of that is linear. Halls have a saturation point at the beginning and end of their arcs so a 90deg Hall (+/-45) has about 70deg (+/-35) of usable linear output, and 180 (+/-90) versions ends up 160deg or so.

fig1.ashx


Whether pots or Halls the output ends up broken into steps determined by resolution (sensor resolution as well as processor resolution). The less of the native swing you utilize, the fewer of the sensor's steps you make use of and the bigger the jump from step to step ends up being after calibration. By using a sensor that only req 90deg you don't lose the native resolution in this case but with a 180 swing model you would have to modify the gear train to move the sensor twice as far or settle for half the resolution.

tl:dr; A1324 is a good choice here

Ironically there might be an easier way to use Halls for this purpose though.. you can move a magnet closer and farther away from them and get a linear output but I've not experimented with this yet. I also don't know how the presence of ferrous metal (like steel Logitech pedal arms) affect this. Here's a mod for CSL Elite pedals though that replaces the pot gear train with a simple pedestal to hold the sensor and passively sticking a few magnets to the pedal arm. This is done with linear position sensors in this case made by Honeywell and I might test Alegros as well when I'm converting my CSL's though I'm not sure if they can be used this way. I already bought Honewells for this but also have 1301, 02, 1324, 25 versions of Alegro on hand


Sorry for the derail!..

...also sorry if any of this is in error, it's entirely possible I've taken 2 + 2 to equal 22 :p
 
Last edited:
Upvote 0
I'm with @Neilski on this one. I think what is happening here is just down to the device sensitivity and it simply saturates quicker. After reading up a fair bit on the effect, I realised that the sensor can only measure the field strength in a single direction, so when you rotate the field around the sensor, it only measures the component of the field strength in that direction (in the A1324 it's perpendicular to the front face). Since the field strength is constant and just the angle changes, this means the apparent field strength on the sensor is going to be G*COS(a) assuming a=0 when the sensor is completely perpendicular to the field.
 
Upvote 0
I mean how far magnetic N/S need to be rotated around the sensor to achieve a full -/+ Vref voltage swing of the output.
Ah, OK I understand what you meant now.
Like @GeekyDeaks says, these sensors don't care about angle, just the field component perpendicular to the flat face. (You can buy fancy sensors that truly measure the field angle, but they are composed of multiple Hall elements internally, each sensing the field component in a certain direction.)
The A1324 for example has a basic sensitivity of 5 mV/G which is pretty high. So with a high strength magnet at a very small distance, you can get 0 - 5 V with a very small swing (roughly 60 degrees with some of mine, albeit measured by eyeball, cough :laugh:).
The A1301 is 2.5 mV/G (same as the newer model A1326) so yeah will need more field or more angle.
Here's a mod for CSL Elite pedals though that replaces the pot gear train with a simple pedestal to hold the sensor and passively sticking a few magnets to the pedal arm.
Yeah, I came across that recently - very cool and if the G2x series didn't have a handy way to mount a rotary system I might be playing with a very similar scheme right now :)
Meanwhile, your rotary pots are awesome!
 
Upvote 0
Here's a mod for CSL Elite pedals though that replaces the pot gear train with a simple pedestal to hold the sensor and passively sticking a few magnets to the pedal arm.
I saw that mod too, but I was a little sceptical that it would be linear as I thought the magnetic field strength dropped off by the inverse square of distance. I didn't take the time to test it though.

Meanwhile, your rotary pots are awesome!
I have dug around a little more now you put me onto the flight sim stuff and I have to say I have not seen anything as elegant as your design, it truly is delightful!
 
Upvote 0
sceptical that it would be linear as I thought the magnetic field strength dropped off by the inverse square of distance
It actually drops even faster than inverse square (a lone monopole would drop with inverse square though), so yeah I'm pretty certain it's going to be strongly non-linear. Probably correctable with a microcontroller in the loop but not something you'd want to feed directly to Windows.
(Btw, I bit the bullet today and installed "magpylib" to let me properly evaluate a few magnet configurations with a bit more confidence. Not yet certain how accurate it is but it's probably gonna beat me trying to hold multiple magnets with fingers and blu-tack :laugh:)
 
Upvote 0

Latest News

How long have you been simracing

  • < 1 year

    Votes: 370 16.0%
  • < 2 years

    Votes: 255 11.0%
  • < 3 years

    Votes: 247 10.7%
  • < 4 years

    Votes: 181 7.8%
  • < 5 years

    Votes: 303 13.1%
  • < 10 years

    Votes: 260 11.3%
  • < 15 years

    Votes: 166 7.2%
  • < 20 years

    Votes: 129 5.6%
  • < 25 years

    Votes: 100 4.3%
  • Ok, I am a dinosaur

    Votes: 299 12.9%
Back
Top