Nissan Leaf (and Tesla) coolant pumps

Nissan Leaf/e-NV200 drive stack topics
Post Reply
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Nissan Leaf (and Tesla) coolant pumps

Post by Alibro »

Hi guys
Can anyone please advise me on how to control Nissan Leaf coolant pumps.
I'm in the process of installing the cooling system and just realised they need to be controlled, maybe by PWM
I found the photo below on the Nissan Leaf forum from Dala but there was no further explanation. https://www.mynissanleaf.com/viewtopic.php?t=31574
pWv1Q52.png
I have two of these pumps so it would be nice to use them if possible.
Also any advice on how to plumb the system gratefully received
I need a bigger hammer!
User avatar
larsrengersen
Posts: 102
Joined: Tue May 28, 2019 9:42 am
Has thanked: 9 times
Been thanked: 22 times

Re: Nissan Leaf coolant pumps

Post by larsrengersen »

Looks like the same pump as the Tesla pump so you can try that control scheme https://www.evcreate.nl/using-tesla-the ... tesla-pump
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

larsrengersen wrote: Sat Dec 24, 2022 10:33 am Looks like the same pump as the Tesla pump so you can try that control scheme https://www.evcreate.nl/using-tesla-the ... tesla-pump
Great call, I'll try that as soon as I figure out how to create the PWM signal. :lol:
I need a bigger hammer!
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

Turns out they start pumping after a few seconds with only 12V connected.
I may check out controlling with pwm later but for now it will allow me to charge the battery.
I need a bigger hammer!
User avatar
Tremelune
Posts: 64
Joined: Mon Jun 10, 2019 6:07 pm
Location: Los Angeles
Has thanked: 1 time
Been thanked: 7 times

Re: Nissan Leaf coolant pumps

Post by Tremelune »

Wait, really? I remember connecting mine to 12V and it never spun. I can't remember how long I attached the leads for, though...Maybe I disconnected them too soon.
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

Tremelune wrote: Mon Dec 26, 2022 8:31 pm Wait, really? I remember connecting mine to 12V and it never spun. I can't remember how long I attached the leads for, though...Maybe I disconnected them too soon.
Yip, with only 12V connected the pump starts after 5 or 6 seconds. I tried using a cheap ebay motor controller that the Aliexpress listing claimed was PWM https://s.click.aliexpress.com/e/_Dl1dEsf but couldn't adjust the speed of the pump. I even tried using 5V, 6V, 7V etc through the motor controller but still no joy. Maybe it requires a specific frequency to control it or maybe I didn't connect it correctly but for now I'm happy it is working well enough for testing purposes.
I need a bigger hammer!
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Nissan Leaf coolant pumps

Post by arber333 »

Alibro wrote: Thu Dec 29, 2022 8:04 pm Yip, with only 12V connected the pump starts after 5 or 6 seconds. I tried using a cheap ebay motor controller that the Aliexpress listing claimed was PWM https://s.click.aliexpress.com/e/_Dl1dEsf but couldn't adjust the speed of the pump. I even tried using 5V, 6V, 7V etc through the motor controller but still no joy. Maybe it requires a specific frequency to control it or maybe I didn't connect it correctly but for now I'm happy it is working well enough for testing purposes.
I noticed on Ampera pumps they would be run by 1kHz PWM and can by varied by changing duty. You could try some off the shelf PWM regulator...
https://leafdriveblog.wordpress.com/201 ... -and-fans/
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

arber333 wrote: Thu Dec 29, 2022 10:04 pm I noticed on Ampera pumps they would be run by 1kHz PWM and can by varied by changing duty. You could try some off the shelf PWM regulator...
https://leafdriveblog.wordpress.com/201 ... -and-fans/
Thanks, I should have guessed you would have something up in your blog about it. :)
I've ordered a couple of cheap PWM generators of ebay to see if they will work but in the meantime I'm going to see if I can plagiarise someones Arduino code if I can find something. The pump works fine with only 12V but is pumping full power which is not necessary for my setup.
I need a bigger hammer!
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

So after a lot of messing about I've figured out how to control the pump. It needs a 2hz 5V PWM signal to the speed control input.

Using the tables below I managed to use an Arduino Uno to send the PWM at around 20% duty cycle and the pump spooled right down until it was barely audible. :D Full speed is 4700rpm and slowest is 750rpm so I'll try to get it spinning around 1000rpm which I think using the calculator below is 24% duty cycle


Input Output
(pwm %) (RPM)
0 – 8 Invalid input
8 – 12 0
13 – 17 Invalid input
18 – 20 750
21 – 79 (65,8 x PWM – 550)
80 – 82 4700
83 – 100 Invalid input
Pump PWM to RPM

This is the code I used

// Set-up fast PWM on the Arduino UNO at 2Hz on Digital pin D9 with inverted output
void setup() {
pinMode(9, OUTPUT); // Set digital pin 9 (D9) to an output
TCCR1A = _BV(COM1A1) | _BV(COM1A0) | _BV(WGM11); // Enable the PWM output OC1A on digital pins 9 and invert output
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS12); // Set fast PWM and prescaler of 256 on timer 1
ICR1 = 31250; // Set the PWM frequency to 2Hz: 16MHz/(256 * 2Hz) - =
OCR1A = 25000; // Set the duty-cycle to 20%:
}

void loop() {}

It was code I copied off the internet and tweaked so I am not sure I have it right but I'll confirm it later as I don't have time to look at it properly today.
Having said that with this code on the Uno and the GND of the arduino connected to car ground the pump slowed down by a LOT.
I had an oscilloscope on the output but it struggled to confirm the frequency jumping from 1 to 2Hz then even 4Hz but it still worked as required.

