Author Topic: G940 MODDING (Warning large pictures)  (Read 2632 times)

Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
G940 MODDING (Warning large pictures)
« on: June 20, 2011, 10:48:18 PM »
HOW TO FIX YOUR LOGITECH G940 JOYSTICK

First off, CLICK HERE for a direct link to this webpage

I've been putting off repairing my G940 until the warranty ran out. Well guess what? It's expired now! So the question is.. what's wrong with the G940? Two words: REVERSAL BUG. This is a known 'bug' in the joystick's logic and Logitech is being a huge PITA about fixing it. From what I understand their engineers believe that this is a feature of the stick and NOT a bug. They call it 'hysteresis' and claim that it must exist.

Here's a quick run down:

Lets say you start at 0% throttle. As you slowly increase the throttle you would expect it to do the following:

0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12%

Easy enough to understand, right? OK lets say at this point you decide to slowly reduce your throttle. You'd expect to see this:

12% 11% 10% 9% 8% 7% 6% 5% 4% 3% 2% 1% 0%

Still with me here? OK Good. Logitech has implemented a 'hysteresis' upon reversal of an axis to help compensate for something called 'pot jitter'. Have you ever slowly turned the volume knob on an old radio only to be scared silly by a loud SCRATCHING noise coming from the speakers? This is due to an extreme amount of jitter called 'spiking'. Joystick potentiometers are very similar and lower quality pots will do this under normal circumstances. Granted it's only a little bit but it can still happen. Logitech decided to use firmware logic to slightly reduce the sensitivity when the direction is reversed. It's actually a brilliant solution and if properly implemented, if you were to slightly reduce your throttle you'd see this as you slowly move the lever:

12% 12% 12% 11% 10% 9% 8% 7% 6% 5% 4% 3% 2% 1% 0%

The problem is that it has NOT been properly implemented, and instead what you get is this:

12% 12% 12% 9% 8% 7% 6% 5% 4% 3% 2% 1% 0%

Do you see the difference? It registered no movement at first but then JUMPED to compensate for the physical travel. This makes fine-tuning things extremely difficult and the amount it jumps varies depending on the axis. It's about 3% for the rudders, 5% for the throttles and 3% to 4% on the trims. It also exists on the toe brake axes, the mini-stick axes and even the PRIMARY X and Y axes of the joystick itself! This is especially confusing considering the primary X and Y axes use hall effect sensors instead of potentiometers!


In December 2010 Logitech released a new firmware which greatly reduced the amount of hysteresis in the primary X and Y axes, reducing it from about 1.2% down to about 0.15%. Yes it's still there but to be fair it's almost impossible to notice while flying – even during precision maneuvers such as formation flying and dogfighting. The problem is that all of the other axes have just as much hysteresis as before! Not a single word has been heard about software/firmware development for the G940 since then and that was SIX MONTHS AGO! Time to take matters into my own hands now.

The whole idea of this modification is to leave the stick itself alone. While it may be possible, rewiring the stick's primary axes would result in loss of Force Feedback and that would defeat the purpose of it all. I could rewire the three trim knobs and the mini-stick on the main stick but I don't see a huge need to as none of those axes require precision.

Instead I rewired the seven axes of the throttle and rudders through a third-party controller board, leaving the buttons intact so that they can still be programmed through the Logitech software. I chose Leo Bodnar's BU0836 controller board as it can handle up to 8 axes and a whole bunch of buttons. Maybe later I'll add some custom controls to the board but for now I'm only worried about the axes. I suppose you can use just about any stick's circuitry but I chose the BU0836 because of its easy to use layout and because I didn't feel like butchering an old stick just for its electronics.

The factory configuration of the G940 requires that the throttle and the rudders connect to the stick using 9 pin (DB9) serial cables. The stick then connects to your computer with a USB cable and a power supply is connected as well. The new configuration has the rudders connecting ONLY to the BU0836 controller board. The throttle is now connected to BOTH the BU0386 and the G940 joystick, and of course the Joystick itself has remained unchanged.


I spent about $10 at monoprice.com on some adapters to make the wiring go easier. Here's a picture of the adapters I bought:



On the left is a CAT5 connector I ended up not using. On the right is a DB9 (serial) to RJ45 (network) adapter of which I bought four of. A couple spares just in case. They were cheap and came in VERY HANDY!


The first thing I did was to remove the base of the throttle. There are eleven screws total so make sure you have a thin phillips-head screwdriver handy as the holes aren't very large:




Once the screws are all out you need to peel back half of the rubber feet – the halves with the holes in them. Be careful not to tear the rubber like I did:




Now you can remove the base but be careful here. You can open it up just far enough to get your hand in and undo the larger four-pin connector. This must be unplugged in order to get the base out of the way:




Once you have the base out of the way you will see this:




Here is a close-up of the circuit board. You will end up rewiring all four wires of the smaller four pin connector as well as four of the pins from the twelve pin connector as marked here:




On the base itself, there was plenty of room to install the RJ45 end of one of the adapters. I ended up cutting a rectangular hole in the base of the G940 throttle. I also ended up cutting off half of the adapter's housing (the part that accommodates the DB9 serial plug) as it's not needed here:




Next you have to extract four of the twelve wires from the twelve pin connector. I suppose you could just cut the wires but I wanted my operation to stay reasonably reversible just in case. You can release the wires by inserting a thin tool (in my case a small sewing needle did the trick). You have to insert it between the wire and the clip holding it in place. Then pry the clip back just enough to release the wire and slide it out. It's almost an operation that required three hands so if you have a friend handy it will go much easier:



Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
Re: G940 MODDING (Warning large pictures)
« Reply #1 on: June 20, 2011, 10:49:13 PM »


Here is a blurry picture of the clips on the backside of the four pin connector. The clips on the twelve pin connector are exactly the same. Be careful not to bend it too much as it might break:




Here's a picture of the twelve pin connector with the wires extracted (and the connecter reattached):




I happened to have an old CD-ROM audio cable laying around and I noticed its small four pin connector was identical to what is used here, so I installed the four wires I extracted into that connector. This step isn't necessary but I thought it would keep things looking clean and relatively professional:




Next I found some solid network cabling and extracted the wires from it. I also extracted the pins from an old VGA cable I had laying around:




Then I soldered the pins to the wires:




Then I inserted the pins into the two four wire connectors and used some shrink wrap to make a harness in order to keep things neat, tight, and free of electrical shorts. I also took the time to install a zip tie to keep the wires that remained on the twelve pin connector from flexing. A hardware issue with these is that as you move the throttle the wires flex at the connector causing buttons to quit working intermittently and causing the trims to do crazy things. You want to keep enough slack on the wiring going up the throttles so that it isn't stretched at full throttle, but you want the wiring at the connector to not move at all while moving the throttle. This is where the zip tie comes in handy:




Here's another look at my harness except this time connected to my network connector. The female pins for the serial adapter worked out great as I was able to slide the stripped ends of the wires into them and crimp them tight. Then I heated it up with a solder iron and the solder flowed right into the slots on the sides of the pins keeping everything nice and secure:




I suppose that if I had planned it better I could have made something work that didn't require so much soldering but it's not a big deal. The biggest problem I have now is that if I take it back apart I have no easy place to simply unplug it but the network plug fits tight enough to not move while plugging in the cable, but loose enough so that I can push it out if I ever have to disassemble it again.

When reinstalling the base don't forget to reconnect the larger vertical four pin connector:




And here's a final shot of the rear of the throttle:



Once you get to this point you can connect the throttle back to the stick with the original serial cable (don't worry about the new connections just yet) and make sure all of the buttons still work. All of the axes will still be present, but will be 'stuck' at 50%.

The rudders themselves are much easier to modify. Since there are no circuit boards or processing chips involved you can simply tap into their 9 pin serial connector. Also the fact that there are no buttons on the Rudders makes things even more simple. No dis-assembly required! There are only five pins you need to access.


OK so you're thinking that this is all fine and dandy and all that, but “how do I know what wire goes to where?” I've created an easy to use chart for you. What type of wire you use and how you do it isn't so important as is making sure the right wire gets to the right connection. The wire colors of the chart are the same factory wire colors used in my G940.

The throttle trims (R1 and R2) use black, white, pink, and light blue wires. The throttles themselves use black, yellow, dark blue, and red wires. Make sure you don't confuse the black wire used for the trims (1) with the black wire used for the throttles (2). In case you haven't figured it out, “W” stands for “white”.

For the rudders, instead of colors I used pin-out numbers. I didn't feel like taking them apart just to get the wire colors:




Here's a picture of the BU0836 controller board. It's VERY tiny and comes with connectors. I found that soldering to the connectors proved to be a pain in the rear and I ended up using a USB motherboard connector and a speaker wire connector to make the rudder connections:




This is the BU0836 fully connected. Yes, it looks rough because I haven't purchased a project box for it just yet but I will soon. Mainly I wanted to get everything connected and make sure it works. You'll notice that my wire colors don't match that of the diagram but that is because the wiring that came with the adapters don't quite match up. What's important is that the proper wire gets to the proper terminal of the BU0836 board:




Here is a run-down of how it shows up in the device manager. This is Windows 7 but I see no reason why it wouldn't run on Vista or XP either. No drivers had to be installed. It's a simple matter of calibrating and you're good to go:




Last but not least here's a final diagram of how everything is now connected to each other after the modifications are complete:



The reversal bug is NOW GONE!

I hope you've enjoyed my write up! Feel free to contact me at thereisnospoon@ympsa.com if you have any questions!

Offline Chalenge

  • Plutonium Member
  • *******
  • Posts: 15179
Re: G940 MODDING (Warning large pictures)
« Reply #2 on: June 21, 2011, 03:36:54 AM »
Wow! Do yourself a favor and work on your solder joints!  :D Heatshrink would help too.

I did a quick scan of the microprocessor pinout that they are using and I believe you could accomplish the same thing with a resistor and two capacitors... but before I recommend a change I would want to test one myself. Since I dont use those stick its not likely to happen. ;)
If you like the Sick Puppy Custom Sound Pack the please consider contributing for future updates by sending a months dues to Hitech Creations for account "Chalenge." Every little bit helps.

Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
Re: G940 MODDING (Warning large pictures)
« Reply #3 on: June 21, 2011, 11:15:44 AM »
Wow! Do yourself a favor and work on your solder joints!  :D Heatshrink would help too.

I did a quick scan of the microprocessor pinout that they are using and I believe you could accomplish the same thing with a resistor and two capacitors... but before I recommend a change I would want to test one myself. Since I dont use those stick its not likely to happen. ;)

Sorry I'm not an electronics genius like yourself.  Using a resistor and two capacitors as opposed to what?

All I know is the inputs are steady and the connections are secure.  If I ever have a problem I can always go back in and 'perfect' things but if it's working well I see no reason to go back into it.

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: G940 MODDING (Warning large pictures)
« Reply #4 on: June 21, 2011, 11:22:34 AM »
nice mod :aok
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: G940 MODDING (Warning large pictures)
« Reply #5 on: June 21, 2011, 01:01:10 PM »
I did a quick scan of the microprocessor pinout that they are using and I believe you could accomplish the same thing with a resistor and two capacitors... but before I recommend a change I would want to test one myself. Since I dont use those stick its not likely to happen. ;)

I really don't understand that quote at all.  He's basically replacing the G940 controller, which has software that implements the silly hysteresis, with a completely new controller and just using the pots from the G940.  That seems to me to be the only way past the hysteresis introducing driver software.  How is a resistor and two caps gonna do that?

That BU0836 looks really cool.  I don't have a G940 but I think I'll get one of those BU0836 and build my own controller (a steering control for tanks).  Thanks for the post Trigger29!

Offline Chalenge

  • Plutonium Member
  • *******
  • Posts: 15179
Re: G940 MODDING (Warning large pictures)
« Reply #6 on: June 21, 2011, 05:03:25 PM »
Its 'firmware' not software and Im saying that he didnt need to do all that at all. He is correct though that the engineers on this made it way more complicated than it needed to be.
If you like the Sick Puppy Custom Sound Pack the please consider contributing for future updates by sending a months dues to Hitech Creations for account "Chalenge." Every little bit helps.

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: G940 MODDING (Warning large pictures)
« Reply #7 on: June 21, 2011, 05:50:40 PM »
I'm intrigued too - how do you mod the hysteresis algorithm in the firmware using just using 3 analogue components?

the source code, an assembler and some way to flash the prom would be my first choice.

 :headscratch:
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
Re: G940 MODDING (Warning large pictures)
« Reply #8 on: June 22, 2011, 04:42:42 PM »
I'm intrigued too - how do you mod the hysteresis algorithm in the firmware using just using 3 analogue components?

the source code, an assembler and some way to flash the prom would be my first choice.

 :headscratch:


Beats me, but it still seems WAY more complicated than it needs to be.  So you're doing a procedure that is WAY too complicated to fix a problem that is a problem because Logitech made it WAY too complicated... resulting in a 'fix' that is WAY too complicated (squared!) that may or may not work.

I still fail to see how installing analog components will cure a firmware bug.  Ideally the 'easiest' fix would be to write a custom firmware for the stick, but unfortunately I'm not a programmer.

For the record, I just had a chance to test it out on AH today and OH MY GOD!  WHAT A DIFFERENCE IT MAKES!  The zip tie also fixed my R1/R2 spiking issues as well as fixing an issue that made it so the T3 and T4 buttons didn't work when the throttle was at 100%.  Crazy how flexing that connector causes all of those issues!

For the record, I felt the need to make this write-up because while many people complain about the G940's hysteresis issues, there is almost no information out there about making the actual modifications... especially as far as the wiring goes.  I hope my diagrams are clear and precise.

Offline Chalenge

  • Plutonium Member
  • *******
  • Posts: 15179
Re: G940 MODDING (Warning large pictures)
« Reply #9 on: June 22, 2011, 11:28:14 PM »
I think you guys are focusing incorrectly on the IC and post-process instead of the sensor itself and the hysteresis which I was intending to treat as feedback. Like I said... before I suggested values I would like to play with one and see what I can do (which is pointless because it isnt likely to happen). I believe the control throws would change but I dont think the center values would. Otherwise... if you dont know that there are analog components on this board then you probably shouldnt bother considering it and considering Tiggers soldering... wouldnt work anyway.

If you like the Sick Puppy Custom Sound Pack the please consider contributing for future updates by sending a months dues to Hitech Creations for account "Chalenge." Every little bit helps.

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: G940 MODDING (Warning large pictures)
« Reply #10 on: June 23, 2011, 06:53:52 AM »
bypassing the IC is the whole point of this - the sensor sends raw data to the IC, which adds the hysteresis and then sends the altered data out via USB.

as for the soldering, it may not be pretty but it looks electrically sound which is all that really matters. its really not that easy to solder with consumer AC irons either, I struggle with them. otoh Ive even mounted SMC packages using just the standard tips on my weller station without any trouble. next time I do a project I might take some pics and post here as a soldering class, as very few people have actually been taught how to solder properly :)
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: G940 MODDING (Warning large pictures)
« Reply #11 on: June 23, 2011, 01:18:48 PM »
Hysteresis is a nonlinear response and cannot be created or removed with linear (ie resistors/capacitors) components.

Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
Re: G940 MODDING (Warning large pictures)
« Reply #12 on: June 23, 2011, 03:14:40 PM »
bypassing the IC is the whole point of this - the sensor sends raw data to the IC, which adds the hysteresis and then sends the altered data out via USB.

as for the soldering, it may not be pretty but it looks electrically sound which is all that really matters. its really not that easy to solder with consumer AC irons either, I struggle with them. otoh Ive even mounted SMC packages using just the standard tips on my weller station without any trouble. next time I do a project I might take some pics and post here as a soldering class, as very few people have actually been taught how to solder properly :)

