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;
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.
Re: VW Touran powered by Nissan Leaf
Posted: Tue Oct 29, 2019 12:18 pm
by johu
New BMS arrived from UK, thanks very much to member Scirocco EV who sent it over for 0€ delivered
Had to shave some plastic from the LV connector then was able to start - exciting! Here are the voltages:
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
Re: VW Touran powered by Nissan Leaf
Posted: Tue Oct 29, 2019 7:19 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Tue Oct 29, 2019 9:18 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Sat Nov 02, 2019 9:17 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Sun Nov 03, 2019 10:31 am
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!
Still quite some variation between highest (3876mV) and lowest (3789mV) but now I can trust that it is real values.
Re: VW Touran powered by Nissan Leaf
Posted: Sun Nov 03, 2019 2:17 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Thu Nov 07, 2019 11:40 am
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 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.
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
Re: VW Touran powered by Nissan Leaf
Posted: Fri Nov 08, 2019 12:30 pm
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 .
Re: VW Touran powered by Nissan Leaf
Posted: Fri Nov 08, 2019 1:15 pm
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
Re: VW Touran powered by Nissan Leaf
Posted: Fri Nov 08, 2019 10:04 pm
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. Thanks for all your outstanding work. What was the magic sauce to get FW working properly?
Re: VW Touran powered by Nissan Leaf
Posted: Sat Nov 09, 2019 9:01 am
by johu
kiwifiat wrote: ↑Fri Nov 08, 2019 10:04 pm
That is great news. Thanks for all your outstanding work. What was the magic sauce to get FW working properly?
Reading
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.
Re: VW Touran powered by Nissan Leaf
Posted: Mon Nov 11, 2019 5:06 pm
by johu
Did a test drive yesterday and here is the economy figure (kWh/100km).
It was like 80-100km/h mostly flat back road driving
Re: VW Touran powered by Nissan Leaf
Posted: Mon Nov 11, 2019 6:32 pm
by tom91
is that trip meter accurate? At 176wh/km doing 80-100 km/h is very good for such a big car.
Re: VW Touran powered by Nissan Leaf
Posted: Mon Nov 11, 2019 7:17 pm
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?
Re: VW Touran powered by Nissan Leaf
Posted: Mon Nov 11, 2019 7:28 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Tue Nov 12, 2019 4:17 pm
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.
Re: VW Touran powered by Nissan Leaf
Posted: Tue Nov 12, 2019 5:30 pm
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
Re: VW Touran powered by Nissan Leaf
Posted: Wed Nov 13, 2019 5:22 am
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
Re: VW Touran powered by Nissan Leaf
Posted: Wed Nov 13, 2019 6:05 am
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.
Re: VW Touran powered by Nissan Leaf
Posted: Thu Nov 14, 2019 5:09 pm
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 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.