Page 7 of 11

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Mon Jan 02, 2023 10:29 am
by Alibro
This is a copy of post in the Mitsubishi section about the dc to dc converter and ac charger.
Alibro wrote: Sat Dec 31, 2022 5:07 pm Just a quick update on using the Mitsubishi charger properly for the first time.
I have only in the last couple of days plumbed the cooling in my car so yesterday for the first time charged the battery and found a couple of things.

I had a 220R resistor between ground and PP but removing it made no difference. It still charges with it disconnected so for now I have removed it.

I had the sense line and the enable line connected in two different 12V sources and found the battery voltage went up to 15V so instead joined them together and reconnected them directly (via a relay and fuse) to the battery and the voltage dropped to 14.4 which is just about perfect.

Using a Nissan Leaf Granny charger I am charging at 2175kW or around 9A ac and 5A dc. This is pretty slow but for now is fine. Someday in the future I may look for a way to speed up the charging.
I haven't yet implemented an automatic cutoff at 390V - 400V so had to keep an eye on it but the charging was so slow this wasn't an issue. I'll have another go at getting Arber333 software working and will report back if I do.

So far I'm happy that this unit will do the job for now and thanks again to the guys who helped before.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Mon Jan 02, 2023 10:32 am
by Alibro
And this is a copy of a post in the Nissan section about the Nissan Leaf/ Tesla coolant pump.
Alibro wrote: Sun Jan 01, 2023 10:41 pm I had another play with this tonight and the following sketch works a treat and this time the PWM is not inverted so increasing the PWM percent increases the speed of the pump. I'm not sure what the RPM is but if my maths are correct it's around 2400rpm. I can see coolant flowing well but the pump is whisper quiet, even better the current draw fell from over 3A to under 500mA and the coolant is no longer cavitating which it was before.

Code: Select all

// Set-up fast PWM on the Arduino UNO at 1Hz on Digital pin D9
void setup() { 
  pinMode(9, OUTPUT);                               // Set digital pin 9 (D9) to an output
  TCCR1A = _BV(COM1A1) | _BV(WGM11);                // Enable the PWM output OC1A on digital pins 9
  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS12);     // Set fast PWM and prescaler of 256 on timer 1
  ICR1 = 31249;                                     // Set the PWM frequency to 2Hz: 16MHz/(256 * 2Hz) - 1 = 31249
  OCR1A = 14000;                                    // Set the duty-cycle to approx 45%: 31249 / 45 = 14062
}
void loop() {}
sketch_jan01a.ino
To change the pump speed by a small but noticeable amount increment/decrement OCR1A by 1000 at a time.

Gnd on the Arduino is connected to 12V ground
Pin 9 on the Arduino is connected directly to pin3 on the pump.

