Leaf swapped Nissan 720…. On the side of the road!

Tell us about the project you do with the open inverter
P.S.Mangelsdorf
Posts: 1049
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 222 times
Been thanked: 256 times

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by P.S.Mangelsdorf »

Bratitude wrote: Sat Jan 04, 2025 2:22 am
The local yard has a Prius power steering rack for 100$.

I’ll pick it up and see what can be done. I’m not okay with cutting and splicing up the 720 column to make it work.

A electric column would make for a lighter, and cleaner install.
Hot Rod did an article on the Prius column, in case you hadn't seen it:
https://www.hotrod.com/how-to/150-elect ... -delivers/
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024

https://www.youtube.com/@MangelsdorfSpeed
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

Power steering:

The truck has a hydraulic steering box.

There’s 2 options for power steering:

Electric power steering pump to feed hydraulic pressure to the box.

Or electric power steering column.


A epas pump is the simplest install, just plumb it in and good to go.

Cons are I’m adding weight as the pump is heavy
And there’s hydraulic fluid!
And it’s noisy
Yuck!

Epas column would be quiet, more efficient , and not add anything into the engine bay.


Con’s are lots of custom fab work, which is tricky as I’m am not allowing any of the original trucks column to be cut or welded. this is out of safety and keeping everything bolt on:)

there’s a rag joint just outside the fire wall… so it may be possible to retro fit a Prius rack with some off the shelf couplers.

but picked up an old Mazda epas pump for 80$ cad.
Heres the epas pump and the original line + pump from the truck.
IMG_6103.jpeg
epas pump pressure outlet is a m14 jis banjo fitting
The trucks original power steering lines have a bigger jic banjo. Close but no cigar.
IMG_6105.jpeg
3 fittings later we have connections!
M14 banjo jis -> female x female jis union ->jis x jic union
IMG_6106.jpeg
simple, no expensive custom hoses, and all off the shelf parts!
IMG_6107.jpeg
okay now mount it and work on controlling it. its not as straightforward as some of the other pumps like the volvo or ampera. it has 3 connectors, power, can, and analog steering angle.

luckly some one has done the heavy lifting already https://github.com/shifty35/mazda3-ehps-control

code just needs a bit of clean up and good to go.

what i have distilled down so far

Code: Select all

#include <mcp_can_dfs.h>
#include <mcp_can.h>

#include <SPI.h>
#include <Arduino.h>

const int STEERING_ANGLE_PIN_A = 4;
const int STEERING_ANGLE_PIN_B = 5;

const int INT_PUMP = 6;
const int SPI_CS_PUMP = 8;

MCP_CAN can_pump(SPI_CS_PUMP);

short int previous_steering_angle = 0;
short int current_steering_angle = 0;
short int target_steering_angle = 0;
bool current_steering_angle_valid = false;

long last_steering_time = 0;

// Globals for CANBUS debug / testing
uint32_t counter = 0;

void convert_201_values(uint8_t buf[]) {
    // RPM = uint16_t(bytes 0, 1) * 4
    uint16_t engine_speed = ((buf[0] * 256) + buf[1]) / 4;
   

    // Speed in KM/hr = (uint16_t(bytes 4. 5) + 100) * 100
    uint16_t vehicle_speed = (((buf[4] * 256) + buf[5]) / 100) - 100;
   

    // Mazda 3 pump expects RPM as raw bytes, no scalar like MX5
    // Mazda 3 pump expects km/hr*100, no 100 km offset like MX5
    vehicle_speed *= 100;

    // Write modified values back into buffer
    buf[0] = engine_speed / 256;
    buf[1] = engine_speed % 256;
    buf[4] = vehicle_speed / 256;
    buf[5] = vehicle_speed % 256;
}

// current_steering_angle and target_steering_angle are doubled to allow for .5* resolution without floating point conversion.
void update_steering_outputs() {
  // Don't update pin outputs too frequently
  if (micros() - last_steering_time < 500) return;

  if (target_steering_angle > current_steering_angle) {
     current_steering_angle++;
  } else if (target_steering_angle < current_steering_angle) {
     current_steering_angle--;
  }

  digitalWrite(STEERING_ANGLE_PIN_A, abs((current_steering_angle / 6) % 2));
  digitalWrite(STEERING_ANGLE_PIN_B, abs((((current_steering_angle + 3 )/ 6)% 2)));
  last_steering_time = micros();
}

void setup()
{

    // Setup digital outputs for steering angle sensor
    pinMode(STEERING_ANGLE_PIN_A, OUTPUT);
    pinMode(STEERING_ANGLE_PIN_B, OUTPUT);
    digitalWrite(STEERING_ANGLE_PIN_A, LOW);
    digitalWrite(STEERING_ANGLE_PIN_B, LOW);

    uint8_t ret;

    ret = can_pump.begin(MCP_ANY, 13, MCP_8MHZ);
    if (ret == CAN_OK)
    {
        
        can_pump.setMode(MCP_NORMAL);
    }
}

// Main program loop.  Poll both CAN networks.  If 0x201 received from vehicle network, modify and rebroadcast to pump network.

