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
I've tried the Alegros at 3.3v and no dice, recently in fact. Was sussing it out as a sensor for a handbrake to mate with my Fanatic wheelbase but it runs at 3.3v. I thought I had luck with them in the past so glad I tested before committing any mechanical work to that sensor for that application.

^wrong!! ...the sensor does indeed work at 3.3vdc the problem is my handbrake socket is messed up on my LC unit and again I put 2 and 2 together and came up with 22.

That said, the Honeywell sensor that is being used in the CSL mod from a few posts ago rates it down to 3.3v so might work and is the same form factor. I'm not sure if it's the same type of sensor and haven't played with the ones I have yet so can't say. The guy that did the simple mod with it insisted it operated linearly in the arrangement, as have subsequent adopters. Guess it's time to get out the breadboard and see what it does on the bench.

I'm glad to be corrected in my misinterpretation of how Halls work though, was sort of a victim of early success as I quickly stumbled onto working solutions with predictable behavior to changes before figuring out why. My observations were correct but my conclusions were not and I always felt like there was more to the story but knew enough to get by so focused on other things. I happily stand corrected though :p
 
Last edited:
Upvote 0
It actually drops even faster than inverse square (a lone monopole would drop with inverse square though)
You are going to need to explain this one to me at some point! :D

Btw, I bit the bullet today and installed "magpylib" to let me properly evaluate a few magnet configurations with a bit more confidence
I'm interested in this too. Do you have a github repo with the code?
 
Upvote 0
the Honeywell sensor that is being used in the CSL mod from a few posts ago rates it down to 3.3v so might work and is the same form factor.
Depending on supplier, the dirt cheap 49E is spec'd to work from 2.3 to 10V supply,
with output saturating about 0.8 to 0.9V from supply rails.
With a 3.3V supply, that leaves 1.6V for signal from 180 degree rotation.
Strongest output has it between a magnet pair in attraction orientation,
held apart by a nonferrous tube inside which a 49E presumably rotates.
Magnets would ideally be clamped by a soft iron band, completing a magnetic circuit.
 
Upvote 0
My observations were correct but my conclusions were not and I always felt like there was more to the story but knew enough to get by so focused on other things.
I know the feeling. I've "figured stuff out" along the way with this magnet stuff and then realised I was totally wrong at least three times already :D
You are going to need to explain this one to me at some point!
Will have a go... unless I umm realise I was talking nonsense :laugh:
I'm interested in this too. Do you have a github repo with the code?
Not yet, but I've managed to convince myself that it probably has enough accuracy for my needs and got to the point of generating some pretty pics and answering some basic questions. (I'm using Jupyter Notebook for it so far.)
The pic below shows the field strength contours for the 3x3x8 mm bar magnets I bought (non-linear contour spacing btw). The shape of the contours tells a story about what magnet orientations might work best.

1600552488254.png
 
Upvote 0
Made a mock up for a different configuration with the magnets arranged around the sensor (aka bic pen config). Certainly helps the field strength as the 6mm magnets have been giving a slightly higher range than the 8mm in the original configuration. This might also allow us to have the leads exit within the base of the pedal as there is a little more room between the sensor and the wall of the base.

Nice and linear relative to the pot:

hall_mk2_1_xy_chart.png


Decent range (still with the A1324 and the magnets about 3.8mm from the centre of the sensor):

hall_mk2_1_compare_chart.png



hall_mk2_1.jpg


After AutoDesk announced it's changes to F360, I started using OpenSCAD for designing the model: https://github.com/GeekyDeaks/g29-hall-sensor-mod/blob/master/magnet-holder-6mm-dual.scad. Much easier for my old alcohol addled noggin to find it's way around. :D

hall_mk2_1_model.png
 
Last edited:
Upvote 0
I've tried the Alegros at 3.3v and no dice, recently in fact. Was sussing it out as a sensor for a handbrake to mate with my Fanatic wheelbase but it runs at 3.3v. I thought I had luck with them in the past so glad I tested before committing any mechanical work to that sensor for that application.

That said, the Honeywell sensor that is being used in the CSL mod from a few posts ago rates it down to 3.3v so might work and is the same form factor. I'm not sure if it's the same type of sensor and haven't played with the ones I have yet so can't say. The guy that did the simple mod with it insisted it operated linearly in the arrangement, as have subsequent adopters. Guess it's time to get out the breadboard and see what it does on the bench.

