Welcome to the North American Subaru Impreza Owners Club Tuesday June 15, 2021
Home Forums Images WikiNASIOC Products Store Modifications Upgrade Garage
Click here to visit TireRack
Brakes & Suspension Forum sponsored by The Tire Rack

Losing traction? Need new tires?
Click here to visit the NASIOC Upgrade Garage...
Go Back   NASIOC > NASIOC Technical > Brakes, Steering & Suspension

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.







* As an Amazon Associate I earn from qualifying purchases. 
* Registered users of the site do not see these ads. 
Reply
 
Thread Tools Display Modes
Old 07-05-2015, 04:56 PM   #1
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default 2015 Electric Rack Installed into a 2010 STI

This post will outline my project of replacing the hydraulic power steering in my 2010 STI with the electric power steering from a 2015 WRX. I'll try my best to cover everything, but it was a long journey (a little over a month,) so I might forget a few little things.

First thing's first: Why? I couldn't get the air bubbles out of my hydraulic system. Eventually I replaced the whole system (rack under warranty from Subaru, lines with teflon -AN lines, custom reservoir, new pump, etc...) and it still leaked. I'm not terribly great with fluids, but I'm a bit better with electrons so I found an electric rack on eBay and decided to give it a try. Electric steering is the future anyway.

The Parts
- 2015 Subaru Impreza WRX electric steering rack


The top rack is from my 2010 STI, the bottom is obviously from the WRX. The length from endlink to endlink is exactly the same, but you can see that the mounting points are totally different.

- 2015 Subaru Impreza WRX crossmember (engine cradle)


Again the top is 2010 STI, bottom is 2015 WRX. The bolt holes for the frame are a direct fit, as are the control arm mounting points. Make sure that you get the extra bracing and the bottom plate from the donor car as well.



The major difference between the two crossmembers is the relief for the exhaust. On the 2015 WRX, the exhaust is run underneath the crossmember. The swaybar mounting points are the same, but as you'll soon see the 2010 swaybar won't work.



- 2015 Subaru Impreza WRX sway bar

The 2015 sway bar is a different shape, but you can re-use the original 2010 end-links (with one modification, outlined below). Since the 2015 bar is 2 mm thicker than the 2010 bar, you'll need bushings and mounts. I ended up using some Energy Suspension parts.


- 2015 Subaru Impreza WRX electric steering control unit (34710VA010 E2710-58020)

There are way more control units on eBay than electric racks for some reason. Make sure you get the plugs that go into the unit! I found some information on the smaller plugs (outlined below), but the larger 80 amp plugs were never found.



- 2015 Subaru Impreza WRX steering linkage (sorta optional)
The distance from the steering wheel splines to the electric rack splines turned out to be further than the hydraulic rack. I ended up modifying mine instead of buying another.

- An Arduino Uno with the Seeed CANBus shield
This turned out to be the most important part because without it, none of the rest of the system will work.
* Registered users of the site do not see these ads.
synapsis is offline   Reply With Quote
Sponsored Links
* Registered users of the site do not see these ads.
Old 07-05-2015, 04:57 PM   #2
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Mechanical

As we know, the basis of the whole system is the crossmember so that's where I'll start. The crossmember bolts straight up to the car as long as you don't have an exhaust. My car has a Grimmspeed external wastegate up-pipe with flex joint. The flex joint made the modifications a lot more involved since it rests right where the crossmember is. I started cutting in an asterisk shape in the middle of the surface of the top of the crossmember, so I could hammer down and fold over the existing metal. The idea is to keep as much stock material as possible, and brace what I remove. Luckily, the swaybar bracket comes up right under where I had to cut, so it braced the insert nicely.

The crossmember is made from steel that's between 12 and 14 gauge. I needed a radius to fit inside the hole (on top of the sway bar bracket) made from 12 gauge, but I barely had the equipment to cut metal that thick. I ended up going to Home Depot and buying an EZ Fix fencepost repair plate. It's a 12 gauge C channel with a radius in the middle that you're supposed to use to hammer it in. I cut the radius out and TIG-welded it into the crossmember. I then cut some extra material off the repair plate to cover up any other holes. I blended the welds on the top side, and welded up the seams underneath for strength.

