Outlander VCU - Rear inverter, Charger and BMS

Mitsubishi hybrid drive unit hacking
Post Reply
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

Happy new Year everyone.

I'm reasonably happy with where I've got to with the control of the Outlander rear inverter, charger and BMS so I thought I would share.
hopefully it's of use to others.

There are three parts to this.

Part 1 is the main VCU -

Built around Teensy 4.1 it has 3 CAN interfaces, 12 darlington outputs, 8 opto isolated inputs and 2 antilog inputs.
It sends torque requests based on a map that considerers speed and throttle position.
Above a certain RPM values are incremented to keep things smooth.
Regen is always ramped on and off
3 maps are user selectable.
Control of cooling pump, fan, brake and reverse lights.
PWM outputs for fuel and temp gauge.
Basic serial menu and de-bugging
CAN bus comms to BMS and Dash.

Code can be found here:

https://github.com/aot93/Mini-E-VCU

PCB is here:

https://easyeda.com/aot93/mini-e-t4-vcu_copy

Enclosure and connector for this can be found here:
https://www.aliexpress.com/item/3283936 ... 4c4dkudMDh

Part 2 is the BMS:

This is a modified version of Tom91's excellent simpBMS I've removed some unused parts and added support for the outlander charger (building on work already done by bigpie) this is for the outlander CMU's
Also expanded CAN bus so key on key - off is now CAN controlled
Added extra info on BMS status etc for VCU control.
Added status LED's on charge port when charging

Also I added an ATtiny85 running in minimal power mode for plug detect - PP pin pulls an input to ground.
A changeover really powers up the main boards and stats the charging process as soon as the plug is inserted.

Code can be found here:

https://github.com/aot93/OutlanderPHEVB ... ---Charger

I also made a custom PCB for this here:

https://easyeda.com/aot93/simpbmsminimal

Enclosure and connector for this can be found here:
https://www.aliexpress.com/item/3283023 ... 4c4dkudMDh

Part 3 is a dash control module:

This receives CAN messages from the VCU and displays useful info on two OLED screens mounted to the old mini instruments.
It also drives a small servo for the speedo and takes care of trip and odometer functions.

Code here:
https://github.com/aot93/Dash-Display

PCB here:
https://oshwlab.com/aot93/mini-e-dash-controller
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

I’m looking forward to testing all this out! Thanks very much for sharing your work - will you be selling pcbs?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

I've got a few bare boards left as the min order was 5pcs, let me know if you want one.

I've used prebuilt modules for the CAN trx's and power supply as it was getting difficult finding even basic components.
Also means all components are through hole so easy to make up and replace.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by arber333 »

aot93 wrote: Sat Jan 01, 2022 8:46 pm It sends torque requests based on a map that considerers speed and throttle position.
...
3 maps are user selectable.
How do the maps work? You use different curves with selectable inputs?

tnx
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

Each map is a multi dimensional array, a cell is returned based on the throttle position and motor speed.
The value returned is then used as a multiplier on the pedal position to derive the torque request.
This can be negative for re-gen

I took the idea from the way ignition maps work in ice cars.

The array to use is set by reading the position of an on - off - on toggle switch.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by arber333 »

aot93 wrote: Sat Jan 01, 2022 10:48 pm
I took the idea from the way ignition maps work in ice cars.
The array to use is set by reading the position of an on - off - on toggle switch.
I will try to use your idea in my due VCU if you dont mind. Of course i will comment on your reference. Seems like a great way to use multiple throttle settings within one thread. I hope map function will be up to the task.
I will try to toggle your maps using one button and some case statements.

Tnx
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

arber333 wrote: Sun Jan 02, 2022 1:09 am
I will try to use your idea in my due VCU if you dont mind. Of course i will comment on your reference. Seems like a great way to use multiple throttle settings within one thread. I hope map function will be up to the task.
I will try to toggle your maps using one button and some case statements.
Sounds great, it should run nice on a duo, it's not a heavy operation.
Let me know how you get on!
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

Do you have the details of the oled displays you used?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

The one in the speedo is a .9" 128x32px i2c interface like this one:

https://www.amazon.co.uk/gp/product/B07 ... UTF8&psc=1

The info display (which fits nicely in an old oil pressure gauge) is a 1.3" 128x64px i2c like this:

https://www.amazon.co.uk/gp/product/B07 ... UTF8&psc=1
IMG_20210907_184504.jpg
maverickshq
Posts: 1
Joined: Fri Jan 07, 2022 10:21 am

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by maverickshq »

aot93 wrote: Sat Jan 01, 2022 10:29 pm I've got a few bare boards left as the min order was 5pcs, let me know if you want one.