I'm glad to be corrected in my misinterpretation of how Halls work though, was sort of a victim of early success as I quickly stumbled onto working solutions with predictable behavior to changes before figuring out why. My observations were correct but my conclusions were not and I always felt like there was more to the story but knew enough to get by so focused on other things. I happily stand corrected though :p

Hi, where is the CSL mod post? Thanks
 
Upvote 0
I've done some experimentation since my last post, to clear up a few hanging questions to explore the validity of the simple proximity arrangement of a Hall.

First off, I need to correct myself from an earlier post where I said Alegro sensors don't work at 3.3v. They do in fact work at that voltage. I didn't explore if there was any degradation to their normal output but it seemed normal. My initial statement was based off an invalid bench test I dis not long ago that I only discovered during these tests. My bad.

Next I explored the Hall mod of CSL pedals with the simple proximity arrangement of magnet/sensor. There was question as to the linearity of this arrangement and for my first step just doing the mod and rough testing it with the pedal ended up being the simplest bench test.

The mod was easy to install using the printed pedestals (needed a pinvise to chase the holes for the pins) amd I followed the formula to the T using the same size/strength/arrangement magnets and the same Honeywell sensor.

Result: to no one's surprise the output is in fact not linear. It was hard to quantify how far off since the pedal is an irregular shape and req too much visual estimation to say much more than it's not linear. Taking it one step further I made a simple bench testing unit to establish relations a bit better. Not super precise but much better than using the pedal.

qS8WjZb.jpg


0hhAp8a.jpg



For testing I just used the simple windows game controller window/Fanatec pedal one with the 'enable manual mode' checked to allow me to set min/max outouts with ease. When I replicated the throw of the Fanatec pedal (~5/8" travel ending about 1/8" in front of the sensor) the results matched what I saw with the pedal itself.

The first 75% of the magnet's travel was about 1/2 the signal and the last 25% of magnet travel comprised the last 1/2 of the signal out. It curved slowly up until it hockey stick'd at the 75% travel point and the sensor seemed to saturate a little before the stop. I uninstalled the mod so I could keep using my pedals while I worked this out.

I tested the Alegro sensor the same way and it was a little worse with the linearity but fairly similar results. I did read somewhere that the output of Halls should be linear for at least a portion of this so I started testing different ranges of motion and different stopping points. I played around with some other magnets but nothing altered the fundamental results.

Ultimately I did find a nice sweet spot... having the magnet stop 1/4" from the sensor (was saturating at 1/8") and only using 1/4" of travel for full swing. As closely as I could eyeball the hashmarks on my shop scale and as close as I could eyeball the gui in game controller settings window it seemed dead linear. I was testing it at 1/16" stations where 1/16" = 25% the output.

I'm probably still going to mod my CSL's this way but my next test rig has to move the sensor in an arc instead of straight linear. To keep the CSL mod simple (proximity sensing otherwise I'd just gear a Hall same as the pot lol) I want to use the pedal's swing but have to mount the magnet at a lower radial station to achieve the shorter throw. This then rotates the magnetic field that much more as it travels and I'm not sure what effect that will have on the sensor's output and bench testing it will be the easiest way to find out.

Conclusions/tl;dr:

1. Alegro sensors do indeed work at 3.3v
2. The CSL Hall mod as posted is not linear if followed precisely
3. linear output can be found using Halls this way but over a much shorter range, like 6-7mm

sensor: Honeywell SS49E (and Alegro 1324 briefly)
Magnet: 10x5mm disc, N52
 
Last edited:
Upvote 0
Nice work @mechsicko ! I have been a bit busy with work so I have stalled a little on the project, but I'm hoping to pick it back up later next week. I'll give the A1324 a go at 3.3v in my test pedal to compare it to the pot output when I do
 
Upvote 0
Wow, that's surprising (in a nice way :)). What output was the A1324 giving with no field? (I had expected that it would still to give out 2.5 V, and then clip heavily on the high side...)
 
Upvote 0
Why is it so easy to overlook the things you need to know so you don't engineer/code by coincidence? :)

1.65v

Very surprisingly smack in the middle...
Wow, pretty perfect! Not quite what the datasheet implies, but in fairness the supply voltage is outside the stated range anyway so I guess all bets are off :)
My guess had been that it had an internal reference, because the quiescent output is 2.5 +- 0.075 V (+- 3%) even though the supply voltage has a +- 0.5 V range (+- 10%).