Then I bolted the crossmember in, and the electric rack went in easily.

It's a poor quality photo, but in this picture you can see all the extra bracing that Subaru put on the newer crossmember. My original setup and only 1 brace, the 2015 setup has 4 braces on the crossmember, and two additional braces that go to the body where the control arm mounts (I don't have these yet.)

Now when I tried to hook up the steering wheel to the rack, I found that the linkage was about 1/2" - 3/4" too short. After some research, I found that the new steering linkages have rag joints installed. I picked up some 5/8" bar stock from Home Depot, cut the existing bar out and added 3/4".

Now that I had the steering system mounted and connected to the steering wheel, the last mechanical part to put on was the sway bar, which we've already seen is a different size and shape. With the Energy Suspension mounts, it bolted up to the crossmember, but the holes for the end links on the 2015 bar are larger than the 2010 bar. I ended up welding up the holes (don't get too much heat into the bar or it will lose its internal tension) and drilling them out to the 2010 size. Here you see a piece of copper plate clamped to the hole so I can fill it and to draw away a little heat.

And now the mechanicals are in. Onto the electrical.

Electrical


Here is the pinout to the control unit.

Connector B goes straight to the battery and must handle at least 80 amps. I used 6 AWG cable going through a 100 amp circuit breaker mounted to my engine fuse box. Connector D and Connector C come from the rack. The motor is a 3 phase AC unit with an encoder. There's a third plug that comes off the rack that goes to the torque sensor, but it doesn't connect directly to the control unit, it runs through Connector A, which is where you'll spend most of your time building a cable. The Connector A wires are all 20 AWG. I only had 18 AWG lying around to use, which made some of the pins hard to get into the housings.

Last edited by synapsis; 07-05-2015 at 05:02 PM.
synapsis is offline   Reply With Quote
Old 07-05-2015, 04:57 PM   #3
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default


The top connector is Connector B, with Connector A to the right, and the plug that connects to the torque sensor on the rack on the lower left. I started going through the pain of trying to de-pin all this crap, but I gave up once I got to Connector A. I do have some notes, though.

Connector A is made by Yazaki and is from the RH series. The housing is 7283-8856-30 and the terminals are 7116-4417-02. Good luck finding it.

The torque sensor connector is made by Yazaki and is a 2.3II series. The pins are part number 7114-4027. Here's where I found something interesting. General Motors has a terminal kit (made by Kent Moore) they sell to dealerships called the J-38125 Terminal Repair Kit. The pins for this connector are in Tray 11. I went down to my local dealership and after a bit of explaining, got two pins for free when I broke one of my originals.


