Field Weakening with the P&S Nissan Leaf Control Board

New Feature!

I spoke with Paul a bit ago about adding field weakening to his control board for the Nissan Leaf inverter. I don’t see the board on his site, yet, but he sold me one over email. Since I wanted to avoid shifting gears in the Mercedes, I was hoping that he would add the feature to allow me to spin the motor at a higher RPM. I am happy to say that he just finished writing the initial test software. I’ll be loading it onto my control board over the weekend, and I’ll let you know how it runs. This software is experimental, so if you decide to use it, it is at your own risk. Paul has not yet finalized the software, but he says this it very close. He will debug it shortly. I will post again after he has debugged it and I have tested it. You can download the files here: Nissan Leaf Control Software with Field Weakening. Please keep in mind that this software is for the 2013-2015 Leaf inverter. It will not function on an earlier inverter since the current sensors are reversed.

What is Field Weakening?

Simply, field weakening allows you to increase the RPM of a motor without increasing the voltage. This comes at the cost of torque, but will provide for a higher maximum speed in a vehicle.

But how does it work? Here’s how I understand it in the scenario of the Nissan Leaf motor. The motor in question is a permanent magnet AC motor (PMAC). The motor rotates the field around the rotor at a certain angle to force it to spin. The field angle is normally perpendicular to the magnets, which allows for the greatest possible torque. Changing this angle will reduce the torque available, but it will allow the rotor to spin faster.

There’s more to it than that, but that’s enough for me!

How Do You Upgrade the Software?

I will cover that when I go through the process on this particular board so that I can show you some pictures. The only thing you need to buy is a PICkit3. I’m currently using this one: PICkit3 on Amazon.

You will also need to download the MPLAB IDE to use in tandem with the PICkit3. This will allow you to build the software and load it to the microprocessor. You can download the software here: MPLAB IDE Download. If you don’t want to wait for some more instruction with pictures, using the software files I posted above, a PICkit3, and the MPLAB IDE, you can follow the instructions here to build and load the software: Build and Load the Hex. The PICkit3 connects to the pin header on the control board. Make sure that you line up the arrow with the correct pin on the board and the PICkit3

This is the same process to load software to the High Power DC Board, as well.

How Do I Use the Feature?

It’s simple! Once the software is loaded, the inverter is started, and you’re connected via Realterm, these are the commands you need to use:

fw 0Disable field weakening
fw 1Enable field weakening
field-weakening-rpm xxxxSpecify the RPM at which field weakening starts, where xxxx is the RPM

4 thoughts on “Field Weakening with the P&S Nissan Leaf Control Board”

  1. Wow! Beautiful documentation! I’m going to send people here if you don’t mind. This is much cleaner and clearer than I could do.

  2. Hi Jeff,
    Can you show us your config screen settings?
    I have tried to activate the fw command but the controller just trips out

Comments are closed.