1602867250331.png
 
Last edited:
Upvote 0
Really looking forward to this!
I designed an hall pot to mount on the existing pot hole, printed a model but needs to be tested further (I leaved the project for better times since I printed it and works good but I have no more access to 3D printer to test the latest fixes), if you guys would like to give it a go I would happy to share the model with you ( would like to give a look to your model too if you don't mind), just need to drill 3 small holes at the bottom to let the sensor connections pass.
It was designed to be used with 2 5x5mm magnets and the hall sensor in the middle (plus a clip to put the hall pot in place when attached inside the pedal).

last edit.JPG
bottom.JPG
magnets.jpg
eclip 9mm.jpg

I got inspired by this vid for my model (and it explains somehow how it works mine too)
 
Last edited:
Upvote 0
if you guys would like to give it a go I would happy to share the model with you
Nice! Definitely interested in your design. I had started to look at a variant that replaced the pot so that it was more universal, but work recently got busy (got sidetracked with telemetry too! :D)

I'm curious how you are mounting it. There doesn't appear to be anything on the static part of the model images in your post for the clip to engage.

If you have the designs in some kind of cad format, I'll be keen to take a closer look. Either way you have given me some ideas :thumbsup:
 
Upvote 0
Nice! Definitely interested in your design. I had started to look at a variant that replaced the pot so that it was more universal, but work recently got busy (got sidetracked with telemetry too! :D)

I'm curious how you are mounting it. There doesn't appear to be anything on the static part of the model images in your post for the clip to engage.

If you have the designs in some kind of cad format, I'll be keen to take a closer look. Either way you have given me some ideas :thumbsup:

I have the Sketchup file (I am on Fusion now) so I think you can open it without issues since there is a free web version of it but I can provvide stl too (if you want to print it).
About the clip, the hall pot replaces the actual one, once you insert it on the pedal you need to put the clip to fix it in place (the clip snaps to the shape) and then you insert the pedal black plastic gear and lever.

photo_2020-11-18_03-02-27.jpg photo_2020-11-18_03-02-29.jpg photo_2020-11-18_03-02-30.jpg photo_2020-11-18_03-02-25.jpg

(sorry for the pics, late night here lol)
 
Last edited:
Upvote 0
About the G27 pots I found something interesting (I can't link the source anymore, sorry).

"I have not located a source for Identical replacement.
All the replacement Pots I've tested are Linear 10K pots, and they do not provide the same resolution or Steps as the OEM Logarithmic 10K Pots do.

They are a special type of 10K ohm Pot.
These have 6 fingers, and use a Logarithmic scale instead of the Standard Linear Scale.
The centre Carbon ring gives the Pot a Minimum Resistance, it never drops all the way to Zero (35 ohms is what I measured)
They also are only 180 degree pots, when the Resistance values are measured, it really is only a 100 degree range.

I bought what many web sites and blogs, claimed to be the replacements.
Yes they are 10K pots, but that is the only thing the replacements have in common.
I compared the replacements Side by Side to the OEM pots.
The replacement Pots are Linear, and have almost a full 300 degree range.
While they will give some pedal values, you won't have the full 256 steps of the Standard Logitech Pedals.
So they probably will work, but with Limited control steps."


Probably you need a logarithmic hall sensor then (if exist)?

Another couple of useful links here.
 
Last edited:
Upvote 0
I have the Sketchup file
That would be perfect. The STL is ok, but I'm more interested in tweaking the design if you are ok with that.

Probably you need a logarithmic hall sensor then (if exist)?
Not sure if the charts I posted above are very clear, but they show that the pots inside the G29 are as linear as the A1324 over the range of the pedal, and I suspect those in the G27 are the same after @Neilski and I compared part numbers. They have a reduced range of rotation to an off-the-shelf 10K though, which I think is the actual problem.

Another couple of useful links here.
Yeah, they are pretty neat. @mechsicko posted his miniature variants earlier in this thread too!
 
Last edited:
Upvote 0

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top