Click on our menu buttons immediately below to find MegaSquirt® information quickly:

MegaShift™ Voltage Shifter

The MShift™ code (V2.120+/4.100+) allows for a variable voltage shifter activation input, rather than two discrete inputs (aka. "shift buttons") that are grounded to activate. The shift signal is fed to the paddle downshift button (PAD06/GPI5).

This allows users to use the horn and four resistors to shift. It assumes there are two separate grounding pads (sw1 and sw2) on the horn pad, ideally on opposite sides of the steering wheel. The resistors of difference values are wired into the feeds to the pads. The signal is taken from the the switch side of the current limiting Rs resistor. If done with care, this can result in a very tidy installation of the shift buttons in some vehicles. However, a separate switch would need to be installed to activate the horn, of course.

This particular setup system works as follows:

  1. If the leg of the voltage divider on R1 is grounded with SW1, one specific voltage is sent to your MShift™/GPIO controller.
  2. If the leg of the voltage divider on R2 is grounded with SW2, another voltage is sent to your MShift™/GPIO controller.
  3. If both legs of the voltage divider is grounded with SW1 & SW2, yet another voltage is sent to your MShift™/GPIO controller.
  4. If neither leg of the voltage divider is grounded, and:
    1. If Rb is not present: the supply voltage is sent to your MShift™/GPIO controller,
    2. If Rb is present: the supply voltage multiplied by (Rb/(Rs+Rb)) is sent to your MShift™/GPIO controller,

Note that R1 must not be equal in resistance to R2. Rs and Rb can be mounted remotely in the supply to the steering wheel switches.

Here is a calculator to assist in calculating the resulting voltages:

Voltage, supply (Vs): Volts
Resistance, Rs Ohms
Resistance, Rb Ohms
Resistance, R1 Ohms
Resistance, R2 Ohms
Buttons pressedVoltage Signal
to MShift™ controller
No buttons pressed:
SW1 pressed:
SW2 pressed:
Both SW1 & SW2 pressed:
Minimum Voltage Tolerance:

The 5Vref from your MShift™ controller (Ampseal pin 28) is a much more stable voltage supply than the 12.6 to 14.5V of the vehicle's nominal "12V" supply, which can help reduce the required tolerances. If you use 5Vref for the voltage supply, you can eliminate Rb. For the calculator, insert a very high value for Rb (99999999999 Ohms will do).

You should measure the actual signal voltage for input to your MShift™ controller, but the above calculator can help you choose the resistors and see the effects of changing supply voltage (to assist in setting the voltage tolerances). The voltages seen by the controller are in the butADC output channel as an ADC count (0=0 Volts, 1024 = 5.0 Volts; divide the ADC count by 204.8 to get the Volts), and can also be monitored directly in Volts in the "butonVolts" gauge (right click on any gauge in TunerStudioMS and switch to this gauge).

Note that the code makes no assumptions about the order or values of these voltages, so other hardware schemes are possible.

If the tolerance is set so that the valid ranges overlap, the code will select the first button state that is within the tolerance in the following order:

  1. Neither buttons pressed,
  2. Both buttons pressed,
  3. Upshift button pressed,
  4. Downshift button pressed.
This may not be what you want, so be sure to set the voltage tolerance carefully.

MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational purposes.
MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
© 2011, 2014 Bruce Bowling and Al Grippo. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.