This is how the torque sensor connector (the beige one) connects to Connector A (the annoying small black one.) When I finished my cables, they looked like this (the battery cables aren't cut to length yet.)


My windshield washer hasn't worked since I bought the car, so that's where I mounted the control unit. I ran one cable over the crossmember, and the other underneath it, all secured with rubber coated metal brackets. The cables near the engine were then all covered with heat reflective tubing. The unit is mounted on 1/2" standoffs using one existing hole from the washer bottle and one that I had to drill.


Now that all the mechanicals are hooked up, and all the electrical is put in... we get to drive the car!

No. I fired it up and had no power steering (I wasn't really expecting to.) I verified all my connections and signals. 12VDC to the unit. The CANbus was communicating so I know the computer works (more on that in a minute.) There was 5VDC to the torque sensor and it was giving 2.5VDC back like normal. The unit was pulling around 200mA when powered on, but that was about it. I can tell out that it's easier to drive without power on this rack than it is on the hydraulic (even with all the fluid out.)

Logical (or: The part every other car guy hates)

Here's where we're at: Everything works mechanically, you can drive the car if you have decent arm strength. The computer is using power so it's doing *something*. The CANbus lines from the computer are spitting out data... but what is it?


This is one of two status bytes that the control units transmits on the CANbus (hi speed.)
Code:
Address 0x370: Electric power steering status:
I think this packet is analogous to Subaru Diesel Crew's packet 0x550.
    Byte 0: Changes when I turn the wheel. 0xFF when not working
    Byte 1 & 2: Zero when working 0xFF when not working.
    Byte 3 & 4: Current in Amps?
    Byte 5: Message Counter
    Byte 6 & 7: Zero  
Address 0x371: Electric power steering something else
    Byte 0: 0xFF when not working, unknown data when working
    Byte 1: 0xFF when not working, unknown data when working
    Byte 2: 0x00 when not working, unknown data when working
    Byte 3: 0x00 when not working, unknown data when working
    Byte 4: 0x80 when not working, unknown data when working
    Byte 5 & 6: Steering position
    Byte 7: Zero
At this point I was stuck. And when I get stuck, I take things apart.


Lifting the cover off the control unit. Things to notice here:
- Connector A (lower left) has two pins that are labeled on the silkscreen, but not in the documentation. "SSM" and "WL"
- Connector C (lower middle) has a pin labeled "MODE" that isn't in the documentation.
- The pins going across in a single row all go down to the power board for the individual phases of the AC motor drivers.
- The main CPU is the big square on the right (more info below.)


The bottom side of the controller board. Mostly power supply and monitoring.


I unsoldered the controller board and took a look at the power board. You can see the power FETs (P2N0403) in pairs for each phase of the motor.
Some more information before I close up the unit:
- IC1 is the main CPU, a Renesas SH7047 Flash Version.
- IC3 is an Infineon TLE 6280GP 3-phase bridge driver
- IC5 is an ST 95040WR 4k EEProm
- IC7 is a TI 2142Q Op Amp
- IC9 is an NXP 82C250Y CANBus controller

Speaking of CANbus...



I decided I was going to hammer the CANbus interface to see if anything happens. The idea was to set up a logger that would watch the current draw of the control unit while I sent random garbage to CANbus addresses in order to see what it's listening for. And bingo!

Address 0x140: Throttle and RPM (used on the BRZ and posted by Acree on Romraider.com)
Byte 0,4,5: TPS
Byte 2,3: RPM

I had the scanner running while I was playing a video game and hear a loud relay click. I reran the scan slower until I centered in on the address that made it click. When I found Acree's post , I knew I had my address.
I re-installed the control module in the car, and I hooked up my Arduino to the CANBus using my home-made tap cable (so I can still use my Cobb Accessport at the same time.)


I programmed the Arduino to take the TPS/RPM packet that the 2010 puts out on address 0x410, and retransmit a reformatted packet to 0x140 whenever it comes in. I moved all the equipment into the car and took it out into the driveway.... voila! Power steering! I'll have to design a proper CANbus translator with proper watchdogs on a real MCU, but at least I can finally drive the car!

Some extra information:

Here's a couple of short packet dumps from my work.

Code:
Steering not working:
WRX EPS Something     FF     FF    0    0    80    32     CE    0
WRX EPS Current     FF     FF    20     C1    80    7    0    0
WRX EPS Something     FF     FF    0    0    80    33     CE    0
WRX EPS Something     FF     FF    0    0    80    39     CE    0
WRX EPS Something     FF     FF    0    0    80    44     CE    0
WRX EPS Current     FF     FF    20     C1    80    8    0    0
WRX EPS Something     FF     FF    0    0    80    55     CE    0
WRX EPS Something     FF     FF    0    0    80     6D     CE    0
WRX EPS Current     FF     FF    20     C1    80    9    0    0
WRX EPS Something     FF     FF    0    0    80     8B     CE    0

Steering working (with packet injection):
Crafted Packet 0x140    0    0     8C    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0     8C    3     C1
 WRX EPS Current 0x370    1    0    0     C2     FC    1    0    0
 Crafted Packet 0x140    0    0     8C    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0     8C    3     C1
 WRX EPS Something 0x371    1    0    0    20     FD    76     CE    0
 Crafted Packet 0x140    0    0    80    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0    80    3     C1
 Crafted Packet 0x140    0    0    80    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0    80    3     C1
 WRX EPS Something 0x371    1    0    0    20     FD    76     CE    0
 WRX EPS Current 0x370    0    0    0     C2     FC    2    0    0
 Crafted Packet 0x140    0    0    84    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0    84    3     C1
 Crafted Packet 0x140    0    0    84    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0    84    3     C1
 Crafted Packet 0x140    0    0     7F    3    0    0    0    0
 ECU Engine 0x410     E    0     1B     A    0     7F    3     C1
 Crafted Packet 0x140    0    0     7F    3    0    0    0    0
And lastly, the Arduino code that makes the power steering work:

Code:
#include <SPI.h>
#include "mcp_can.h"

const int SPI_CS_PIN = 9;
unsigned char msg[8] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
bool wantPacket = false;

MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

void setup()
{
    Serial.begin(115200);

START_INIT:

    if(CAN_OK == CAN.begin(CAN_500KBPS))                   // init can bus : baudrate = 500k
    {
        Serial.println("CAN BUS Shield init ok!");
    }
    else
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println("Init CAN BUS Shield again");
        delay(100);
        goto START_INIT;
    }
}

void loop()
{
    unsigned char len = 0;
    unsigned char buf[8];
    
    //wait for CAN data to be available
    if(CAN_MSGAVAIL == CAN.checkReceive())            
    {
      
    
        CAN.readMsgBuf(&len, buf);    

        INT32U canId = CAN.getCanId();
        
        //filter for 2010 sti packet
        if (canId == 0x410)
        {
          //dis/reassemble packet
          msg[2] = buf[5]; //rpm 1
          msg[3] = buf[6]; //rpm 2
          
          //send translation to power steering
          CAN.sendMsgBuf(0x140, 0, 8, msg);
          Serial.print(millis());
          Serial.print(", Crafted Packet 0x140, ");
          for(int i = 0; i<len; i++)    // print the data
          {
            Serial.print(msg[i], HEX);
            Serial.print(", ");
          }
          Serial.println();
        }
        
        switch (canId)
        {
          case 0x370:
            Serial.print(millis());
            Serial.print(", WRX EPS Current 0x370");
            wantPacket = true;
            break;
          case 0x371:
            Serial.print(millis());
            Serial.print(", WRX EPS Something 0x371");
            wantPacket = true;
            break;
          case 0x410:
            Serial.print(millis());
            Serial.print(", ECU Engine 0x410");
            wantPacket = true;
            break;
        }
        
        if (wantPacket)
        {
          Serial.print(", ");
        
        for(int i = 0; i<len; i++)    // print the data
        {
            Serial.print(buf[i], HEX);
            Serial.print(", ");
        }
        Serial.println();
        wantPacket = false;
        }

    }
    
    delay(1);
}

Last edited by synapsis; 07-05-2015 at 05:04 PM.
synapsis is offline   Reply With Quote
Old 07-06-2015, 08:11 AM   #4
JarHarms
Scooby Specialist
 
Member#: 138994
Join Date: Jan 2007
Location: somewhere
Vehicle:
2006 WRX, 6MT, 5x114

Default 2015 Electric Rack Installed into a 2010 STI

Wow. That is impressive. Please follow up with driving impressions and compared to hyd assist steering.
JarHarms is offline   Reply With Quote
Old 07-06-2015, 07:27 PM   #5
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Since I'm only supplying engine RPM at the moment, it isn't working 100% correctly. Over bumps it's a little more vague than the hydraulic system, but curves at medium speeds feel good. It feels very stable at interstate speeds and takes minimal effort to switch lanes.

I think it might possibly be in "limited assist" mode since I'm not providing all the data. It might also need to have the resolver centered. The assist on right turns feels fine, but there's a spot on left turns that the assist drops out on. Same spot, every time. This makes me thing some more configuration is in order.

I can't read the flags on the packets sent out of the control unit yet, so I don't know what it wants to hear. I have a tactrix cable coming that'll hopefully let me run OEM diagnostics on it.

On the list of DTCs for the power unit there's Vehicle Speed Failure, Invalid Data received from ECM or VDC, and lost comms from ECM/VDC/Steering Angle Sensor/Instrument Panel. If I could get a CANbus dump from a BRZ (or even better, a 2015 WRX with electric steering), I can probably find the addresses for those components and send the unit what it wants.
synapsis is offline   Reply With Quote
Old 07-06-2015, 07:48 PM   #6
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Development never ends. Who says it's not normal to have wires and circuit boards in your car?

synapsis is offline   Reply With Quote
Old 07-07-2015, 09:29 AM   #7
gsrcrxsi
Scooby Specialist
 
Member#: 236952
Join Date: Jan 2010
Chapter/Region: MAIC
Location: Baltimore
Vehicle:
2010 WRX (SSM)
Stg 2+ 310/370, 6sp R180

Default

so when you bolted up the 2015 wrx subframe, the motor mounts lined up too? I know the 2015 wrx uses different motor mounts, so if that actually still lines up with the EJ motor and it's mounts, thats pretty wild.

and why did you opt for welding/redrilling the swaybar? wouldnt a tube spacer have sufficed?
gsrcrxsi is offline   Reply With Quote
Old 07-07-2015, 11:36 AM   #8
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Quote:
Originally Posted by gsrcrxsi View Post
so when you bolted up the 2015 wrx subframe, the motor mounts lined up too? I know the 2015 wrx uses different motor mounts, so if that actually still lines up with the EJ motor and it's mounts, thats pretty wild.

and why did you opt for welding/redrilling the swaybar? wouldnt a tube spacer have sufficed?
The motor mounts lined up perfectly. They measured the same between both subframes.

Some of the decisions were based on time/availability. If I had a lathe, I would've made tube spacers instead. The holes are in metric, so buying metric bar/tube stock is next to impossible in a decent amount of time. I do have metric drill bits though, so that's the route I took.
synapsis is offline   Reply With Quote
Old 07-07-2015, 10:13 PM   #9
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Some more CANbus info for the masses:

If you open up an ECU ROM in a hex editor and search for "08 00 FF FF" it'll take you right to the CANbus definition table. Cross referencing the table from my ROM with the data I find on my CANbus while the car is running, I think the table data comes up like this:

Byte 0,1 CANBus ID
Byte 2 Direction 00 is transmitted, 01 is received?
Byte 3 Packet Size
Byte 4 Delimiter?
Bytes 5-8 Address of data?

Sample 2015 STI CANbus entry: 01 40 00 01 08 00 FF FF 5D 32

Note: On my ROM, every entry in the table with 00 after the address has been verified as having data on the bus from the ECU.

Using these assumptions, I opened a 2015 USDM STI Rom to get an idea of what I would expect to see on the CANBus (if I had a 2015 car.)

The ECU transmits on addresses:
0x140, 0x141, 0x144, 0x360, and 0x361. (0x7E8 looks like it might be a special address on both roms.)

The ECU is interested in data from these addresses on the bus that come from other control units:
0xD1, 0xD2, 0xD3, 0xD4, 0x148, 0x149, 0x368, 0x152, 0x280, 0x282, 0x370 (hello power steering), 0x372, 0x161, 0x3D1, 0xD0, and 0x660.

Now I can start throwing packets at the steering control unit with these addresses and see if any of the flags coming back from the unit change.
synapsis is offline   Reply With Quote
Old 07-25-2015, 07:39 PM   #10
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

After a couple weeks of work (and buying an ABS unit for a car I don't own), I have the steering 100% working.



On the left is a spare electric power steering ECU in full hack mode, in the middle is the VDC unit. Things I tried:

- I tried to pull the ROM over the AUD lines, but when I tried to pull one of the mode lines high it pulled a ton of current and didn't work.

- I unsoldered the 5V power supply from the board and put in a current sensing resistor in order to try and find a pattern in the current used when different addresses were sent to the unit. It didn't work, but every 5 seconds there's an interesting current spike that I'm guessing is the processor waking up or something.

- The processor has an "interrupt being processed" line that goes low when it's processing an interrupt. I threw a bunch of addresses and data at it, but it wasn't interested. It seems to pulse five/six times at regular intervals in a certain pattern that I couldn't get to change.

- I tried to read memory addresses over the CANbus diagnostic address. The CANbus diag address for the power steering unit is 0x7FA, and the unit will respond on 0x7FB. When the unit sends a positive response, it sends a 0x7E packet, and a negative response is a 0x7F packet. If you send 0x7E (tester unit present) to all the command values, only 0x2 and 0x10-0x1F respond.

0x10 being sent to 0x7FA is a diagnostic mode. I scanned all the subfunctions for this mode looking for the read memory routine, but only 0x50, 0x67, 0x68, 0x69, and 0x7E got positive responses. 0x10 0x67 is request security seed (off the top of my head) so you might need to get into a different security level for anything interesting. I didn't get far in this area because my ABS unit arrived.


The steering system requires vehicle speed and steering angle from elsewhere on the CANbus. I picked up a 2015 ABS unit off eBay and built a circuit to simulate ABS wheel speed sensors with a function generator. Here's a little CANbus info from my notes, I have more info somewhere but it doesn't have to do directly with the steering:

For a 2015 WRX:
0xD0 - from VDC - Byte 01 - Some kind of fault flags

0XD1 - from VDC - Byte 00 (MSB) and 01 (LSB)are vehicle speed in the same format as the 2010 STI uses, (MSB * 256) + LSB * 0.03495 for speed in MPH

0xD2 - from VDC - Don't know. 8 Bytes

0xD3 - from VDC - Byte 00 is some kind of flag. Byte 04 increases with wheel speed but I don't know what it is yet. Byte 07 is a message counter.

0xD4 - from VDC - Wheel speeds. Same format as Subaru Diesel Crew found with 0x513, so I just send the packet back out as is. The formula for each wheel in MPH is:
(MSB * 256) + LSB * 0.03495 for speed in MPH

0x18 - a total guess - I found somewhere on the web that this was the steering angle sensor on a 2013 BRZ, which uses the same addresses as a 2015 WRX, so I'm throwing the 2010 STI steering angle sensor data from 0x02 to this address as it's formatted.

Another note about the ABS unit, Pin 7 is populated on the connector but not in the service manual. It's the Subaru Select Monitor pin. The power steering unit has an SSM pin as well.

I've picked up a TI TMS570LS12x Launchpad to start development on a proper CANbus translator box (that will also run my air-vent touchscreen gauge v3). If I get tired working on that, I might try poking around the CANbuses for my car and the bench units to see if I can figure out more packet data.

Unfortunately, I might be losing my job in the next month or so. This means I'll probably be busy eBay all my old parts and I can't buy any more to reverse engineer. I'm happy I at least got it running correctly. (anyone hiring? )
synapsis is offline   Reply With Quote
Old 07-25-2015, 07:39 PM   #11
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Arduino sketch.

Code:
#include <SPI.h>
#include "mcp_can.h"

const int SPI_CS_PIN = 9;
unsigned char msg[8] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};

MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

void setup()
{
    Serial.begin(115200);

START_INIT:

    if(CAN_OK == CAN.begin(CAN_500KBPS))                   // init can bus : baudrate = 500k
    {
        Serial.println("CAN BUS Shield init ok!");
    }
    else
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println("Init CAN BUS Shield again");
        delay(100);
        goto START_INIT;
    }
}

