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:
Hi! Yes, you are correct, I did say 3.3v, but this is because I am using the G29 which supplies 3.3v. I believe all the previous models are 5v.


It might be better to measure the voltage coming out of the A1324 first to double check things are working ok. The distance and strength of the magnets are quite critical to the design. Can you post a photo of your setup here?

well, when i check voltage on hall sensor pins, it reads exactly as it reads on the arduino side(around 5.03, 5.04), i'm using 6x3 neodum magnets and i have around 100 magnets, tried with bunch of them.

when i tried sensor without housing with bigger magnet there was no problem with readings. Can 3d printed pla part block sensor reading? i printed mine with 100 infill since there was no signicficant time diffrence between 20%.

i didnot use breadboard to test it, i wired it up directly to pedal pins with correct terminals and so, and placed my hall sensor in 3d printed part(it was really tight fit).

Is there anyway i can check sensor readings besides windows calibration tool?
 
Upvote 0
Hopefully not reviving to quiet of a thread, but thanks for all the work y'all put in, and curious any thoughts of this. Mocked it up, it seems like it should be getting around 6-8 steps per mm of travel on the spring perch? If anything seems terribly off please me know! Still working on printing some final mounting pieces before getting some racing in on it. I also joined the RD discord if anyone is there.


PXL_20210223_151525012~2.jpg

PXL_20210223_181533650.PORTRAIT.jpg
unknown-13.png
 
Upvote 0
curious any thoughts of this
That looks usefully simpler than coaxially twisting magnet.
getting around 6-8 steps per mm of travel
.. so graphed Output is digital count (16-bit ADC?) with Distance in meters?

What Hall sensor chip is used? My eyes cannot make out digits from image,
and I do not recall a sensor chip with a dimple.
 
Last edited:
Upvote 0
That looks usefully simpler than coaxially twisting magnet.

.. so graphed Output is digital count (16-bit ADC?) with Distance in meters?

What Hall sensor chip is used? My eyes cannot make out digits from image,
and I do not recall a sensor chip with a dimple.

A1324LUA-T IC? Sorry, I definitely could have provided more useful info haha. X-axis is in inches, measuring the distance between my spring perches. I have around 1-1.5" of travel. The output was just from DIView, the actual output is 10bit, giving around 250-300 steps in the range of travel, or ~6 steps per mm I think.
 
Upvote 0
Max (DIView) output reads around 25,000, which would be 100 for each of 250 steps,
but minimum graphed is around 11,000, so 14,000 DIView excursion.
Mapping that to 140 steps, then sensitivity is about 7 steps per mm for 19mm travel.
140 nearly linear steps should suffice for throttle travel and be overkill for clutch.
Given a simple layout avoiding wire flex and anchoring mini magnets to pedal arms
well out of harm's way, this seems a winner.

An experiment for increasing sensitivity could place the Hall sensor on iron instead of polymer.
 
Last edited:
Upvote 0
Max (DIView) output reads around 25,000, which would be 100 for each of 250 steps,
but minimum graphed is around 11,000, so 14,000 DIView excursion.
Mapping that to 140 steps, then sensitivity is about 7 steps per mm for 19mm travel.
140 nearly linear steps should suffice for throttle travel and be overkill for clutch.
Given a simple layout avoiding wire flex and anchoring mini magnets to pedal arms
well out of harm's way, this seems a winner.

An experiment for increasing sensitivity could place the Hall sensor on iron instead of polymer.

Some more data to maybe clarify some and add some more input. This is really using the earlier design that is linear within a small, close range to the sensor. I feel the logitech pedals have pretty little travel though, so maybe it's sufficient. Varied some different combinations of magnets, having to change location based on intensity as well which likely compiles to worse linearity.

Currently printing a new mount for the sensor that should bring it closer to the magnet widening the linear range a bit more.

unknown-16.png
unknown-21.png
 
Upvote 0
Some more data to maybe clarify some and add some more input.
That's looking far more linear than I would have expected an arrangement like that to deliver - nice! :thumbsup:

For me though, the approach of just hijacking the Logitech pot to use it as a shaft for the magnet-holder is so simple that it kinda wins as a retrofit. (Near-perfect linearity is basically for free, though admittedly not vital).

On a custom pedal setup without the Logitech gearing+pot, I'd be keen to try and use something like you've gone with if I could achieve adequate linearity (which looks like a big "yes", given your results).
 
