[DRIVING] VW Touran powered by Nissan Leaf  [FINISHED]

Tell us about the project you do with the open inverter
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: VW Touran powered by Nissan Leaf

Post by Kevin Sharpe »

I'll try to find my notes on connector part numbers... in the meantime have you seen this post from Mike at Indra?

https://www.diyelectriccar.com/forums/s ... tcount=207

... and this thread?

https://www.diyelectriccar.com/forums/s ... p?t=201233
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: VW Touran powered by Nissan Leaf

Post by Kevin Sharpe »

Kevin Sharpe wrote: Fri Oct 25, 2019 7:41 pm I'll try to find my notes on connector part numbers...
Here are the connectors that I used on my Leaf BMS;

https://www.diyelectriccar.com/forums/s ... stcount=12
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

doobedoobedo wrote: Fri Oct 25, 2019 6:48 pm Looks like you've got a fair amount of variation there. For the really low ones you could try bringing them up to around nominal voltage slowly and see if they manage to hold the charge.
The variation is not really there, I checked with my multimeter. Like said the BMS is partly damaged. The other ones might just be bad connections. I pushed some pins back out with a paper clip, maybe they got widened :?
Kevin Sharpe wrote: Fri Oct 25, 2019 8:04 pm Here are the connectors that I used on my Leaf BMS;

https://www.diyelectriccar.com/forums/s ... stcount=12
Yes that was my starting point but I think it was missing the male ones or something. Anyhow, definitely useful.

I made a wiki page for the Nissan BMS, feel free to make additions: https://openinverter.org/wiki/Nissan_Leaf_BMS
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

While working on the car today suddenly all warning lights went on and the hand brake symbol started blinking. I couldn't access various controllers except the instrument cluster and was a bit terrified that I might have damaged something. Well to cut it short it was my wire-tap connector that I had used to tap into the motor CAN bus with the inverter. When moving it around the errors would appear.
So I removed them and am now looping the CAN bus through the inverter as you're supposed to do. Luckily I had the 6-pole VW connector handy so the CAN bus tap is now super clean without cutting any wires or tapping into them.

Apart from that I cut off most of the bus bar of the Leaf current sensor and screwed it directly to the B+ relay. The BMS itself is going to live on top of the front battery stack.

Last but not least I did a test drive with MTPA control and field weakening control but there is no real change I'm afraid. Maybe the motor now runs cooler but it still vastly looses torque above 4500rpm. Attached the software in case someone is interested. throtiq and throtid have been replaced by the single parameter throtcur as the d and q part are now decided upon by MTPA or field weakening. The field weakening controller has a parameter fwkp for controller gain.

Pictures tomorrow.
Attachments
stm32-foc.zip
(63.62 KiB) Downloaded 70 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

New BMS arrived from UK, thanks very much to member Scirocco EV who sent it over for 0€ delivered 8-)

Had to shave some plastic from the LV connector then was able to start - exciting! Here are the voltages:

Code: Select all

3586	3821	3797	
3784	3798	3790	
3790	3790	3792	3798
3789	3748	3816	
3792	3788	3780	3789
3788	3788	3780	
3789	3789	3793	3789
3789	3795	3792	
3788	3788	3788	3792
3783	3789	3787	
3787	3783	3788	3790
3790	3790	3790	
3787	3792	3788	3794
3789	3789	3787	
3784	3781	3788	3756
3820	3790	3795	
3819	3785	3789	3789
3785	3789	3799	
3792	3751	3816	3788
3780	3756	3812	
3786	3787	3783	3783
3780	3794	3785	
3793	3792	3788	3789
3784	3783	3801	
3792	3798	3780	3798
3789	3794	3794	
3795	3783	3790	3796
3801	3807	36563	
So about 70mV variation, much better. Only the first value must be misinterpreted, it always shows 3586mV. Even on the other BMS.
So now I'll wire up the CAN bus and talk to the BMS via my custom ECU.
Edit: just went back down to see how things developed. Car was slow charging. Now suddenly the hi-byte of cell 1 had jumped to F translating to 3.8V. But the low byte is always stuck at 0x2
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

johu wrote: Mon May 20, 2019 4:22 pm I was thinking about heating in winter. Instead of a resistive heater I could just deliberately run the motor with low efficiency to create extra heat. I would use a valve to run all fluid through the heater core in passenger room.
Want to dig that one out again, look what I found:


Apparently Tesla burn power in the motor to heat up the battery.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

Hm...
There are some points that you will have to take into account then.
1. Temp needed should be at least 55deg for the air heating to be effective I think. You can try with a 230Vac washing machine heater. On 230Vac it makes 2.2kw but on 360Vdc it makes almost 5kw. You can use one digital thermostat with a relay to shutoff/on contractor and try how much temp you need to heat up interior. You can even use it for very cold days if motor doesn’t make enough heat.
2. To get that out of the motor there should be very short coolant path to the heater.
3. Inverter cooling should be on separate loop from motor, just in case.

8-)
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

So hooked up the BMS today and looked at CAN values.
Of course most values don't make sense as the LBC/BMS doesn't belong to this battery.
I am getting a very low power limit (0 charge, 4.5kW discharge) because of "LBC malfunction". DTC is 10. Anyone know where I can find a list of DTCs?