Where I found the original sketch that I adapted
https://forum.arduino.cc/t/how-to-set-p ... 2?u=alibro

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Mon Jan 02, 2023 1:56 pm
by m.art.y
The max Outlander charger can do is around 3.6 kw or 16A ac. Most granny cables are limited to 10A ac for a reason because the granny cable is meant for charging from a normal 220v outlet which may not be able to withstand 16A prolonged charging and could melt the socket/cause fire. If you have a good/robust 220v socket you can get a granny cable that is adjustable with a push of a button - these can go from 6 to 12A or even some to 16A. For home charging overnight 2kw is fine. To max out Outlander charger you'd need 16A granny cable/wallbox. 3.6 kw charging is still too slow for travelling so you can either get a chademo/ccs or a more powerful ac charger.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Mon Jan 02, 2023 2:19 pm
by Alibro
m.art.y wrote: Mon Jan 02, 2023 1:56 pm The max Outlander charger can do is around 3.6 kw or 16A ac. Most granny cables are limited to 10A ac for a reason because the granny cable is meant for charging from a normal 220v outlet which may not be able to withstand 16A prolonged charging and could melt the socket/cause fire. If you have a good/robust 220v socket you can get a granny cable that is adjustable with a push of a button - these can go from 6 to 12A or even some to 16A. For home charging overnight 2kw is fine. To max out Outlander charger you'd need 16A granny cable/wallbox. 3.6 kw charging is still too slow for travelling so you can either get a chademo/ccs or a more powerful ac charger.
Thanks Marty
I'll look into getting a charging point for the house so I can charge at higher current and I already have a Chademo socket so it would make sense to go that way however these is are jobs for future Alibro. :lol:
Present Alibro is busy trying to finalise the location of various modules and get them cabled and connected before eventually transferring everything to a different car.
Using this car as a test mule seemed like a great idea at the time and to be honest let me make changes and do things without worrying about it, but now that I have to transfer everything it no longer seems so clever. :?

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Wed Jan 04, 2023 9:20 pm
by Alibro

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Fri Jan 06, 2023 8:51 pm
by SciroccoEV
I'm not a fan of sequencing contactors by dead reckoning. You should really be monitoring the bus voltage and abandoning a precharge if it takes too long.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Fri Jan 06, 2023 9:35 pm
by Alibro
SciroccoEV wrote: Fri Jan 06, 2023 8:51 pm I'm not a fan of sequencing contactors by dead reckoning. You should really be monitoring the bus voltage and abandoning a precharge if it takes too long.
I take your point.
Any suggestion how to achieve this?

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Fri Jan 06, 2023 10:08 pm
by SciroccoEV
Alibro wrote: Fri Jan 06, 2023 9:35 pm I take your point.
Any suggestion how to achieve this?
I've forgotten exactly which VCU you're using, but contactor control is often built in.

The simplest automated setup I've done was on a 48V sysytem. I used a relay coil across the controller bus and a second relay coil across the precharge resistor. The relay contacts were wired together so that the controller voltage had to be avove a certain level and the voltage across the precharge resistor below a certain level.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Fri Jan 06, 2023 11:34 pm
by Alibro
SciroccoEV wrote: Fri Jan 06, 2023 10:08 pm I've forgotten exactly which VCU you're using, but contactor control is often built in.

The simplest automated setup I've done was on a 48V sysytem. I used a relay coil across the controller bus and a second relay coil across the precharge resistor. The relay contacts were wired together so that the controller voltage had to be above a certain level and the voltage across the precharge resistor below a certain level.
I have one of Damiens Nissan Leaf Gen one VCU's.
I don't know how this would work with 400V :o

Joking aside I do accept what you are saying and it would be good to know how others are controlling precharge.
I will have to take another look at my VCU to see if it has a precharge control.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Sat Jan 07, 2023 9:05 am
by SciroccoEV
You've got several low side output drivers, even on the first version of the VCU PCB design.

After a cursory look through the code, cobtactor control was implimented in V1.5

https://github.com/damienmaguire/Nissan ... Gen1_5.ino

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Sun Feb 05, 2023 10:42 pm
by Alibro
SciroccoEV wrote: Sat Jan 07, 2023 9:05 am You've got several low side output drivers, even on the first version of the VCU PCB design.

After a cursory look through the code, cobtactor control was implimented in V1.5