Upvote 0
That's looking far more linear than I would have expected an arrangement like that to deliver - nice! :thumbsup:

For me though, the approach of just hijacking the Logitech pot to use it as a shaft for the magnet-holder is so simple that it kinda wins as a retrofit. (Near-perfect linearity is basically for free, though admittedly not vital).

On a custom pedal setup without the Logitech gearing+pot, I'd be keen to try and use something like you've gone with if I could achieve adequate linearity (which looks like a big "yes", given your results).

Yeah, that seems like a pretty fair conclusion. My main reason for getting rid of the pot was just for appearance, although I suppose I could have kept the gears and ran a shaft on the inside.
 
Upvote 0
Yeah, that seems like a pretty fair conclusion. My main reason for getting rid of the pot was just for appearance, although I suppose I could have kept the gears and ran a shaft on the inside.
Ah, yeah good reason then. Mine still live in the original housing with 5 million screws keeping it together.
 
Upvote 0
Hi all,

First, thank you so much for posting this. I for one do not take it for granted.

Second, I tried to this config my way using A1324LUA-T and two 5*5*2 neo magnets :

one sensor two magnets.jpg


They're they're attached as opposite poles moving up and down. Maybe you can teach me how to plot those linearity charts so I can share the utility of this config. The response feels linear end to end just by looking at the response in game and DIView. Takes a bit of tuning (the distance between the mags and the distance from the sensor) and sure doesn't look linear when not tuned.

My reason for this config is not having easy (enough) access to a 3D printer. If it didn't feel good enough I would just buy prints of your design.

It's held in place with a piece of cardboard wrapped in electrical tape, then two sided tape on each side.

Right now it's just funny to me how much better than the pots this feels.

Thanks again :)
 
Upvote 0
Nice work @Adiel Pansky :) The acid test for any sensor mod is: does it do the job for you on track? If so, it's gotta be better than those noisy Logitech pots! :D

Linearity charts: I can't fully remember what I and others have posted in this thread but it's always gonna be about plotting Y vs X (and maybe calculating correlation coefficients too), where let's say Y would be the response of your sensor and X could be either the distance through which the pedal has moved or (in my case) the response of the original Logitech pot. To do the latter, you need some way to read both the Hall sensor and the pot at the same time. You could do that without extra hardware, e.g. by just hooking your clutch wires to the sensor and the accel wires to the pot for the same physical pedal and then noting down some values with a tool like DiView. I did it by using an external Arduino board (thanks to @GeekyDeaks :)) which has multiple ADC input channels.
 
Upvote 0
1615418628747.png


Got it. Thanks again. You rock.

This is position\step. 192 steps. Number of steps is greatly affected by speed (faster=lower, like 100 steps less) same as the pots (Logitech refresh rate?). Delta(ms) between steps is the same as the pots (~15 max) .



@Neilski When I hold full throttle, it goes and stays there, so yeah, better lol
 
Upvote 0
As this topic was very valuable to me, I would like to leave my contribution, I don't know if it will help much.
I measured the output voltage variation when the 49E sensor is powered by 3.3V in three cases, with a meodymium magnet rotating on the top of the sensor (as in the initial photo of this topic), with two magnets rotating around the sensor (magnets attracting each other), and with two magnets positioned 4cm apart with the sensor in the middle (magnets repelling each other).

Remembering that the rotation of the logitech g29/920 potentiometer is 55º
Result of the first case (a magnet rotated on top of the sensor)
1 sensor hall.png


Result of the second case (two magnets rotating around the sensor)
2 sensor hall.png



Result of the second case (two magnets arranged linearly)
2 liner sensor hall.png

As can be seen, in rotation it has a more linear response range, and as the first case the linear range was approximately 60º, I chose to use it that way.
I put the sensor and the magnet in an improvised way to test, I had the impression that it was less sensitive, with lower resolution than the original potentiometer, but it remained unchanged, the reading is stable.
 
Upvote 0

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 102 7.9%
  • 75% online 25% offline

    Votes: 134 10.4%
  • 50% online 50% offline

    Votes: 183 14.2%
  • 25% online 75% offline

    Votes: 361 28.0%
  • 100% offline racing

    Votes: 503 39.1%
  • Something else, explain in comment

    Votes: 5 0.4%
Back
Top