I've used prebuilt modules for the CAN trx's and power supply as it was getting difficult finding even basic components.
Also means all components are through hole so easy to make up and replace.
Hi, I am new to the forum but have been gathering some parts for a conversion using Outlander rear drive, inverter and charger. I haven't much clue regarding the electronics but if you have any of the boards left then I would take one of each off you?
User avatar
midway
Posts: 78
Joined: Mon Feb 15, 2021 3:52 pm
Location: Ural
Has thanked: 5 times
Been thanked: 8 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by midway »

There may be an error in main.cpp
Attachments
123.jpg
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

midway wrote: Sun Jan 09, 2022 12:27 pm There may be an error in main.cpp
My bad, I fixed that a while back but looks like I didn't push it to git.

Just did a sync so check back, also commented out some de-bug print calls.

Good catch though! Please let me know if you spot others.
User avatar
midway
Posts: 78
Joined: Mon Feb 15, 2021 3:52 pm
Location: Ural
Has thanked: 5 times
Been thanked: 8 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by midway »

So far I have only discovered this.
I have a non-latching forward-backward toggle switch, I modified the code and found an error in doing so.
#define ISO_IN8 21 // PP Detect - Is this a charging sync?
What speed does MINI with Outlander engine develop?
Enough of the Outlander engine for a comfortable ride?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

PP Detect is actually unused in this build, now. - It was there to check if the charge plug from EVSE is connected. This is now done via can.

Speed wise, assuming you mean top speed, I've not actually got it stop accelerating yet, but I'm trying to keep to 10,000RPM which is 82mph on a mini with 12" wheels, and the stock outlander reduction box.
Acceleration is quite impressive, the hard bit is stopping the wheels spinning!

I would say the ride is better than before, the build has come in at 715Kg which is much the same as it was, but the weight distribution is very close to 50/50
User avatar
midway
Posts: 78
Joined: Mon Feb 15, 2021 3:52 pm
Location: Ural
Has thanked: 5 times
Been thanked: 8 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by midway »

Fine. I used PP Detect to turn on neutral. I continue to work on a Mercedes-A class project, there were doubts about the outlander engine. I wanted to replace it with Nissan Leaf. Thank you very much, your code was very useful.
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

I intend to run the outlander rear motor reversed - can anyone see a problem with this? In my head since there is no oil pump it should simply be a case of switching forward and reverse?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

Are you using the reduction gear or matting to something else?

I run mine upside-down and have not had a problem, my only concern would be if using the reduction box backwards would limit the amount of oil splash on the diff.
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

I’m running the reduction gear yes - I figured as long as the gears pass through the volume of oil at the lowest point they will still “splash” oil?
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

Do you have a wiring diagram for the harness that connects between the vcu and bms and the inverter/charger/ motor? I’ve been trying to figure it out from the schematics but think I might be missing something? Cheers, pete.
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

I made some general schematics here:

https://easyeda.com/aot93/mini-e-wiring

They are a bit out of date but give a good idea.

For the connections to outlander components they can all be found in the service manual here:

http://mmc-manuals.ru/manuals/outlander ... dex_M1.htm

Let me know if you get stuck
Turbopete
Posts: 75
Joined: Mon Aug 30, 2021 8:42 pm

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by Turbopete »

Awesome!!!! Thanks very much! - did you use the BMS to control the contactors or the VCU?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

The contactors are controlled by the VCU.
The BMS main contactor controls a relay pulling RSDN high when open and low when closed
Should be less chance of the contactors opening under load if a BMS error event occurs.
Pulling RSDN high should be a more graceful shut down.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by arber333 »

Turbopete wrote: Sun Jan 02, 2022 9:53 pm Do you have the details of the oled displays you used?
Hm...
Would you think possible to use LCD display directly with BMS unit? Like with SimpBMS?
Shouldnt be a problem to use nextion LCD with tx/rx?
User avatar
aot93
Posts: 198
Joined: Mon Feb 15, 2021 5:45 pm
Location: UK, West Sussex
Has thanked: 6 times
Been thanked: 43 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by aot93 »

No problem to use nextion, It just would not fit in the old mini gauges.
I'm also not a fan of the nextion protocol.

My longer term project is to get this all working on a web interface via an esp32
User avatar
midway
Posts: 78
Joined: Mon Feb 15, 2021 3:52 pm
Location: Ural
Has thanked: 5 times
Been thanked: 8 times

Re: Outlander VCU - Rear inverter, Charger and BMS

Post by midway »

I plan to use the development of Finnish programmers as a dashboard. Very flexible system, excellent work with can bus.
http://realdash.net/index.php
As a display, you can use a tablet or android mirror.
Post Reply