Gotta say, SavvyCAN is awesome, it was real easy to define the signals despite the weird bit order.
Attachments
Bildschirmfoto vom 2019-11-02 22-17-57.png
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

johu wrote: Tue Oct 29, 2019 12:18 pm So about 70mV variation, much better. Only the first value must be misinterpreted, it always shows 3586mV. Even on the other BMS.
So now I'll wire up the CAN bus and talk to the BMS via my custom ECU.
Edit: just went back down to see how things developed. Car was slow charging. Now suddenly the hi-byte of cell 1 had jumped to F translating to 3.8V. But the low byte is always stuck at 0x2
Quoting myself again. I figured out my mistake when decoding the voltages: they are all big endian!

Code: Select all

3876	3847		
3830	3843	3841	
3841	3836	3838	3843
3834	3789	3858	
3838	3834	3825	3834
3829	3834	3830	
3830	3839	3839	3835
3834	3836	3833	
3834	3834	3829	3838
3824	3834	3833	
3838	3828	3838	3836
3836	3841	3841	
3833	3838	3834	3843
3835	3835	3828	
3835	3831	3834	3801
3866	3841	3845	
3808	3865	3834	3839
3830	3835	3846	
3838	3801	3857	3834
3825	3806	3862	
3841	3833	3824	3829
3826	3839	3830	
3839	3838	3838	3834
3830	3834	3842	
3838	3843	3830	3843
3834	3839	3846	
3841	3824	3831	3847
3847	3854	3841	
Still quite some variation between highest (3876mV) and lowest (3789mV) but now I can trust that it is real values.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Kevin Sharpe
Posts: 1345
Joined: Fri Dec 14, 2018 9:24 pm
Location: Ireland and US
Been thanked: 4 times

Re: VW Touran powered by Nissan Leaf

Post by Kevin Sharpe »

johu wrote: Sat Nov 02, 2019 9:17 pmAnyone know where I can find a list of DTCs?
checkout LeafSpy which we used for resetting DTCs when we did our Leaf based conversion. Maybe they have documented the DTCs somewhere.
This is a personal post and I disclaim all responsibility for any loss or damage which any person may suffer from reliance on the information and material in this post or any opinion, conclusion or recommendation in the information and material.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Kevin Sharpe wrote: Sun Nov 03, 2019 2:17 pm checkout LeafSpy which we used for resetting DTCs when we did our Leaf based conversion. Maybe they have documented the DTCs somewhere.
Still no success in that respect but I'm already using the BMS for calculating power, SoC and cutting of the charger on a per cell voltage threshold.

But more exciting news today: Finally field weakening is working! See more here: viewtopic.php?f=7&t=153&p=3964#p3964
There is no longer a weird torque knee at 4000 rpm but it just keeps revving. At 6000rpm I was too scared to continue, but it seemed torque hadn't diminished at all.

On other news I figured out the economy meter, ie. the ones that displays "l/100km" for the gas engine. Of course it still calls it l/100km but it is now kWh :D And because the instrument cluster is intelligent it switches to l/h (meaning kWh) when the car is stationary. Only downside: the over all consumption calculation will not include regen, as l/100km is not allowed negative, for obvious reasons.

Will update the Touran wiki accordingly.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Zapatero
Posts: 443
Joined: Fri Oct 25, 2019 11:08 am
Location: Germany, Ulm
Has thanked: 25 times
Been thanked: 39 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by Zapatero »

johu wrote: Thu Nov 07, 2019 11:40 am
But more exciting news today: Finally field weakening is working! See more here: viewtopic.php?f=7&t=153&p=3964#p3964
There is no longer a weird torque knee at 4000 rpm but it just keeps revving. At 6000rpm I was too scared to continue, but it seemed torque hadn't diminished at all.
That are awesome news. Looking forward to experience the electric potential of the leaf inverter in my Toyota :D
purplespark
Posts: 52
Joined: Fri Feb 15, 2019 10:22 am
Location: United Kingdom

Re: VW Touran powered by Nissan Leaf

Post by purplespark »

Well done with the FOC Johannes , and thanks for posting the Touran canbus software - I hope it'll be useful for me -when I get that far !
Do you think I can replace Touran VCU with a blue pill and can driver ?
I'm still struggling with the coupler! Not sure which will be better- straight Damien style coupler with iffy clutch centre (unless I can find one with a really good fit ) , or butcher the gearbox for the Nissan input shaft and have that machined .
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Yes Blue Pill and CAN driver (and 12->5V power supply) should be sufficient. Just go over the various pins and check they are all present on the pill.
Yeah coupler is always a drag, good luck :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
kiwifiat
Posts: 99
Joined: Sat Dec 22, 2018 9:39 pm
Location: Vancouver, Canada
Been thanked: 10 times

Re: VW Touran powered by Nissan Leaf

Post by kiwifiat »

johu wrote: Thu Nov 07, 2019 11:40 am
But more exciting news today: Finally field weakening is working! See more here: viewtopic.php?f=7&t=153&p=3964#p3964
There is no longer a weird torque knee at 4000 rpm but it just keeps revving. At 6000rpm I was too scared to continue, but it seemed torque hadn't diminished at all.