Thank you.  I did that with a $10 soldering iron.  With better equipment and more experience with an Iron I'm sure I could do a better job but the little bit of soldering I do doesn't exactly warrant spending any money on better equipment.  On cars I do a lot of soldering which is almost ALWAYS wire-to-wire or wire-to-crimp-connector soldering and I use a butane torch and shrink wrap for that.  As far as the shrink wrap goes (or lack thereof) if you look closely you can see that I used shrink wrap in the harness going to the back of the stick.  I wrapped the rear section with tape any my controller board connectors with tape as well for the following reasons:

1> Tape is easier to remove and I didn't want to slice wires on accident while trying to remove shrink wrap if I had to dig back into it all.
2> I ran out of shrink wrap and was too excited about getting the project done to go to the store to get more.
3> I knew someone on here would troll about me using tape instead of shrink wrap and that makes me happy!
4> It's all going to be hidden anyway in a controlled static environment so all in all... why does it matter?

Like I said before, we're not all Electronics geniuses here.  The connections are all electrically "good" and you know what?  If I screwed up bad enough to need to go back in a redo everything.. well that's my problem and not Chalenge's right?  As it stands, I'm getting good solid signals from my 'butchered' wiring and I'm very happy with the results.. REGARDLESS as to how much trolling Chalenge does.

As far as Chalenge's proposed 'fix' he needs to keep in mind that I didn't do this modification to eliminate spiking from the pots.  I did it SPECIFICALLY to bypass Logitech's logic.  Their Hysteresis is a feature programmed in the FIRMWARE.  The reasoning behind it is to compensate for a small amount of pot flicker or spiking but it's one of those things where their proposed treatment is worse than the disease itself.

If you ask me, I feel that Chalenge's posts are all about making himself look good and making everyone else look bad rather than to legitimately try to help and as a result he really has no business posting further in this specific thread.  But that's my opinion.

Offline Chalenge

  • Plutonium Member
  • *******
  • Posts: 15179
Re: G940 MODDING (Warning large pictures)
« Reply #13 on: June 23, 2011, 09:06:54 PM »
Thanks for pointing out your opinion Tigger. My opinion is you dont like criticism. I was actually trying to make things easier for anyone that comes along behind you and tries to do the same modification. I dont think the design engineers did a very good job and over reached when the circuit could have been a lot better. Im against Halls Sensors anyway because they introduce jitter (obviously) and in the case of this particular controller there is significant lag and a more narrow response. The programming is an attempt to remove the jitter which is still present in your modification whether you notice it or not.

Its not genius Tigger its called training. But since you made such a point of going negative about my post I will make sure in the future to point out when I believe you are expressing an opinion on things you have zero experience about... and I have noted a lot of that from you.
If you like the Sick Puppy Custom Sound Pack the please consider contributing for future updates by sending a months dues to Hitech Creations for account "Chalenge." Every little bit helps.

Offline Stellaris

  • Nickel Member
  • ***
  • Posts: 402
Re: G940 MODDING (Warning large pictures)
« Reply #14 on: June 26, 2011, 02:23:38 PM »
In the absence of a circuit diagram, I think what's being suggested is to put the 2 caps and a resistor in the circuit in T or C configuration as a simple FIR averaging filter to insert what Logitech is calling hysteresis (in a strict sense, this isn't actually hysteresis, but call it what you will).  However the inputs will still go through the firmware, which will still add its own hysteresis (in a strict sense, averaging, but call it what you will), so the problem will not be solved - and in fact the response will get muddier since the problem is already too much filtration.  To make this work you'd still have to have your own digital interface, so why not just do it all with the interface?

In theory the firmware filter is better, since it can be made adaptive, software controllable and can be updated as required.  However Logitech hasn't made it adaptive, software controllable, or updated it very much.  Which is too bad, because though I love my G940, I'd love it even more if I could use my pedals with fine control, rather than just stomping on them to overcome whateverthehell it is that Logitech thinks it's done to handle spiking pots.  What they need is a simple configuration file so you can set the curve yourself - for EVERY axis.  Fixing this is a weekend project if you already have the source, and Logitech can't find the engineering time to properly fix their top-end product???  Epic fail!

Anyway Tigger, great job.  You can mod my stick* any time, electrical tape, $10 dollar iron and all!

Paul

*pornographic jokes about "modding my stick" are entirely possible here.  But really, you're better than that, right?