void loop()
{
    update_steering_outputs();

    uint32_t id;
    uint8_t len;
    uint8_t buf[24];
    uint8_t ret;

    // Check interrupt pin for vehicle CAN
    
        // Check if 0x201 ID
        if (id == 0x201) {
            // 0x201 - modify and rebroadcast to pump
           

            // RPM = uint16_t(bytes 0, 1) * 4
            uint16_t engine_speed = ((buf[0] * 256) + buf[1]) / 4;
           

            // Speed in KM/hr = (uint16_t(bytes 4. 5) + 100) * 100
            uint16_t vehicle_speed = (((buf[4] * 256) + buf[5]) / 100) - 100;
           
            // Mazda 3 pump expects RPM as raw bytes, no scalar like MX5
            // Mazda 3 pump expects km/hr*100, no 100 km offset like MX5
            vehicle_speed *= 100;

            // Write modified values back into buffer
            buf[0] = engine_speed / 256;
            buf[1] = engine_speed % 256;
            buf[4] = vehicle_speed / 256;
            buf[5] = vehicle_speed % 256;

            
        } else if (id == 0x081) {
            

            // Convert from steering angle message format to degrees
            int16_t steering_angle;
            unsigned char *ip = (unsigned char *) &steering_angle;
            ip[0] = buf[3];
            ip[1] = buf[2];
            uint16_t u_steering_angle = (steering_angle * 10 ) + 1600;
            ip = (unsigned char *) &u_steering_angle;

        
            // We initialize steering angle to zero.  This conditional makes sure there aren't any wild jumps in output from the first steering message.
            if (!current_steering_angle_valid) {
              current_steering_angle_valid = true;
              current_steering_angle = steering_angle * 2;
              previous_steering_angle = current_steering_angle;
            }

            // Drive outputs for early version Mazda 3 pump (pre 2009)
            target_steering_angle = steering_angle * 2;
            update_steering_outputs();

            
            previous_steering_angle = current_steering_angle;
        }
    }
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
Jacobsmess
Posts: 701
Joined: Thu Mar 02, 2023 1:30 pm
Location: Uk
Has thanked: 362 times
Been thanked: 104 times

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Jacobsmess »

Bratitude wrote: Sun Jan 12, 2025 6:12 pm It has 3 connectors, power, can, and analog steering angle.
So does this have partial load no load pwm functions? Or just on like they were on older ICE vehicles?
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

Jacobsmess wrote: Mon Jan 13, 2025 9:27 am So does this have partial load no load pwm functions? Or just on like they were on older ICE vehicles?

Depending on engine rpm and steering angle it’ll vary pump speed
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

pickd up a 2017 camery epas column for 100$

and.....
IMG_6162.JPEG
its a direct bolt in to the pedal box.

crazy!

the controller box is directly bolted to the motor so i removed it for more space. its 3phase!

motor/gearbox is a bit to big and sadly collides with a bracket on the firewall. but looks like a yaris motor unit is much smaller and should fit with the camery tilt column part.

the output of the toyota epas motors is 11/16- 36 splines, and the input shaft from the steering box has a rag joint that meets at the fire wall.

so!

with the following off the shelf connections:
11/16-36 x 3/4 dd u-joint: https://www.borgeson.com/Steel-3-4-DD-X-11-16-36.html
3/4dd shaft: https://www.borgeson.com/3-4DD-Shaft-18-Long.html
3/4dd rag joint: https://www.borgeson.com/rag-joint-flange-3-4-dd

this should result in a nonwelded steering shaft, and bolt in epas :)
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

random little bits:
Re sealed the inverter and tapped the inverter coolant inlet to cap it off.
IMG_6282.jpeg
Been scratching my head on how to do the driver side motor mount.

Decided to shift the stock mount over and make a bracket that ties it to the pitman arm bolts on the frame. This puts the mount right inline with the outer edge of the motor.
IMG_6287.jpeg

been busy with lots of brt ind stuff, lots of CAD work, so it’s nice to just fab stuff by hand.. with more CAD work ;)
IMG_6291.jpeg
IMG_6296.jpeg

Which resulted in:
IMG_6307.jpeg
IMG_6306.jpeg
the centre link has always been close to the motor. A common mod on these old Datsun trucks folks do when engine swapping is a “center link flip.” You drill out the tie rod tappers, and press in a new tapered insert on the other side, allowing the link to be mounted upside down, give an extra 3-4in of clearance for a motor.

This extra amount of space might allow the PDM to clear the hood..
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

Finished off motor mount with some goopy welds (its great that all the clean ones are hiding on the back side)
IMG_6537.jpeg
and started to assemble the prototype “pre- built” zombie unit.
IMG_6514.jpeg
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
P.S.Mangelsdorf
Posts: 1049
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 222 times
Been thanked: 256 times

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by P.S.Mangelsdorf »

Bratitude wrote: Sat Mar 01, 2025 5:43 am with some goopy welds (its great that all the clean ones are hiding on the back side)
It always seems to happen that way, doesn't it? Nothing is more annoying.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed Hot Rod Drag Week 2023 and 2024

https://www.youtube.com/@MangelsdorfSpeed
User avatar
Bratitude
Posts: 965
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 154 times
Been thanked: 334 times
Contact:

Re: Leaf swapped Nissan 720…. On the side of the road!

Post by Bratitude »

P.S.Mangelsdorf wrote: Sat Mar 01, 2025 5:33 pm It always seems to happen that way, doesn't it? Nothing is more annoying.
grinder and paint will fix it :evil:
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
Post Reply