void loop()
{
    unsigned char len = 0;
    unsigned char buf[8];
    
    //wait for CAN data to be available
    if(CAN_MSGAVAIL == CAN.checkReceive())            
    {
     
        CAN.readMsgBuf(&len, buf);    

        INT32U canId = CAN.getCanId();
         
        switch (canId)
        {
          case 0x410:
             //dis/reassemble packet
             msg[0] = 0;
             msg[1] = 0;
             msg[2] = buf[5]; //rpm 1
             msg[3] = buf[6]; //rpm 2
             msg[4] = 0;
             msg[5] = 0;
             msg[6] = 0;
             msg[7] = 0;
          
            //send translation to power steering
            CAN.sendMsgBuf(0x140, 0, 8, msg);
            break;
            
          case 0x512:
             msg[0] = buf[2]; //speed 1
             msg[1] = buf[3]; //speed 2
             msg[2] = 0;
             msg[3] = 0;
             msg[4] = 0;
             msg[5] = 0;
             msg[6] = 0;
             msg[7] = 0;

             //send translation to power steering
            CAN.sendMsgBuf(0xD1, 0, 4, msg);
           
            break;
            
          case 0x513: //wheel speeds
            CAN.sendMsgBuf(0xD4, 0, 8, buf);
          break;
          
          case 0x02: //steering angle?
            CAN.sendMsgBuf(0x18, 0, 8, buf);
            break;
          
          case 0x370:
            Serial.print("WRX EPS Current");
            Serial.print(", ");
        
            for(int i = 0; i<len; i++)    // print the data
            {
                Serial.print(buf[i], HEX);
                Serial.print(", ");
            }
            Serial.println();

            break;
            
          case 0x371:
            Serial.print("WRX EPS 2");
            Serial.print(", ");
        
            for(int i = 0; i<len; i++)    // print the data
            {
                Serial.print(buf[i], HEX);
                Serial.print(", ");
            }
            Serial.println();

            break;
        }
     }
  
}
synapsis is offline   Reply With Quote
Old 07-26-2015, 11:30 AM   #12
slide
Scooby Specialist
 
Member#: 1130
Join Date: Mar 2000
Vehicle:
2013 STI Hatch
DGM

Default

My brain just exploded.... Wow!
slide is offline   Reply With Quote
Old 05-16-2016, 03:04 PM   #13
wingman358
Scooby Newbie
 
Member#: 146760
Join Date: Apr 2007
Chapter/Region: RMIC
Location: Colorado
Vehicle:
2004 WRX Wagon
WRB

Default

I know this is an old thread but it deserves reviving. How close to "finished" did you get?
wingman358 is offline   Reply With Quote
Old 05-16-2016, 04:20 PM   #14
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

It's my daily driver. I've canyon carved with it, took it to the drag strip, etc...

I have a circuit built up using a TI TMS570LS processor to translate between the two CANbus circuits, which are totally isolated from each other now.

Here's a pic of the final board:


And a pic of the final debug on my test bench before I put it in the car permanently. (Mounted under the dash behind the glovebox.)
synapsis is offline   Reply With Quote
Old 05-16-2016, 04:31 PM   #15
wingman358
Scooby Newbie
 
Member#: 146760
Join Date: Apr 2007
Chapter/Region: RMIC
Location: Colorado
Vehicle:
2004 WRX Wagon
WRB

Default

AWESOME. Have you driven a 2015+ with the EPS stock? Just curious how it compares to a stock installation.

Also, I was hoping to find that it would be a drop-in swap but shieeet it's not.

Quote:
Originally Posted by synapsis View Post
It's my daily driver. I've canyon carved with it, took it to the drag strip, etc...

I have a circuit built up using a TI TMS570LS processor to translate between the two CANbus circuits, which are totally isolated from each other now.

Here's a pic of the final board:
[pic]

And a pic of the final debug on my test bench before I put it in the car permanently. (Mounted under the dash behind the glovebox.)
[pic]
wingman358 is offline   Reply With Quote
Old 05-16-2016, 08:54 PM   #16
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

I've never driven another Subie besides my own.

It'd be a drop-ish in for a 2015 STI, but not the older cars.
synapsis is offline   Reply With Quote
Old 05-16-2016, 09:24 PM   #17
tmcmenam
Scooby Newbie
 
Member#: 427256
Join Date: Aug 2015
Default

Quote:
Originally Posted by synapsis View Post
I've never driven another Subie besides my own.

It'd be a drop-ish in for a 2015 STI, but not the older cars.
Did you ever lose your job? Find a new one? PM me
tmcmenam is offline   Reply With Quote
Old 05-16-2016, 09:30 PM   #18
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Yup. Been unemployed since November. Half the equipment in the second pic had to be sold as a result.
synapsis is offline   Reply With Quote
Old 05-17-2016, 11:38 AM   #19
wingman358
Scooby Newbie
 
Member#: 146760
Join Date: Apr 2007
Chapter/Region: RMIC
Location: Colorado
Vehicle:
2004 WRX Wagon
WRB

Default

Sent you a PM.

Quote:
Originally Posted by synapsis View Post
Yup. Been unemployed since November. Half the equipment in the second pic had to be sold as a result.
wingman358 is offline   Reply With Quote
Old 05-17-2016, 01:58 PM   #20
lupohki
Scooby Specialist
 
Member#: 3457
Join Date: Jan 2001
Chapter/Region: International
Location: Kyotango, Japan
Vehicle:
2008 STi
DGM

Default

Just saw this thread and am amazed. Is it possible to increase the steering ratio of the electric rack through just software? The 2015 WRX is 14.5:1 whereas the hydraulic 2015 STi one is 13:1.
lupohki is offline   Reply With Quote
Old 05-17-2016, 02:30 PM   #21
REX_WGN
NASIOC Supporter
 
Member#: 107618
Join Date: Feb 2006
Chapter/Region: Tri-State
Location: NY
Vehicle:
2006 WRX Wagon
2009 FXT

Default

although I will not be going this route, it's great to see enthusiasts try new things. Great job.
REX_WGN is offline   Reply With Quote
Old 05-17-2016, 05:32 PM   #22
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