https://github.com/damienmaguire/Nissan ... Gen1_5.ino
Thanks Paul
This is what finally pushed me to order an Isabellenhütte IVT-S shunt as (unless I'm mistaken) that's how the VCU knows the voltage and current so when the connectors for it arrive I'll get it installed and try to figure out a safer way to power the car on.

In the meantime I've been tidying things up under the bonnet and have all the current electronics tidied away with the VCU inside the car now.
IMG_20230204_152034285.jpg

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Wed Feb 15, 2023 8:39 pm
by Cookie6000
Alibro wrote: Fri Jan 06, 2023 11:34 pm Joking aside I do accept what you are saying and it would be good to know how others are controlling precharge.
I will have to take another look at my VCU to see if it has a precharge control.
Just as Paul mentioned, the v1.5 firmware for the original EVBMW Leaf VCU(the one James 'Figleaf' and I have used) already has precharge and Pos contactor control built in. You can set the voltage. Without the shunt, you can use inv_volts to set the point when the main + contactor can be closed. Here's the section you want.

Code: Select all

if (T15Status && !Pch_Flag)  //if terminal 15 is on and precharge not enabled
{
  digitalWrite(OUT3, HIGH);  //inverter power on
  if(inv_volts_local<350)
  {
  digitalWrite(OUT1, HIGH);  //precharge on
  Pch_Flag=true;
  }
}
if (T15Status && !HV_Flag && Pch_Flag)  //using inverter measured hv for initial tests. Will use ISA derived voltage in final version.
{
  if (inv_volts_local>350)
  {
  digitalWrite(OUT2, HIGH);  //main contactor on
  HV_Flag=true;  //hv on flag
  }

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Wed Feb 15, 2023 9:34 pm
by Alibro
Cookie6000 wrote: Wed Feb 15, 2023 8:39 pm Just as Paul mentioned, the v1.5 firmware for the original EVBMW Leaf VCU(the one James 'Figleaf' and I have used) already has precharge and Pos contactor control built in. You can set the voltage. Without the shunt, you can use inv_volts to set the point when the main + contactor can be closed. Here's the section you want.

Code: Select all

if (T15Status && !Pch_Flag)  //if terminal 15 is on and precharge not enabled
{
  digitalWrite(OUT3, HIGH);  //inverter power on
  if(inv_volts_local<350)
  {
  digitalWrite(OUT1, HIGH);  //precharge on
  Pch_Flag=true;
  }
}
if (T15Status && !HV_Flag && Pch_Flag)  //using inverter measured hv for initial tests. Will use ISA derived voltage in final version.
{
  if (inv_volts_local>350)
  {
  digitalWrite(OUT2, HIGH);  //main contactor on
  HV_Flag=true;  //hv on flag
  }
That's brilliant thanks Fiachra, I'm still waiting for the Shunt connectors so will have another look at this later but it looks fairly simple using out's 1 and 2.

I'm having a play with the old Leaf water heater at the moment so will report back if I get it working.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Thu Feb 23, 2023 7:58 pm
by JaniK
I have my identical VCU running the inv_volts_local check and it works just fine. It precharges until it reads CAN voltage msg from the inverter to exceed the value it was setup to look for and then closes main.

But for fast charging, I ordered the ISA shunt a long time ago too.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Thu Feb 23, 2023 10:38 pm
by Alibro
JaniK wrote: Thu Feb 23, 2023 7:58 pm I have my identical VCU running the inv_volts_local check and it works just fine. It precharges until it reads CAN voltage msg from the inverter to exceed the value it was setup to look for and then closes main.

But for fast charging, I ordered the ISA shunt a long time ago too.
That's interesting. Is it reading the voltage from inverter CAN?

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Thu Feb 23, 2023 11:32 pm
by JaniK
Alibro wrote: Thu Feb 23, 2023 10:38 pm That's interesting. Is it reading the voltage from inverter CAN?
Yes it is. You can set the voltage point to your desired value.

See few posts above cookie6000 code,

It does this:

If lower than "350" precharge

When over "350" main contactor on.

Change both values to your needs.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Fri Feb 24, 2023 6:08 pm
by Alibro
Cookie6000 wrote: Wed Feb 15, 2023 8:39 pm Just as Paul mentioned, the v1.5 firmware for the original EVBMW Leaf VCU(the one James 'Figleaf' and I have used) already has precharge and Pos contactor control built in. You can set the voltage. Without the shunt, you can use inv_volts to set the point when the main + contactor can be closed. Here's the section you want.

Code: Select all

if (T15Status && !Pch_Flag)  //if terminal 15 is on and precharge not enabled
{
  digitalWrite(OUT3, HIGH);  //inverter power on
  if(inv_volts_local<350)
  {
  digitalWrite(OUT1, HIGH);  //precharge on
  Pch_Flag=true;
  }
}
if (T15Status && !HV_Flag && Pch_Flag)  //using inverter measured hv for initial tests. Will use ISA derived voltage in final version.
{
  if (inv_volts_local>350)
  {
  digitalWrite(OUT2, HIGH);  //main contactor on
  HV_Flag=true;  //hv on flag
  }
Cookie I thanked you for this without fully appreciating what you had said so apologies for that. Janik had to spell it out for me in the previous post. :?
What fooled me was I don't see the pack Voltage on the web interface. Any Idea why that might be?

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Sun Feb 26, 2023 10:25 pm
by JaniK
Alibro wrote: Fri Feb 24, 2023 6:08 pm Cookie I thanked you for this without fully appreciating what you had said so apologies for that. Janik had to spell it out for me in the previous post. :?
What fooled me was I don't see the pack Voltage on the web interface. Any Idea why that might be?
I am remembering that the web interface would show ISA values. -> No shunt -> no data..?

Found it: (leaf gen1 board topic)
james@N52E01 wrote: Tue Apr 28, 2020 11:14 am Made some progress with the VCU board. Just got WiFi working :)
BB785A94-EA2B-44EA-A17D-477FE8D3E1B4.jpeg
I went through the leaf_wifi.ino code and solid-gauge.js looks like it’s missing from the GitHub repository:
https://github.com/damienmaguire/Nissan ... /WiFi/Data
(you can get it from any of the other WiFi board repositories used here)

The VCU board Is now working with V1.5 software. As you can see the Voltage, Current and Power info is not showing on the WiFi Yes as I still need an ISA shunt.

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Sun Apr 02, 2023 4:11 pm
by Alibro
So I've made a start stripping the new car.
IMG_20230330_205414815.jpg
IMG_20230330_205428095.jpg
The under tray and propshaft have also been removed. ;)
As expected since this car had been lying in a lockup for a couple of years and was bought as a non runner (even though it runs fine :confused:) it is a bit crusty underneath and a few things are not great but it really is not too bad. The previous owner had fitted an EGR bypass, silicone hoses and fuel tank cradle but the VCU seems to be pretty tight so I'll be fitting my old one.
Hopefully over the next few week or so I'll get it properly deiced and can start stripping the test mule. :)
I'll probably leave the fuel tank in place for now as I still haven't ruled out using the fuel burning heater to heat the cabin. It is standard on this model of Freelander. The only problem with doing that is where to put the charger socket.

Trying to push as much coolant out as possible with a little compressed air. ;)
IMG_20230402_112323807.jpg
I'm removing the rads and disconnecting the PS pump before dropping the engine. Still a few more things to disconnect.

I managed to do a bit more stripping today.
IMG_20230402_150351692.jpg
IMG_20230402_150320586.jpg
I decided to remove the PS pump first so I don't need to mess about with the hydraulic hoses or drain the fluid. It was a bit awkward and I had to unbolt the OS engine mount to get it out but not too bad. The rads are out too and the wiring harness is disconnected at the ECU box.
So not too much more to do before the noisy smelly parts can be removed. ;)

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Thu Apr 20, 2023 2:42 pm
by Alibro
How heavy is it?


Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Tue May 16, 2023 9:38 am
by Alibro
New vid


Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Wed May 24, 2023 2:00 pm
by Alibro
New vid


Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Thu May 25, 2023 10:16 am
by rstevens81
I'm glad i'm not the only one driving themself potty about trying to stay within the DVLA rules...I liked the re-use of the spare bits of materials... I have lost count how many times i have done that myself... although i have gone one better and re-used some of my failed battery boxes :)

Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Sun Jul 23, 2023 12:20 pm
by Alibro
2 New vids



Re: Freelander EV With Gen1 Leaf electrics and EVBMW VCU

Posted: Mon Jul 24, 2023 10:24 pm
by Alibro
The tangled mass has grown!
IMG_20230724_214747023.jpg
The BMS connections for the front batteries have now been spliced in at the BMS end so now I can start to make the connections at the front. :)