Introduction: Thrustmaster Warthog Slew Sensor I2C Upgrade

This is a rough guide on how to interface with the I2C protocol used on the Thrustmaster
Warthog throttle slew sensor. This can be used to upgrade from the fairly useless standard ministick to something better, But still using the standard USB controller in the throttle unit. This is based off an original post on:

https://forums.eagle.ru/showthread.php?t=200198

A basic understanding if the I2C protocol is assumed for most of the following steps, for an excellent explanation go to:

https://learn.sparkfun.com/tutorials/i2c

Any specific questions, feel free to ask me, and I will try to add to this intractable in the future with more relevant information. This is by no means complete, but should be a good starting point.

Some demo Arduino code is provided but please only take this as a reference as a normal 5V Arduino cannot be used without modification.

Step 1: Existing Sensor Details

The ministick slew sensor that comes with the Thrustmaster Wathog throttle
is well known to be one of the biggest weaknesses with an otherwise excellent product. There have been a number of attempts by people to replace it with something better over the years, but most have come up against the difficulties of interfacing with the digital I2C protocol used by it.

The exact sensor used in the Warthog throttle is the N35P112 - EasyPoint, which uses the AS5013 hall effect sensor IC made by AMS.

Datasheet:

http://ams.com/eng/Products/Magnetic-Position-Sens...

Interestingly the unit was once available as a breakout module by Sparkfun:

https://www.sparkfun.com/products/retired/10835

The sensor is meant for navigation applications in things like mobile phones, and is extremely cheap. In my opinion unacceptable in something that costs nearly $500.

Step 2: Pinout

The sensor connects to the PCB in the right hand throttle unit via micro 5 pin connector.

Pinout is as follows:

  1. Vcc +3.3VDC (

    Locally regulated from 5V by a linear regulator on the other side of the board, just behind the connector, should be good to arround 20mA, but I have in no way tested this)

  2. I2C SDA
  3. I2C SCL
  4. GND
  5. Button 1 (Normally high, internal 5V pullup)

Step 3: Protocol Description

The sensor operated on I2C address 0x41 - all write or read commands start
with this address.

When the throttle is connect to the computer, there is a preamble of around 250ms on the I2C bus to address 0x40, I assume this is for a different sensor version or something similar, but it's not relevant to us.

The data sent on the I2C bus in normal use is below, this must be simulated by our microcontroller to talk to the throttle.

Setup - This data is sent once, around 500ms after the USB is connected, to set the original sensor up for use.

Master Write: 0x0F (Control Register 1)

Data: 0x02 0b0000 0010 (initiates a soft reset)

Master Write: 0x0F (Control Register 1)

Master Read: 0xF1 0b1111 0001 (resets to 11110000, lsb 1 signifies valid data is ready to be read. We must reply to this command correctly to be recognised as a valid slave device)

Master Write: 0x2E (Control Register 2)

Data: 0x 86 (this just sets the orientation of the magnet in the original sensor)

Master Write: 0x0F (Control Register 1)

Data: 0x 80 0b1000 0000 (Sets device to idle mode (auto measurement, not in low power mode))


Loop: This is repeated at around 100Hz to get sensor data.

Master Write: 0x10 (X register)

Master Read: (slave sends X data, 2's complement 8 bit value)

Master Write: 0x11 (Y register)

Master Read: (slave sends Y data, 2's complement 8 bit value)

Relevant part of protocol dump from logic analyser:

Setup Write to [0x82] + ACK

0x0F + ACK

0x02 + ACK

Setup Write to [0x82] + ACK

0x0F + ACK

Setup Read to [0x83] + ACK

0xF1 + NAK

Setup Write to [0x82] + ACK

0x2E + ACK

0x86 + ACK

Setup Write to [0x82] + ACK

0x0F + ACK

0x80 + ACK

Setup Write to [0x82] + ACK

0x10 + ACK

Setup Read to [0x83] + ACK 0xFC + NAK

Setup Write to [0x82] + ACK 0x11 + ACK

Setup Read to [0x83] + ACK 0xFF + NAK

Step 4: Arduino Code

The attached Arduino code can be used to simulate the sensor.

Please note: Most Arduino boards run of 5V, this needs a 3.3V compatible or modified board to work to avoid damage to your joystick.

Step 5: Calibration

Once your new sensor has been fitted, the throttle will need calibrating.

To calibrate your throttle you will the throttle calibration tool. This can be download from a number of sources such as:

https://forums.eagle.ru/showthread.php?t=65901

Do not use windows calibration.


In order to get the most out of a mod you need to change a few values in your calibration configuration file.

Change the:

Standard_DZ_SX = 0x10;

Standard_DZ_SY = 0x10;

Lines in A10_calibration.txt to:

Standard_DZ_SX = 0x01;

Standard_DZ_SY = 0x01;

This will change to dead zone on the slew control from 10 to 1, and give much better control. You can play with this setting and then recalibrate and see what you like the most.