Quote:
Originally Posted by lupohki View Post
Just saw this thread and am amazed. Is it possible to increase the steering ratio of the electric rack through just software? The 2015 WRX is 14.5:1 whereas the hydraulic 2015 STi one is 13:1.
No. There's still gears inside the rack, but you can adjust the assist.

The 2015 WRX rack is still a tad better than the 2010 STI rack (by .5 : 1).
synapsis is offline   Reply With Quote
Old 01-29-2018, 08:45 PM   #23
deividfoggi
Scooby Newbie
 
Member#: 367465
Join Date: Sep 2013
Default

Dear friend, first of all I'm impressed about all this hard work on this project. Glad to see another gear head trying to go where no one ever had been!!! But due to my lack of skill and free time, is there any way to just bypass or connect some simple system to just the steering assist in 2 or 3 levels (like: off/medium/easy, or just off/medium)?
deividfoggi is offline   Reply With Quote
Old 01-30-2018, 11:18 PM   #24
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

If I remember right, there's zero assist without an RPM reference over the CANBUS. With RPM there's partial assist, but with all the data there's full assist. So it's really an all or nothing thing. I think I send it RPM, TPS, and either steering angle or wheel speed. Off the top of my head I just remember that I required data from the ECU and also the ABS system.
synapsis is offline   Reply With Quote
Old 05-17-2018, 10:03 AM   #25
synapsis
Scooby Newbie
 
Member#: 398525
Join Date: Aug 2014
Chapter/Region: SWIC
Location: Oregon
Vehicle:
2010 Impreza STI
Dark Grey

Default

I've been told the images stopped working. Here's a link to the PDF version of the first post with images. http://www.mediafire.com/file/2fukk1...he_Process.pdf
synapsis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -4. The time now is 06:59 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2021 Axivo Inc.
Copyright ©1999 - 2019, North American Subaru Impreza Owners Club, Inc.

As an Amazon Associate I earn from qualifying purchases.