MG 4 Gear Selector: Difference between revisions
mNo edit summary |
m Added links to github and forum |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 52: | Line 52: | ||
|} | |} | ||
=== Operation === | |||
On poweron, the selector will start in the PARK position, and this will be communicated in message 0x09D | |||
To enable shifting three messages must be sent to the shifter, repeated at 50ms, CanIds: 0x047, 0x12a, 0x2b6 as described below. | |||
Stopping sending the 0x47 message will cause the shifter to enter into PARK position and prevent a gear being selected. | |||
Restarting 0x47 messages will re-enable the shifter and allow a gear to be selecte. | |||
===CAN Bus=== | ===CAN Bus=== | ||
| Line 57: | Line 65: | ||
Most messages have a standard CRC-8-SAE J1850. (polynomial 0x1D) | Most messages have a standard CRC-8-SAE J1850. (polynomial 0x1D) | ||
CAN Messages are sent every 50ms. | |||
Observed data is described below. | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
!CanId | !CanId | ||
!Message | !Message | ||
!Direction | |||
!0 | !0 | ||
!1 | !1 | ||
| Line 72: | Line 85: | ||
|0x09D | |0x09D | ||
|Shifter Status (from Shifter) | |Shifter Status (from Shifter) | ||
|From Shifter | |||
|CRC8 (bytes1-7) | |CRC8 (bytes1-7) | ||
|Counter 4-bit | |Counter 4-bit | ||
| Line 83: | Line 97: | ||
|- | |- | ||
|0x047 | |0x047 | ||
|Msg1 | |Control Msg1 | ||
"Activate Shifter"? | |||
|To Shifter | |||
|CRC8 (bytes1-7) | |CRC8 (bytes1-7) | ||
|Counter 4-bit | |Counter 4-bit | ||
| Line 95: | Line 111: | ||
|- | |- | ||
|0x12a | |0x12a | ||
|Msg2 | |Control Msg2 | ||
|To Shifter | |||
|CRC8 (bytes1-7) | |CRC8 (bytes1-7) | ||
|Counter 4-bit | |Counter 4-bit | ||
| Line 107: | Line 124: | ||
|- | |- | ||
|0x2b6 | |0x2b6 | ||
|Msg3 | |Control Msg3 | ||
|To Shifter | |||
|00 | |00 | ||
|00 | |00 | ||
| Line 117: | Line 135: | ||
|00 | |00 | ||
|} | |} | ||
The Gear selection is communicated over CAN, and can be decoded as follows. | |||
POS1 is sufficent to indicate the selected gear. | |||
{| class="wikitable" | |||
|+ | |||
!Selected Gear | |||
!POS1 | |||
!POS2 | |||
|- | |||
|DRIVE | |||
|05 | |||
|0A | |||
|- | |||
|NEUTRAL | |||
|06 | |||
|09 | |||
|- | |||
|REVERSE | |||
|07 | |||
|08 | |||
|- | |||
|PARK | |||
|08 | |||
|07 | |||
|} | |||
== Sample Code == | |||
Arduino Due sketch to control shifter : https://github.com/will-camper/mg4-shifter | |||
== Forum Links == | |||
https://openinverter.org/forum/viewtopic.php?t=6604 | |||
==References== | ==References== | ||
Latest revision as of 16:41, 30 August 2025
General Information
MG 4 uses a rotary gear selector.
Neutral corresponds to the central rest postion, Reverse is selected by an anticlockwise twist, Drive by clockwise rotation of the gear knob.
Park is selected by pressing the gear knob.
Selected gear is communicated by CAN.
The unit incorporates three LEDs across the top of the unit which correspond to Reverse, Neutral and Drive.
The knob itself lights up in Yellow when Park is selected.
Part Numbers
SAIC Motor Shift-by-wire : 11357121
Pinout and Connector
The shifter uses a 12 way connector, of which only 5 pins are connected.
Required plug is:
Molex 347290122 : https://www.molex.com/en-us/products/part-detail/0347290122
When viewed from the rear of the unit, Pin1 is top-left, Pin12 is bottom right.
| Pin | OEM Wire Colour | Function |
|---|---|---|
| 1 | Black/Yellow | 12V |
| 5 | Pink/White | 12V WakeupEnable |
| 7 | Yellow/Blue | PT-CAN Ext High |
| 8 | Green/Yellow | PT-CAN Ext Low |
| 12 | Black | GND |
Operation
On poweron, the selector will start in the PARK position, and this will be communicated in message 0x09D
To enable shifting three messages must be sent to the shifter, repeated at 50ms, CanIds: 0x047, 0x12a, 0x2b6 as described below.
Stopping sending the 0x47 message will cause the shifter to enter into PARK position and prevent a gear being selected.
Restarting 0x47 messages will re-enable the shifter and allow a gear to be selecte.
CAN Bus
The Powertrain CAN Bus has a baud rate of 500kBaud.
Most messages have a standard CRC-8-SAE J1850. (polynomial 0x1D)
CAN Messages are sent every 50ms.
Observed data is described below.
| CanId | Message | Direction | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|---|---|
| 0x09D | Shifter Status (from Shifter) | From Shifter | CRC8 (bytes1-7) | Counter 4-bit
F0-FF |
03 | POS1 | POS2 | F0|F1 | 38|39 | FF |
| 0x047 | Control Msg1
"Activate Shifter"? |
To Shifter | CRC8 (bytes1-7) | Counter 4-bit
00-0F |
45 | 9B | 7F | FF | FF | FE|FF |
| 0x12a | Control Msg2 | To Shifter | CRC8 (bytes1-7) | Counter 4-bit
F0-FF |
FF | FF | FF | FF | FF | 01|11|13|14 |
| 0x2b6 | Control Msg3 | To Shifter | 00 | 00 | 02 | 00 | 00 | 00 | 00 | 00 |
The Gear selection is communicated over CAN, and can be decoded as follows.
POS1 is sufficent to indicate the selected gear.
| Selected Gear | POS1 | POS2 |
|---|---|---|
| DRIVE | 05 | 0A |
| NEUTRAL | 06 | 09 |
| REVERSE | 07 | 08 |
| PARK | 08 | 07 |
Sample Code
Arduino Due sketch to control shifter : https://github.com/will-camper/mg4-shifter
Forum Links
https://openinverter.org/forum/viewtopic.php?t=6604