That is great news. :D Thanks for all your outstanding work. What was the magic sauce to get FW working properly?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

kiwifiat wrote: Fri Nov 08, 2019 10:04 pm That is great news. :D Thanks for all your outstanding work. What was the magic sauce to get FW working properly?
Reading :D
Basically I implemented this: http://www.ti.com/lit/pdf/spracf3
But that alone had no effect, as the d-voltage would always hit its saturation point and then no matter which fancy algorithms you deploy, you cannot further increase d-current.

So the most important bit was (re-) introducing speed dependent phase shift (called syncadv). In most papers you will not see this. Another important piece was helping the PI controllers by adding a speed dependent voltage offset. That greatly reduces integrator windup. And that in turn reduces regen peaks when transitioning to regen. Only a few papers actually mentioned the necessity of it.
No surprise, if you're a student you'll just copy the generic FOC structure out there, add some fancy algorithm to make it sensorless (involving neural networks, observers or blockchain :) ) spin up a small motor on a testbench and you're done with it.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Did a test drive yesterday and here is the economy figure 8-) (kWh/100km).
It was like 80-100km/h mostly flat back road driving
Attachments
IMG_20191110_154928.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
tom91
Posts: 1277
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 204 times

Re: VW Touran powered by Nissan Leaf

Post by tom91 »

is that trip meter accurate? At 176wh/km doing 80-100 km/h is very good for such a big car.
Founder Volt Influx https://www.voltinflux.com/
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: VW Touran powered by Nissan Leaf

Post by JaniK »

Thats about the same what I get with driving 100kmh on the Nissan Leaf @1460kg. So looks really good.

How is the weight of Touran now?
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

tom91 wrote: Mon Nov 11, 2019 6:32 pm is that trip meter accurate? At 176wh/km doing 80-100 km/h is very good for such a big car.
Yes it should be. It is fed by an upcounter. The faster it upcounts, the higher the consumption. It is linear, I checked. So if you count up by 28 per 10ms it will display 10l/h. If you start driving it will convert that to l/100km. So I just take the power reported by the BMS in kW, multiply by 2.8. Now if I pull 1kW it will display "1 l/h".
JaniK wrote: Mon Nov 11, 2019 7:17 pm Thats about the same what I get with driving 100kmh on the Nissan Leaf @1460kg. So looks really good.

How is the weight of Touran now?
Wow, thats almost too good. Maybe because I have no auxiliary drain right now. I don't have any equipment to weigh the car, so will have to wait for the TÜV visit.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

Sorted the fuel gauge today.
Blue Pill+MCP2562 CAN Transceiver+ 2 BC547 transistors
So at 50% SoC we output 36% duty cycle on both transistors. As SoC increases we decrease duty cycle on one channel and increase it on the other one by a certain amount per % SoC. Perfect analog pot simulation.
Then mapped SoC from the Nissan BMS to it, done. Still took me all day ;)

Idle duty cycle and SoC gain are configurable so I hope it will work for other cars with a similar setup.
Attachments
DSC04756.JPG
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

johu wrote: Tue Nov 12, 2019 4:17 pm Sorted the fuel gauge today.
Blue Pill+MCP2562 CAN Transceiver+ 2 BC547 transistors
So at 50% SoC we output 36% duty cycle on both transistors. As SoC increases we decrease duty cycle on one channel and increase it on the other one by a certain amount per % SoC. Perfect analog pot simulation.
Then mapped SoC from the Nissan BMS to it, done. Still took me all day ;)

Idle duty cycle and SoC gain are configurable so I hope it will work for other cars with a similar setup.
Ah J where were you last week!!! I was just banging my head at my fuel mapping and wonder why I can't go past 50% indicated.
Well my SOC probe uses single Fet driver to move needle in mazda. But here single pwm doesn't go beyond 50%.
Can you show a circuit to get single pwm signal to move needle full range?

Tnx
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

At least in Touran that is not possible. You need two channels. Before fancy PWM you should try your luck with an actual mechanical pot. There are 3 wires in Touran, only do many ways to connect them
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by arber333 »

johu wrote: Wed Nov 13, 2019 5:22 am At least in Touran that is not possible. You need two channels. Before fancy PWM you should try your luck with an actual mechanical pot. There are 3 wires in Touran, only do many ways to connect them
Hm... I have 4 wires... but wiring sch says 2 of the wires are used for the pump. Ouch! It just occured to me that probe is 150R and current driven. I may be using too small of a current. I used one resistor inline so not to damage the sensing circuit. I have to try if it will run with one larger NFET.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: VW Touran powered by Nissan Leaf

Post by johu »

I final-mounted the fuel gauge driver today and put all the trim and seats back in.
But oh no, as soon as I spin the motor all warning lights go crazy :o Seems my CAN bus extension from BMS to gauge driver causes a problem. After all it's routed on top of the batteries so will see a fair bit of EMV. Maybe it's a termination issue. Still haven't measured total bus resistance.

So remove seats and trim and try again :?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply