Outlander rear motor and inverter

Mitsubishi hybrid drive unit hacking
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

so this weekend got it driving up and down the drive. no coolant at that point so a very short slow run but proves it all works. Umpteen jobs to do to get it road ready but good progress and pleased to have it mobile again.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
Bigpie
Posts: 1595
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 75 times
Been thanked: 304 times

Re: Outlander rear motor and inverter

Post by Bigpie »

Awesome progress
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

FFMan wrote: Thu Dec 14, 2023 8:05 pm ..........

interesting point, i do set byte 6 of 287 to zero if i press the brake, but maybe i'll do as you suggest also.

..........
I am really interested at your experience for when you change 0x287 byte6 from 03 to 00. What happens if you are at speed? Would the byte6 03 return cause a jolt? How does it feel when you touch the brake at speed?

EDIT: I am thinking of using "normal" input to trigger byte6 change in winter independently from brake pin. E.g. using a separate flag in the loop.
"sport" mode would drive without this loop.
tnx
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

arber333 wrote: Sun Dec 17, 2023 6:45 pm I am really interested at your experience for when you change 0x287 byte6 from 03 to 00. What happens if you are at speed? Would the byte6 03 return cause a jolt? How does it feel when you touch the brake at speed?

EDIT: I am thinking of using "normal" input to trigger byte6 change in winter independently from brake pin. E.g. using a separate flag in the loop.
"sport" mode would drive without this loop.
tnx
i'll let you know when i get it out on the road.

from my previous post i only put this in because in one direction on the bench the motor was reluctant to spin down. However that is now confirmed as the direction i don't use so if there is a jolt on disable i think i will try removing that code.

Should have it road tested in a day or so.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
royhen99
Posts: 211
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 16 times
Been thanked: 101 times

Re: Outlander rear motor and inverter

Post by royhen99 »

arber333 wrote: Sun Dec 17, 2023 6:45 pm I am really interested at your experience for when you change 0x287 byte6 from 03 to 00. What happens if you are at speed? Would the byte6 03 return cause a jolt? How does it feel when you touch the brake at speed?
I suggested clearing byte 6 based on CAN logs, but after looking in a bit more detail it only happens at low speed. Two examples in the log file were 30 rpm and -27 rpm, at higher speed it was 0x03.
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

i'll have a play with setting that byte

For others that have done this, i have seen various throttle strategies from damiens pedal maps using rpm & torque request lookup, to a more gradual increment torque request each loop through the 287 send, and dual rate so first part of travel has less 'gearing'.

At the moment as i've just written it, pedal position maps to torque request linearly. What is the experience of people here with different map strategies and drivability that results in the best feel ?
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

royhen99 wrote: Sun Dec 17, 2023 8:46 pm I suggested clearing byte 6 based on CAN logs, but after looking in a bit more detail it only happens at low speed. Two examples in the log file were 30 rpm and -27 rpm, at higher speed it was 0x03.
I figured it would cause a jolt at high speed. My Peugeot Lebowski drive does cause quite a jolt even though it immediately returns to operation at high speed.

EDIT: I might think of adding a loop to turn b6 to 00 for two conditions:
1. with throttle pedal at or around 0 position and; at low speed 20RPM/-20RPM;

or;

2. with brake pressed and; at low speed 20RPM/-20RPM;
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

and i would add when you hit the brake

i'll try some strategies and report back
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

tonight with the coolant loop working i went half a mile with no issue.

Tomorrow i need to hook up the temperature reporting etc before i go any further afield but it is getting there.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

so today did over 7 miles in two trips. after 1st trip i looked at the log and realised i had the throttle scaling wrong and was only asking for abut 75% of torque.

Fixed that and went for another spin, all good. Can put foot to floor anytime with no worry about inverter trips. I would say its quite a bit stronger from standstill where i think the prius inverter was current limited or tripped, and about 10% up all other areas.

To answer the question posed about disabling the inverter when off the throttle and would this cause a jolt - not a bit, feels fine with no fancy pedal mapping at all. The issue with disabling the inverter on zero throttle will of course be no regen available, but that comes later...
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

FFMan wrote: Wed Dec 20, 2023 7:07 pm so today did over 7 miles in two trips. after 1st trip i looked at the log and realised i had the throttle scaling wrong and was only asking for abut 75% of torque.

Fixed that and went for another spin, all good. Can put foot to floor anytime with no worry about inverter trips. I would say its quite a bit stronger from standstill where i think the prius inverter was current limited or tripped, and about 10% up all other areas.

To answer the question posed about disabling the inverter when off the throttle and would this cause a jolt - not a bit, feels fine with no fancy pedal mapping at all. The issue with disabling the inverter on zero throttle will of course be no regen available, but that comes later...
Excellent! Thank you.

Can you explain how did you scale up (from where) throttle and what you are referring to "no fancy pedal mapping". Do you mean you used linear throttle? With zombieverter?
I am wiring for aot93 teensy VCU and i will add byte6 control to brake for sure. That should in fact be the certification requirement for any ESD, ABS or other drive enhancement in a car.

tnx
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

so i have PotMin and PotMax variable define the usable range of throttle in the car, so

throttlePercent=map(throttlereading,PotMin,PotMax,0,100)

then map the percentage to 0-200nm torque, add 10,000 and send

I don't know what a093 is. I am using Teensy 4.0 for vcu

If you zero byte 6 you can't set regen so i will abandon that approach shortly but for initial testing it was a good move.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

FFMan wrote: Wed Dec 20, 2023 7:52 pm so i have PotMin and PotMax variable define the usable range of throttle in the car, so

throttlePercent=map(throttlereading,PotMin,PotMax,0,100)

then map the percentage to 0-200nm torque, add 10,000 and send

I don't know what a093 is. I am using Teensy 4.0 for vcu

If you zero byte 6 you can't set regen so i will abandon that approach shortly but for initial testing it was a good move.
aot93 is the author of the teensy 4.1 VCU and code here viewtopic.php?t=2167
I got the hardware and firmware and i am trying to get it working in my Mazda.

So which firmware do you use if i may ask? Did you develop your own github?
tnx
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

i wrote my own code based on knowledge gained by looking at other code. I prefer to do that so i fully understand how it works.

Mine is very simple based on a custom PCB a friend had made for it. Basically a Teensy 4.0 and can transceiver and some resistor dividers to take the 12v start signal.

Happy so share any details and I have some spare unpopulated PCBs about as min order qnt was 5.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
User avatar
DkubusEV
Posts: 81
Joined: Sat Sep 17, 2022 4:22 am
Location: Australia
Has thanked: 130 times
Been thanked: 15 times

Re: Outlander rear motor and inverter

Post by DkubusEV »

FFMan wrote: Wed Dec 20, 2023 8:22 pm i wrote my own code based on knowledge gained by looking at other code. I prefer to do that so i fully understand how it works.

Mine is very simple based on a custom PCB a friend had made for it. Basically a Teensy 4.0 and can transceiver and some resistor dividers to take the 12v start signal.

Happy so share any details and I have some spare unpopulated PCBs about as min order qnt was 5.
FFman I'd definitely be interested in one of your boards, and if you're willing to share your code ? Please shoot me a message so we can exchange details and make arrangements for payment too. Cheers mate 👍
1998 Mercedes R170 SLK gs450h project
2003 Smart-Roadster hillclimb EV (DC)zilla2k
1976 Purvis-Eureka EV kit car
2011 Ford focus EV (DC)Soliton1
1990 Daihatsu charade G100 3 door DC conversion.
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

DkubusEV wrote: Wed Dec 20, 2023 9:08 pm FFman I'd definitely be interested in one of your boards, and if you're willing to share your code ? Please shoot me a message so we can exchange details and make arrangements for payment too. Cheers mate 👍
for some reason i can't PM you - it says user does not exist even though it finds you in the directory so :-

Hi

you're welcome to a board but you can also have the files as i see you are down under, maybe you have nearer fab places or i can post one ?

Can you smt solder ? There are a few components to mount. Failing that i might be able tp persuade my mate to assemble one for a few beer tokens.

What car is this going in, i ask because we have an E46 variant which combines dash control and VCU on one board to save the Teensy count.

I've attached the code. It works but has no frills, it assumes contactor control/precharge is done elsewhere like mine is, and is on a separate can bus to the Outlander charger as there are some common can ids in use.

It just has throttle pot, brake and start in and can which talks to OEM inverter, and also sends out a periodic 0x555 message to my other Teensy that controls my Nextion display but you can remove that.

It's still subject to a bit of refinement but it works as is
Attachments
zombie_code_v1-T40Prod.zip
(136.7 KiB) Downloaded 158 times
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

FFMan wrote: Wed Dec 20, 2023 9:51 pm ....

I've attached the code. It works but has no frills, it assumes contactor control/precharge is done elsewhere like mine is, and is on a separate can bus to the Outlander charger as there are some common can ids in use.

It just has throttle pot, brake and start in and can which talks to OEM inverter, and also sends out a periodic 0x555 message to my other Teensy that controls my Nextion display but you can remove that.

It's still subject to a bit of refinement but it works as is
Thank you much for your files.
If i may ask... do you perform precharge at all.
I started to develop my system based on esp32 chip. While i set my system up for 2s precharge before drive and charge process i cant get this to behave in a stable manner. Not all cases provide prechage on starting trigger. Can you elaborate on how you perform that process?
FFMan
Posts: 321
Joined: Mon Jul 25, 2022 7:59 pm
Location: Bicester, Oxfordshire
Has thanked: 8 times
Been thanked: 46 times

Re: Outlander rear motor and inverter

Post by FFMan »

my contactors are controlled by some timed relays, not by software as such. So if i turn the arduino on for charging, or turn the ignition key the relays fire up in order, negative & precharge, after 3 secs, main positive comes in, and half a sec later precharge drops out.

this was chosen in the early days as i tried to keep my code off the critical path for running, but having dropped the openinverter board in favour of my own vcu that design parameter has gone out the window anyhow. I think mainly i was trying to avoid a board lock-up or load of new s/w dropping the contactors
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

When i couldnt get any RPM information from my VCU i started to investigate CAN reports. I noticed telegram 0x289 byte7 wouldnt report disable condition the same as we have it documented...
Next i investigated RPM commands and they seem different as well.

I then went on and recorded CAN log of my inverter and DCDC in operation.
1. I could confirm DCDC is reporting as standard as is the case with charger part.
2. Heater does work exactly the same as before.
3. Inverter on the other hand wouldnt report in the same format as we know. My inverter is P/N 9410A163.
However i can see inverter will still respond correctly to torque request.
I have run my motor at power and recorded inverter report. I attach it here.

Please guys can you let me know which P/N you have that is working with OEM torque commands? I figured it must be P/N 9410A081 asit is the only other inverter i see being sold.


EDIT: It seems i messed up with CAN mailboxes and didnt notice there was one mailbox for two things and this may have interfeered with CAN reading. I get charger reporting now as well as DCDC and inverter temperatures. CAN bus should be the same between inverters. I will see what can i do about torque tomorrow.
Attachments
rpm1.txt
(2.25 MiB) Downloaded 160 times
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Outlander rear motor and inverter

Post by arber333 »

I really am not sure that i even receive CAN traffic as i now investigated charger and DCDC reporting. There is no DC voltage report even though i specificaly use it to regulate charger loop.
Of course if there is no report charger is stuck in else part of the loop. Anyone has any idea what would be the case?

EDIT: I had to reconfigure CAN receive mailboxes. Now i am getting correct data back.
Post Reply