Funny thing is I found when I set the OCR1A to 20% of ICR1 I saw on the scope the PWM looked more like 80% so I set it to 80% and it looked like 20% on the scope. I just noticed in the description the output is inverted. Am I right about that and if so what is the point of inverting the output?
I need a bigger hammer!
arber333
Posts: 3265
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 234 times
Contact:

Re: Nissan Leaf coolant pumps

Post by arber333 »

Duty means how long output is ON between pulses. If you use N-mos switch this means you interrupt (pull down) positive signal on pullup resistor. Then you need to invert your command. So PWM will be on when you command your switch off.
So for your case use 1kOhm resistor from 5V to your pin.
Now you need to invert your logic to get correct function.

Mind you i found sometimes pumps already use inverted logic within their control. 80% then means almost off...
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

arber333 wrote: Sun Jan 01, 2023 3:43 pm Duty means how long output is ON between pulses. If you use N-mos switch this means you interrupt (pull down) positive signal on pullup resistor. Then you need to invert your command. So PWM will be on when you command your switch off.
So for your case use 1kOhm resistor from 5V to your pin.
Now you need to invert your logic to get correct function.

Mind you i found sometimes pumps already use inverted logic within their control. 80% then means almost off...
I don't quite understand
I noticed the sense wire from the pump sits at 5V so it makes sense that when the PWM signal is low it's pulling the sense wire down.
I guess with 20% duty cycle it is pulled down 80% of the time but I don't understand why I need a pullup resistor as it seems to be working fine the way it is, I just connected pin 9 to the pump and worked, will this cause other issues?

Thanks for the help. :)
I need a bigger hammer!
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

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 = 14062;                                    // Set the duty-cycle to approx 45%: 31249 / 100 * 45 = 14062
}
void loop() {}
sketch_jan01a.ino
(603 Bytes) Downloaded 105 times
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
The link to a similar Tesla pump giving more info posted by larsrengersen above https://www.evcreate.nl/using-tesla-the ... tesla-pump
I need a bigger hammer!
User avatar
Tremelune
Posts: 64
Joined: Mon Jun 10, 2019 6:07 pm
Location: Los Angeles
Has thanked: 1 time
Been thanked: 7 times

Re: Nissan Leaf coolant pumps

Post by Tremelune »

This is good work, y'all.
User avatar
Gregski
Posts: 2267
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 325 times
Been thanked: 449 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Gregski »

just wanted to say thanks, and prove with pics that your work, was put to good use, this is great, thank you for sharing the code / solution

IMG_5797.JPG
IMG_5801.JPG

"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

Gregski wrote: Fri Jul 21, 2023 12:37 pm just wanted to say thanks, and prove with pics that your work, was put to good use, this is great, thank you for sharing the code / solution


IMG_5797.JPG


IMG_5801.JPG
Glad it worked for you. Did you make any changes to the code?
I was using an Uno to switch relays and control ignition timing so it was fairly simple to incorporate the pump code into the ignition code.
I suspect a Nano would work equally well and be a bit smaller.
I need a bigger hammer!
User avatar
Gregski
Posts: 2267
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 325 times
Been thanked: 449 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Gregski »

Alibro wrote: Fri Jul 21, 2023 2:34 pm Glad it worked for you. Did you make any changes to the code?
I was using an Uno to switch relays and control ignition timing so it was fairly simple to incorporate the pump code into the ignition code.
I suspect a Nano would work equally well and be a bit smaller.
How about a Teensy?

Teensy-vs-arduino-0003-hero-cover-1280x640.jpg
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

Gregski wrote: Fri Jul 21, 2023 3:18 pm How about a Teensy?


Teensy-vs-arduino-0003-hero-cover-1280x640.jpg
I don't know anything about them. :?
I need a bigger hammer!
User avatar
Gregski
Posts: 2267
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 325 times
Been thanked: 449 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Gregski »

Alibro wrote: Fri Jul 21, 2023 6:37 pm I don't know anything about them. :?
small, more powerful, and run Arduino code using Teensyduino no you can't make this stuff up !
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
User avatar
Gregski
Posts: 2267
Joined: Tue Sep 14, 2021 10:28 am
Location: Sacramento, California
Has thanked: 325 times
Been thanked: 449 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Gregski »

FYI if you try 'n save a few bucks and buy a knock off arduino UNO like the WeMos D1 you'll end up having to jump through hoops in order to get Arduino IDE to recognize your board and then in order to compile and upload the code, I decided to try the WeMos D1 card just cause it has the solder through pin holes in the board so that I could hard wire that PWM wire, but I gave up

Wemos D1 Mini Setup

Wemos-D1-Mini-Setup-1.png
"I don't need to understand how it works, I just need to understand how to make it work!" ~ EV Greg
Alibro
Posts: 856
Joined: Sun Feb 23, 2020 9:24 am
Location: Northern Ireland
Has thanked: 268 times
Been thanked: 149 times
Contact:

Re: Nissan Leaf coolant pumps

Post by Alibro »

Apologies if this is teaching your granny to suck eggs but it took me a while to figure out the first time I bought an Arduino clone.
Many of the Arduino clones have a different USB adaptor to the real ones so if using Windoze you need to download the driver for them as Windoze is too stupid to have the driver included. A quick Google will find it but the chip is CH340/Ch341.
Also you may need to select Nano then select ATmega328P(Old Bootloader) to get the sketch to upload.
I need a bigger hammer!
User avatar
Bratitude
Posts: 784
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 174 times
Contact:

Re: Nissan Leaf (and Tesla) coolant pumps

Post by Bratitude »

connector for the Nissan/tesla coolant pump is Sumitomo 6189-1105
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
Post Reply